Skip to content

Commit

Permalink
Fix missing scripts issue in package.json and bump emitter version (#…
Browse files Browse the repository at this point in the history
…2402)

* fix rlc package.json script issue

* Update the Unit test

* Update the changelog and regen smoke test

* Update the issue number

* Update the lock file

---------

Co-authored-by: Mary Gao <yanmeigao1210@gmail.com>
  • Loading branch information
kazrael2119 and MaryGao authored Apr 3, 2024
1 parent 7151382 commit 43c20f8
Show file tree
Hide file tree
Showing 15 changed files with 40 additions and 14 deletions.
6 changes: 3 additions & 3 deletions common/config/rush/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion packages/autorest.typescript/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
## 6.0.20 (2024-04-04)

- [Bugfix] Fix missing scripts in package.json file. Please refer to [#2402](https://github.com/Azure/autorest.typescript/pull/2402).

## 6.0.19 (2024-04-03)

- [Feature] Enable esm for RLC generation from TypeSpec. Please refer to [2338](https://github.com/Azure/autorest.typescript/pull/2338).
- [Feature] Enable esm for RLC generation from TypeSpec. Please refer to [#2338](https://github.com/Azure/autorest.typescript/pull/2338).
- [Feature] Support usage and access. Please refer to [#2356](https://github.com/Azure/autorest.typescript/pull/2356).
- [Feature] Support server versions in modular. Please refer to [#2261](https://github.com/Azure/autorest.typescript/pull/2261).
- [Feature] Deprecate baseurl in favor of endpoint in RLC. Please refer to [#2246](https://github.com/Azure/autorest.typescript/pull/2246).
Expand Down
4 changes: 2 additions & 2 deletions packages/autorest.typescript/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@autorest/typescript",
"version": "6.0.19",
"version": "6.0.20",
"scripts": {
"build": "tsc -p . && npm run copyFiles",
"build:test:browser": "tsc -p tsconfig.browser-test.json && webpack --config webpack.config.test.js",
Expand Down Expand Up @@ -75,7 +75,7 @@
"source-map-support": "^0.5.16",
"ts-morph": "^15.1.0",
"@azure/core-auth": "^1.6.0",
"@azure-tools/rlc-common": "workspace:^0.26.0"
"@azure-tools/rlc-common": "workspace:^0.26.1"
},
"devDependencies": {
"@azure-tools/test-recorder": "^3.0.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@
"audit": "node ../../../common/scripts/rush-audit.js && rimraf node_modules package-lock.json && npm i --package-lock-only 2>&1 && npm audit",
"build:samples": "dev-tool samples publish --force",
"check-format": "dev-tool run vendored prettier --list-different --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.{ts,cts,mts}\" \"test/**/*.{ts,cts,mts}\" \"*.{js,cjs,mjs,json}\"",
"clean": "rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log",
"execute:samples": "dev-tool samples run samples-dev",
"format": "dev-tool run vendored prettier --write --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.{ts,cts,mts}\" \"test/**/*.{ts,cts,mts}\" \"*.{js,cjs,mjs,json}\"",
"integration-test:browser": "dev-tool run test:browser",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
"audit": "node ../../../common/scripts/rush-audit.js && rimraf node_modules package-lock.json && npm i --package-lock-only 2>&1 && npm audit",
"build:samples": "dev-tool samples publish --force",
"check-format": "dev-tool run vendored prettier --list-different --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.{ts,cts,mts}\" \"test/**/*.{ts,cts,mts}\" \"*.{js,cjs,mjs,json}\"",
"clean": "rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log",
"execute:samples": "dev-tool samples run samples-dev",
"format": "dev-tool run vendored prettier --write --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.{ts,cts,mts}\" \"test/**/*.{ts,cts,mts}\" \"*.{js,cjs,mjs,json}\"",
"integration-test:browser": "dev-tool run test:browser",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
"audit": "node ../../../common/scripts/rush-audit.js && rimraf node_modules package-lock.json && npm i --package-lock-only 2>&1 && npm audit",
"build:samples": "dev-tool samples publish --force",
"check-format": "dev-tool run vendored prettier --list-different --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.{ts,cts,mts}\" \"test/**/*.{ts,cts,mts}\" \"*.{js,cjs,mjs,json}\"",
"clean": "rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log",
"execute:samples": "dev-tool samples run samples-dev",
"format": "dev-tool run vendored prettier --write --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.{ts,cts,mts}\" \"test/**/*.{ts,cts,mts}\" \"*.{js,cjs,mjs,json}\"",
"integration-test:browser": "dev-tool run test:browser",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
"audit": "node ../../../common/scripts/rush-audit.js && rimraf node_modules package-lock.json && npm i --package-lock-only 2>&1 && npm audit",
"build:samples": "dev-tool samples publish --force",
"check-format": "dev-tool run vendored prettier --list-different --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.{ts,cts,mts}\" \"test/**/*.{ts,cts,mts}\" \"*.{js,cjs,mjs,json}\"",
"clean": "rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log",
"execute:samples": "dev-tool samples run samples-dev",
"format": "dev-tool run vendored prettier --write --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.{ts,cts,mts}\" \"test/**/*.{ts,cts,mts}\" \"*.{js,cjs,mjs,json}\"",
"integration-test:browser": "dev-tool run test:browser",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
"audit": "node ../../../common/scripts/rush-audit.js && rimraf node_modules package-lock.json && npm i --package-lock-only 2>&1 && npm audit",
"build:samples": "dev-tool samples publish --force",
"check-format": "dev-tool run vendored prettier --list-different --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.{ts,cts,mts}\" \"test/**/*.{ts,cts,mts}\" \"*.{js,cjs,mjs,json}\"",
"clean": "rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log",
"execute:samples": "dev-tool samples run samples-dev",
"format": "dev-tool run vendored prettier --write --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.{ts,cts,mts}\" \"test/**/*.{ts,cts,mts}\" \"*.{js,cjs,mjs,json}\"",
"integration-test:browser": "dev-tool run test:browser",
Expand Down
6 changes: 5 additions & 1 deletion packages/rlc-common/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
## 0.26.1 (2024-04-04)

- [Bugfix] Fix missing scripts in package.json file. Please refer to [#2402](https://github.com/Azure/autorest.typescript/pull/2402).

## 0.26.0 (2024-04-03)

- [Feature] Enable esm for RLC generation from TypeSpec. Please refer to [2338](https://github.com/Azure/autorest.typescript/pull/2338).
- [Feature] Enable esm for RLC generation from TypeSpec. Please refer to [#2338](https://github.com/Azure/autorest.typescript/pull/2338).
- [Feature] Support usage and access. Please refer to [#2356](https://github.com/Azure/autorest.typescript/pull/2356).
- [Feature] Support server versions in modular. Please refer to [#2261](https://github.com/Azure/autorest.typescript/pull/2261).
- [Feature] Deprecate baseurl in favor of endpoint in RLC. Please refer to [#2246](https://github.com/Azure/autorest.typescript/pull/2246).
Expand Down
2 changes: 1 addition & 1 deletion packages/rlc-common/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@azure-tools/rlc-common",
"version": "0.26.0",
"version": "0.26.1",
"description": "",
"type": "module",
"main": "dist/index.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ function getAzureMonorepoScripts(config: AzureMonorepoInfoConfig) {
"build:samples": "dev-tool samples publish --force",
"check-format":
'dev-tool run vendored prettier --list-different --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore "src/**/*.{ts,cts,mts}" "test/**/*.{ts,cts,mts}" "*.{js,cjs,mjs,json}"',
"clean": "rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log",
"execute:samples": "dev-tool samples run samples-dev",
format:
'dev-tool run vendored prettier --write --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore "src/**/*.{ts,cts,mts}" "test/**/*.{ts,cts,mts}" "*.{js,cjs,mjs,json}"',
Expand All @@ -218,7 +219,7 @@ function getEsmScripts({ moduleKind }: AzureMonorepoInfoConfig) {

return {
"build:test": "npm run clean && tshy && dev-tool run build-test",
build: "npm run clean && tshy && api-extractor run --local",
build: "npm run clean && tshy && mkdirp ./review && api-extractor run --local",
"test:node":
"npm run clean && tshy && npm run unit-test:node && npm run integration-test:node",
test: "npm run clean && tshy && npm run unit-test:node && dev-tool run bundle && npm run unit-test:browser && npm run integration-test",
Expand Down
10 changes: 9 additions & 1 deletion packages/rlc-common/test/integration/packageJson.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ describe("Package file generation", () => {
);
expect(packageFile.scripts).to.have.property(
"build",
"npm run clean && tshy && api-extractor run --local"
"npm run clean && tshy && mkdirp ./review && api-extractor run --local"
);
expect(packageFile.scripts).to.have.property(
"test:node",
Expand All @@ -362,6 +362,10 @@ describe("Package file generation", () => {
"unit-test:node",
"dev-tool run test:vitest --no-test-proxy"
);
expect(packageFile.scripts).to.have.property(
"clean",
"rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log"
);
});

it("[cjs] should include correct test devCependencies with tests", () => {
Expand Down Expand Up @@ -448,6 +452,10 @@ describe("Package file generation", () => {
"unit-test:browser",
"dev-tool run test:browser"
);
expect(packageFile.scripts).to.have.property(
"clean",
"rimraf --glob dist dist-browser dist-esm test-dist temp types *.tgz *.log"
);
});
});

Expand Down
2 changes: 1 addition & 1 deletion packages/typespec-test/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "1.0.0",
"type": "module",
"dependencies": {
"@azure-tools/typespec-ts": "workspace:^0.26.0",
"@azure-tools/typespec-ts": "workspace:^0.26.1",
"@typespec/openapi": ">=0.54.0 <1.0.0",
"@azure-tools/typespec-autorest": ">=0.40.0 <1.0.0",
"@typespec/openapi3": ">=0.54.0 <1.0.0",
Expand Down
6 changes: 5 additions & 1 deletion packages/typespec-ts/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
## 0.26.1 (2024-04-04)

- [Bugfix] Fix missing scripts in package.json file. Please refer to [#2402](https://github.com/Azure/autorest.typescript/pull/2402).

## 0.26.0 (2024-04-03)

- [Feature] Enable esm for RLC generation from TypeSpec. Please refer to [2338](https://github.com/Azure/autorest.typescript/pull/2338).
- [Feature] Enable esm for RLC generation from TypeSpec. Please refer to [#2338](https://github.com/Azure/autorest.typescript/pull/2338).
- [Feature] Support usage and access. Please refer to [#2356](https://github.com/Azure/autorest.typescript/pull/2356).
- [Feature] Support server versions in modular. Please refer to [#2261](https://github.com/Azure/autorest.typescript/pull/2261).
- [Feature] Deprecate baseurl in favor of endpoint in RLC. Please refer to [#2246](https://github.com/Azure/autorest.typescript/pull/2246).
Expand Down
4 changes: 2 additions & 2 deletions packages/typespec-ts/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@azure-tools/typespec-ts",
"version": "0.26.0",
"version": "0.26.1",
"description": "An experimental TypeSpec emitter for TypeScript RLC",
"main": "dist/src/index.js",
"type": "module",
Expand Down Expand Up @@ -93,7 +93,7 @@
"dependencies": {
"prettier": "^3.1.0",
"tslib": "^2.3.1",
"@azure-tools/rlc-common": "workspace:^0.26.0",
"@azure-tools/rlc-common": "workspace:^0.26.1",
"ts-morph": "^15.1.0",
"fs-extra": "^11.1.0"
},
Expand Down

0 comments on commit 43c20f8

Please sign in to comment.