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

support typecheck command for sample scripts #2784

Merged
merged 8 commits into from
Sep 4, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,10 @@
"lint": "eslint package.json api-extractor.json src test",
"lint:fix": "eslint package.json api-extractor.json src test --fix --fix-type [problem,suggestion]",
"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}\"",
"build:samples": "dev-tool run typecheck --paths samples-dev/*.ts && dev-tool samples publish -f",
"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}\" \"samples-dev/*.ts\"",
"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}\"",
"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}\" \"samples-dev/*.ts\"",
"integration-test:browser": "dev-tool run test:browser",
"integration-test:node": "dev-tool run test:node-js-input -- --timeout 5000000 'dist-esm/test/**/*.spec.js'",
"generate:client": "echo skipped",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"compilerOptions": {
"outDir": "./dist-esm",
"declarationDir": "./types",
"skipLibCheck": true,
"paths": { "@msinternal/dpg-customization-rest": ["./src/index"] }
},
"include": ["src/**/*.ts", "samples-dev/**/*.ts"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@
"lint:fix": "eslint package.json api-extractor.json src test --fix --fix-type [problem,suggestion]",
"audit": "node ../../../common/scripts/rush-audit.js && rimraf node_modules package-lock.json && npm i --package-lock-only 2>&1 && npm audit",
"build:samples": "echo skipped",
"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}\"",
"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}\" ",
"execute:samples": "echo skipped",
"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}\"",
"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",
"integration-test:node": "dev-tool run test:node-js-input -- --timeout 5000000 'dist-esm/test/**/*.spec.js'",
"generate:client": "echo skipped",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
{
"extends": "../../../tsconfig",
"compilerOptions": { "outDir": "./dist-esm", "declarationDir": "./types" },
"compilerOptions": {
"outDir": "./dist-esm",
"declarationDir": "./types",
"skipLibCheck": true
},
"include": ["src/**/*.ts"]
}
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@
"lint:fix": "eslint package.json api-extractor.json src test --fix --fix-type [problem,suggestion]",
"audit": "node ../../../common/scripts/rush-audit.js && rimraf node_modules package-lock.json && npm i --package-lock-only 2>&1 && npm audit",
"build:samples": "echo skipped",
"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}\"",
"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}\" ",
"execute:samples": "echo skipped",
"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}\"",
"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",
"integration-test:node": "dev-tool run test:node-js-input -- --timeout 5000000 'dist-esm/test/**/*.spec.js'",
"generate:client": "echo skipped",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
{
"extends": "../../../tsconfig",
"compilerOptions": { "outDir": "./dist-esm", "declarationDir": "./types" },
"compilerOptions": {
"outDir": "./dist-esm",
"declarationDir": "./types",
"skipLibCheck": true
},
"include": ["src/**/*.ts"]
}
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@
"lint:fix": "eslint package.json api-extractor.json src test --fix --fix-type [problem,suggestion]",
"audit": "node ../../../common/scripts/rush-audit.js && rimraf node_modules package-lock.json && npm i --package-lock-only 2>&1 && npm audit",
"build:samples": "echo skipped",
"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}\"",
"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}\" ",
"execute:samples": "echo skipped",
"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}\"",
"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",
"integration-test:node": "dev-tool run test:node-js-input -- --timeout 5000000 'dist-esm/test/**/*.spec.js'",
"generate:client": "echo skipped",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
{
"extends": "../../../tsconfig",
"compilerOptions": { "outDir": "./dist-esm", "declarationDir": "./types" },
"compilerOptions": {
"outDir": "./dist-esm",
"declarationDir": "./types",
"skipLibCheck": true
},
"include": ["src/**/*.ts"]
}
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@
"lint:fix": "eslint package.json api-extractor.json src test --fix --fix-type [problem,suggestion]",
"audit": "node ../../../common/scripts/rush-audit.js && rimraf node_modules package-lock.json && npm i --package-lock-only 2>&1 && npm audit",
"build:samples": "echo skipped",
"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}\"",
"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}\" ",
"execute:samples": "echo skipped",
"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}\"",
"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",
"integration-test:node": "dev-tool run test:node-js-input -- --timeout 5000000 'dist-esm/test/**/*.spec.js'",
"generate:client": "echo skipped",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
{
"extends": "../../../tsconfig",
"compilerOptions": { "outDir": "./dist-esm", "declarationDir": "./types" },
"compilerOptions": {
"outDir": "./dist-esm",
"declarationDir": "./types",
"skipLibCheck": true
},
"include": ["src/**/*.ts"]
}
6 changes: 4 additions & 2 deletions packages/rlc-common/src/metadata/buildTsConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ const restLevelTsConfigInAzureSdkForJs: (
compilerOptions: {
module: "NodeNext",
moduleResolution: "NodeNext",
rootDir: "."
rootDir: ".",
skipLibCheck: true
Copy link
Member

Choose a reason for hiding this comment

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

},
include: [
"./src/**/*.ts",
Expand All @@ -28,7 +29,8 @@ const restLevelTsConfigInAzureSdkForJs: (
extends: "../../../tsconfig",
compilerOptions: {
outDir: "./dist-esm",
declarationDir: "./types"
declarationDir: "./types",
skipLibCheck: true
},
include: ["src/**/*.ts"]
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -194,17 +194,19 @@ function getAzureMonorepoScripts(config: AzureMonorepoInfoConfig) {
audit:
"node ../../../common/scripts/rush-audit.js && rimraf node_modules package-lock.json && npm i --package-lock-only 2>&1 && npm audit",
"build:samples": config.withSamples
? "dev-tool samples publish --force"
? "dev-tool run typecheck --paths samples-dev/*.ts && dev-tool samples publish -f"
: "echo skipped",
"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}"',
"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}" ${
config.withSamples ? '"samples-dev/*.ts"' : ""
}`,
"execute:samples": config.withSamples
? "dev-tool samples run samples-dev"
: "echo skipped",
"extract-api":
"rimraf review && mkdirp ./review && dev-tool run extract-api",
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}"',
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}" ${
config.withSamples ? '"samples-dev/*.ts"' : ""
}`,
"integration-test:browser": "echo skipped",
"integration-test:node": "echo skipped",
"generate:client": "echo skipped",
Expand Down
4 changes: 2 additions & 2 deletions packages/rlc-common/test/integration/packageJson.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ describe("Package file generation", () => {
);
expect(packageFile.scripts).to.have.property(
"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}"'
'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 Down Expand Up @@ -444,7 +444,7 @@ describe("Package file generation", () => {
);
expect(packageFile.scripts).to.have.property(
"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}"'
'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 Down
Loading