Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
8575eed
Adding a logging interface + renaming helpers to common
snehabandla Nov 12, 2025
9e65736
fixing linter errors
snehabandla Nov 12, 2025
a7aba65
more linter errors
snehabandla Nov 12, 2025
7fa5758
more linter errors
snehabandla Nov 12, 2025
0bb8caa
renaming folder to common
snehabandla Nov 12, 2025
9130a73
Moved code to a packages folder, added in an
snehabandla Nov 14, 2025
f3a8c9d
fixing linter error
snehabandla Nov 14, 2025
8f474ff
packaging
snehabandla Nov 14, 2025
878da4f
adding in an action to upload package and updating dist action to val…
snehabandla Nov 14, 2025
111caba
renaming for action
snehabandla Nov 14, 2025
ac008fe
fixing ids
snehabandla Nov 14, 2025
2da870a
fixing spaces in ids
snehabandla Nov 14, 2025
1996ee1
fixing upload action
snehabandla Nov 14, 2025
6aa3c33
removing dist/ from packages/
snehabandla Nov 14, 2025
166c4f4
moving more files + referencing module instead of files
snehabandla Nov 15, 2025
6bd1b9c
linting
snehabandla Nov 15, 2025
3d5f034
undoing tsconfig changes
snehabandla Nov 15, 2025
7b1fd0d
Adding an interface for naming differences
snehabandla Nov 18, 2025
fbfd8bf
fixing many things
snehabandla Nov 20, 2025
c04163b
fixing linting issues
snehabandla Nov 20, 2025
6195af3
Merge branch 'main' into snehab/refactoring
snehabandla Nov 20, 2025
89f010c
fixing package lock
snehabandla Nov 20, 2025
e6f270b
fixing dist check
snehabandla Nov 21, 2025
24aadff
recreating package lock
snehabandla Nov 21, 2025
ff1a5f1
fixing yml files
snehabandla Nov 21, 2025
d634139
updating node version
snehabandla Nov 21, 2025
dbe96e3
updating ci to explicitly build common
snehabandla Nov 21, 2025
7d55bbc
building common for live tests
snehabandla Nov 21, 2025
9997700
adding test files back in
snehabandla Nov 21, 2025
d25cd75
updating the starting point of the action
snehabandla Nov 21, 2025
0b1ff30
logging validation failure
snehabandla Nov 21, 2025
df0027e
seeing error being thrown
snehabandla Nov 21, 2025
2901937
more logging
snehabandla Nov 21, 2025
014e333
adding more logs
snehabandla Nov 21, 2025
c590d43
more logging
snehabandla Nov 21, 2025
d8a9096
changing to isError check instead of instanceof
snehabandla Nov 22, 2025
a652068
removing unused references
snehabandla Nov 22, 2025
397b13c
installing dependencies
snehabandla Nov 22, 2025
f5f66c3
adding a build before running action in ci
snehabandla Nov 22, 2025
23175c9
bundling all dependecies for action
snehabandla Nov 22, 2025
9a2a330
removing install
snehabandla Nov 22, 2025
af9ea5d
removing testing logs
snehabandla Nov 22, 2025
ec903e7
changing version and adding comments
snehabandla Nov 22, 2025
0649ac6
linting
snehabandla Nov 22, 2025
e7d6e93
Suggestion for removing usage of npm install (#249)
anthony-c-martin Nov 25, 2025
864434d
addressing comments
snehabandla Nov 25, 2025
3683b70
updating upload action to use json output from npm pack
snehabandla Nov 25, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/check-dist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@ jobs:
id: build
run: |
rm -Rf dist
npm run package
npm run build

# This will fail the workflow if the `dist/` directory is different than
# expected.
- name: Compare Directories
- name: Compare dist/ Directories
id: diff
run: |
if [ ! -d dist/ ]; then
Expand All @@ -71,4 +71,4 @@ jobs:
uses: actions/upload-artifact@v5
with:
name: dist
path: dist/
path: dist/
33 changes: 32 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,20 @@ jobs:
node-version-file: .node-version
cache: npm

- name: Install Dependencies Common
id: npm-install-common
working-directory: ./packages/bicep-deploy-common
run: npm ci

- name: Build bicep-deploy-common Package
id: build
working-directory: ./packages/bicep-deploy-common
run: |
rm -Rf dist
npm run build

- name: Install Dependencies
id: npm-ci
id: npm-install
run: npm ci

- name: Lint
Expand Down Expand Up @@ -77,6 +89,18 @@ jobs:
node-version-file: .node-version
cache: npm

- name: Install Dependencies Common
id: npm-install-common
working-directory: ./packages/bicep-deploy-common
run: npm ci

- name: Build bicep-deploy-common Package
id: build
working-directory: ./packages/bicep-deploy-common
run: |
rm -Rf dist
npm run build

- name: Install Dependencies
id: npm-ci
run: npm ci
Expand Down Expand Up @@ -121,6 +145,13 @@ jobs:
id: checkout
uses: actions/checkout@v5

- name: Setup Node.js
id: setup-node
uses: actions/setup-node@v6
with:
node-version-file: .node-version
cache: npm

- uses: azure/login@v2
with:
client-id: ${{ secrets.AZURE_CLIENT_ID }}
Expand Down
59 changes: 59 additions & 0 deletions .github/workflows/upload-package.yml
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New action to upload package bits. For now it can only be invoked manually.

Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Upload bicep-deploy-common Package

on: workflow_dispatch

permissions:
contents: read

jobs:
upload-package:
name: Upload bicep-deploy-common Package
runs-on: ubuntu-latest

steps:
- name: Checkout
id: checkout
uses: actions/checkout@v5

- name: Setup Node.js
id: setup-node
uses: actions/setup-node@v6
with:
node-version-file: .node-version
cache: npm

- name: Install Dependencies for bicep-deploy-common
id: install-common
working-directory: ./packages/bicep-deploy-common
run: npm ci

- name: Build bicep-deploy-common Package
id: build
working-directory: ./packages/bicep-deploy-common
run: |
rm -Rf dist
npm run build

- name: Create package tarball
id: pack
working-directory: ./packages/bicep-deploy-common
run: |
packOutput=$(npm pack --json)
echo "filename=$(echo $packOutput | jq -r '.[0].filename')" >> $GITHUB_OUTPUT
echo "version=$(echo $packOutput | jq -r '.[0].version')" >> $GITHUB_OUTPUT

# Using upload steps defined for the Partner Release Pipeline (https://aka.ms/azsdk/partner-release-pipeline)
# azuresdkpartnerdrops is the managed identity that we use to upload to the partner drop folder
- name: Login to azuresdkpartnerdrops
uses: azure/login@v2
with:
client-id: ${{ secrets.AZURESDKPARTNERDROPS_CLIENT_ID }}
tenant-id: ${{ secrets.AZURESDKPARTNERDROPS_TENANT_ID }}
subscription-id: ${{ secrets.AZURESDKPARTNERDROPS_SUBSCRIPTION_ID }}

# Upload bicep-deploy-common package to partner drop folder to allow external distribution under the @azure scope
- name: Upload files to partner drop folder
working-directory: ./packages/bicep-deploy-common
run: |
echo "Uploading ${{ steps.pack.outputs.filename }} to partner drop folder at drops/bicep-deploy-common/npm/${{ steps.pack.outputs.version }}..."
az storage blob upload -f ${{ steps.pack.outputs.filename }} -c drops/bicep-deploy-common/npm/${{ steps.pack.outputs.version }} --account-name azuresdkpartnerdrops --auth-mode login
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Dependency directory
node_modules
packages/**/node_modules

# Rest pulled from https://github.com/github/gitignore/blob/master/Node.gitignore
# Logs
Expand Down Expand Up @@ -102,4 +103,7 @@ __tests__/runner/*
*.code-workspace

# build output
/out
/out

# Ignore package dist/
packages/bicep-deploy-common/dist/
2 changes: 1 addition & 1 deletion .node-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
22.8.0
22.12.0
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,4 +108,4 @@ inputs:

runs:
using: node20
main: dist/index.js
main: dist/index.cjs
327 changes: 327 additions & 0 deletions dist/index.cjs

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions dist/index.cjs.map

Large diffs are not rendered by default.

460 changes: 0 additions & 460 deletions dist/index.js

This file was deleted.

7 changes: 0 additions & 7 deletions dist/index.js.map

This file was deleted.

327 changes: 327 additions & 0 deletions dist/index.mjs

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions dist/index.mjs.map

Large diffs are not rendered by default.

52 changes: 29 additions & 23 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,31 +1,37 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

// @ts-check
// @ts-nocheck
import eslint from "@eslint/js";
import tseslint from "typescript-eslint";
import pluginJest from 'eslint-plugin-jest';
import vitest from '@vitest/eslint-plugin';
import notice from "eslint-plugin-notice";
import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended';

export default tseslint.config({
files: ["src/**/*.ts", "test/**/*.ts", "test-live/**/*.ts"],
extends: [
eslint.configs.recommended,
pluginJest.configs['flat/recommended'],
eslintPluginPrettierRecommended,
...tseslint.configs.recommended,
],
languageOptions: {
ecmaVersion: 2020,
},
plugins: { notice },
rules: {
"notice/notice": [
"error",
{
template: "// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n",
},
],
},
});
export default [
eslint.configs.recommended,
...tseslint.configs.recommended,
eslintPluginPrettierRecommended,
{
files: ["src/**/*.ts", "test/**/*.ts", "test-live/**/*.ts", "packages/**/*.ts"],
languageOptions: {
ecmaVersion: 2020,
globals: {
...vitest.environments.env.globals,
}
},
plugins: {
notice,
vitest
},
rules: {
"notice/notice": [
"error",
{
template: "// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n",
},
],
...vitest.configs.recommended.rules,
},
}
];
16 changes: 0 additions & 16 deletions jest.config.live.ts

This file was deleted.

16 changes: 0 additions & 16 deletions jest.config.unit.ts

This file was deleted.

Loading