Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix missing scripts issue in package.json and bump emitter version #2402

Merged
merged 5 commits into from
Apr 3, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
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
4 changes: 4 additions & 0 deletions packages/autorest.typescript/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 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).
MaryGao marked this conversation as resolved.
Show resolved Hide resolved

## 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).
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
4 changes: 4 additions & 0 deletions packages/rlc-common/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 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).
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",
MaryGao marked this conversation as resolved.
Show resolved Hide resolved
"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
4 changes: 4 additions & 0 deletions packages/typespec-ts/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 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).
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
Loading