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

chore(repo): Scoping Turborepo task inputs #1882

Merged
merged 4 commits into from
Oct 19, 2023
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
2 changes: 2 additions & 0 deletions .changeset/dull-ducks-dance.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
---
File renamed without changes.
80 changes: 40 additions & 40 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,45 @@
{
"name": "@clerk/javascript",
"version": "0.0.0",
"private": true,
"license": "MIT",
"workspaces": {
"packages": [
"packages/*"
]
},
"license": "MIT",
"version": "0.0.0",
"private": true,
"packageManager": "[email protected]",
"engines": {
"node": ">=16.8.0",
"npm": ">=8.5.0"
"scripts": {
"build": "FORCE_COLOR=1 turbo build --concurrency=${TURBO_CONCURRENCY:-80%}",
"bundlewatch": "turbo bundlewatch",
"changeset": "changeset",
"changeset:empty": "npm run changeset -- --empty",
"clean": "turbo clean",
"dev": "FORCE_COLOR=1 turbo dev --filter=@clerk/* --filter=!@clerk/expo",
"dev:js": "FORCE_COLOR=1 turbo dev:current --filter=@clerk/clerk-js",
"format": "prettier --write .",
"format:check": "prettier --cache --check .",
"lint": "FORCE_COLOR=1 turbo lint",
"lint:attw": "FORCE_COLOR=1 turbo lint:attw",
"lint:fix": "FORCE_COLOR=1 turbo lint -- --fix",
"lint:publint": "FORCE_COLOR=1 turbo lint:publint",
"nuke": "./scripts/nuke.sh",
"prepare": "husky install",
"release": "TURBO_FORCE=true FORCE_COLOR=1 npm run build -- --force && changeset publish && git push --follow-tags",
"release:snapshot": "TURBO_FORCE=true FORCE_COLOR=1 npm run build && changeset publish --tag snapshot --no-git-tag",
"release:staging": "TURBO_FORCE=true FORCE_COLOR=1 npm run build && changeset publish --tag staging --no-git-tag",
"release:verdaccio": "if [ \"$(npm config get registry)\" = \"https://registry.npmjs.org/\" ]; then echo 'Error: Using default registry' && exit 1; else TURBO_FORCE=true TURBO_CONCURRENCY=4 npm run build && changeset publish --no-git-tag; fi",
"test": "FORCE_COLOR=1 turbo test --concurrency=${TURBO_CONCURRENCY:-80%}",
"test:ci": "FORCE_COLOR=1 turbo test --concurrency=${TURBO_CONCURRENCY:-80%}",
"test:integration:base": "DEBUG=1 npx playwright test --config integration/playwright.config.ts",
"test:integration:deployment:nextjs": "DEBUG=1 npx playwright test --config integration/playwright.deployments.config.ts",
"test:integration:generic": "E2E_APP_ID=react.vite.* npm run test:integration:base -- --grep @generic",
"test:integration:nextjs": "E2E_APP_ID=next.appRouter.withEmailCodes npm run test:integration:base -- --grep \"@generic|@nextjs\"",
"test:integration:remix": "echo 'placeholder'",
"update:lockfile": "npm run nuke && npm install -D --arch=x64 --platform=linux turbo && npm install -D --arch=arm64 --platform=darwin turbo",
"version": "changeset version && ./scripts/version-info.sh",
"version:snapshot": "./scripts/snapshot.mjs",
"version:staging": "./scripts/staging.mjs",
"yalc:all": "for d in packages/*/; do echo $d; cd $d; yalc push --replace --sig; cd '../../'; done"
},
"devDependencies": {
"@arethetypeswrong/cli": "^0.12.1",
Expand Down Expand Up @@ -45,9 +73,9 @@
"husky": "^8.0.3",
"jest": "^29.3.1",
"jest-environment-jsdom": "^29.3.1",
"lint-staged": "^14.0.1",
"npm-cli-adduser": "^1.1.4",
"npm-cli-login": "^1.0.0",
"lint-staged": "^14.0.1",
"prettier": "^2.8.7",
"publint": "^0.2.4",
"react": "18.2.0",
Expand All @@ -61,37 +89,9 @@
"verdaccio": "^5.26.3",
"zx": "^7.2.3"
},
"scripts": {
"dev": "FORCE_COLOR=1 turbo dev --filter=@clerk/* --filter=!@clerk/expo",
"dev:js": "FORCE_COLOR=1 turbo dev:current --filter=@clerk/clerk-js",
"build": "FORCE_COLOR=1 turbo build --concurrency=${TURBO_CONCURRENCY:-80%}",
"test": "FORCE_COLOR=1 turbo test --concurrency=${TURBO_CONCURRENCY:-80%}",
"test:ci": "FORCE_COLOR=1 turbo test --concurrency=${TURBO_CONCURRENCY:-80%}",
"test:integration:base": "DEBUG=1 npx playwright test --config integration/playwright.config.ts",
"test:integration:generic": "E2E_APP_ID=react.vite.* npm run test:integration:base -- --grep @generic",
"test:integration:nextjs": "E2E_APP_ID=next.appRouter.withEmailCodes npm run test:integration:base -- --grep \"@generic|@nextjs\"",
"test:integration:remix": "echo 'placeholder'",
"test:integration:deployment:nextjs": "DEBUG=1 npx playwright test --config integration/playwright.deployments.config.ts",
"clean": "turbo clean",
"lint": "FORCE_COLOR=1 turbo lint",
"lint:publint": "FORCE_COLOR=1 turbo lint:publint",
"lint:attw": "FORCE_COLOR=1 turbo lint:attw",
"lint:fix": "FORCE_COLOR=1 turbo lint -- --fix",
"bundlewatch": "turbo bundlewatch",
"format": "prettier --write .",
"format:check": "prettier --cache --check .",
"nuke": "./scripts/nuke.sh",
"yalc:all": "for d in packages/*/; do echo $d; cd $d; yalc push --replace --sig; cd '../../'; done",
"prepare": "husky install",
"changeset": "changeset",
"changeset:empty": "npm run changeset -- --empty",
"version": "changeset version && ./scripts/version-info.sh",
"version:snapshot": "./scripts/snapshot.mjs",
"version:staging": "./scripts/staging.mjs",
"release": "FORCE_COLOR=1 npm run build -- --force && changeset publish && git push --follow-tags",
"release:snapshot": "FORCE_COLOR=1 npm run build && changeset publish --tag snapshot --no-git-tag",
"release:staging": "FORCE_COLOR=1 npm run build && changeset publish --tag staging --no-git-tag",
"release:verdaccio": "if [ \"$(npm config get registry)\" = \"https://registry.npmjs.org/\" ]; then echo 'Error: Using default registry' && exit 1; else TURBO_CONCURRENCY=4 npm run build && changeset publish --no-git-tag; fi",
"update:lockfile": "npm run nuke && npm install -D --arch=x64 --platform=linux turbo && npm install -D --arch=arm64 --platform=darwin turbo"
"packageManager": "[email protected]",
"engines": {
"node": ">=16.8.0",
"npm": ">=8.5.0"
}
}
2 changes: 1 addition & 1 deletion packages/chrome-extension/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module.exports = {

roots: ['<rootDir>/src'],
testEnvironment: 'jsdom',
setupFilesAfterEnv: ['<rootDir>../../setupJest.afterEnv.ts'],
setupFilesAfterEnv: ['<rootDir>../../jest.setup-after-env.ts'],

moduleDirectories: ['node_modules', '<rootDir>/src'],
transform: {
Expand Down
6 changes: 3 additions & 3 deletions packages/clerk-js/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ const config = {
displayName: 'clerk-js',
injectGlobals: true,

testEnvironment: '<rootDir>/jsdom-with-timezone.ts',
testEnvironment: '<rootDir>/jest.jsdom-with-timezone.ts',
roots: ['<rootDir>/src'],
setupFiles: ['./setupJest.ts'],
setupFilesAfterEnv: ['./setupJestAfterEnv.ts'],
setupFiles: ['./jest.setup.ts'],
setupFilesAfterEnv: ['./jest.setup-after-env.ts'],
testRegex: [
'/__tests__/(.+/)*.*.test.[jt]sx?$',
'/ui/.*/__tests__/.*.test.[jt]sx?$',
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion packages/clerk-js/tsconfig.test.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "./tsconfig.json",
"include": ["src/**/*", "./setupJestAfterEnv.ts"],
"include": ["src/**/*", "./jest.setup-after-env.ts"],
"exclude": ["node_modules"]
}
69 changes: 69 additions & 0 deletions packages/clerk-js/turbo.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
{
"extends": ["//"],
"pipeline": {
"build": {
"inputs": [
"*.d.ts",
"**/package.json",
"bundlewatch.config.json",
"headless/**",
"src/**",
"tsconfig.json",
"tsconfig.build.json",
"tsconfig.declarations.json",
"tsup.config.ts",
"webpack.config.js",

"!**/**/*.test.*",
"!**/test/**",
"!**/tests/**",
"!**/__tests__/**",
"!**/__mocks__/**",
"!**/__snapshots__/**",
"!coverage/**",
"!examples/**",
"!node_modules/**"
]
},
"test": {
"inputs": [
"*.d.ts",
"**/package.json",
"bundlewatch.config.json",
"jest.*",
"src/**",
"svgTransform.js",
"tests/**",
"tsconfig.json",
"tsconfig.*.json",
"tsup.config.ts",
"webpack.config.js",

"!**/__snapshots__/**",
"!coverage/**",
"!examples/**",
"!node_modules/**"
]
},
"test:ci": {
"dependsOn": ["build"],
"inputs": [
"*.d.ts",
"**/package.json",
"bundlewatch.config.json",
"jest.*",
"src/**",
"tests/**",
"tsconfig.json",
"tsconfig.*.json",
"tsup.config.ts",
"webpack.config.js",

"!**/__snapshots__/**",
"!coverage/**",
"!examples/**",
"!node_modules/**"
]
}
}
}
2 changes: 1 addition & 1 deletion packages/react/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module.exports = {

roots: ['<rootDir>/src'],
testEnvironment: 'jsdom',
setupFilesAfterEnv: ['<rootDir>../../setupJest.afterEnv.ts'],
setupFilesAfterEnv: ['<rootDir>../../jest.setup-after-env.ts'],

moduleDirectories: ['node_modules', '<rootDir>/src'],
transform: {
Expand Down
2 changes: 1 addition & 1 deletion packages/sdk-node/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module.exports = {
transform: {
'^.+\\.ts$': 'ts-jest',
},
setupFiles: ['<rootDir>/setupEnvVars.js'],
setupFiles: ['<rootDir>/jest.setup.js'],
collectCoverage: true,
// Jest currently does not support package.json subpath imports
// so we manually map them to the actual files. See @clerk/backend/package.json
Expand Down
File renamed without changes.
28 changes: 28 additions & 0 deletions packages/sdk-node/turbo.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"extends": ["//"],
"pipeline": {
"build": {
"inputs": [
"*.d.ts",
"**/package.json",
"cjs/**",
"esm/**",
"src/**",
"scripts/**",
"tsconfig.json",
"tsconfig.declarations.json",
"tsup.config.ts",

"!**/**/*.test.*",
"!**/test/**",
"!**/tests/**",
"!**/__tests__/**",
"!**/__mocks__/**",
"!**/__snapshots__/**",
"!coverage/**",
"!examples/**",
"!node_modules/**"
]
}
}
}
2 changes: 1 addition & 1 deletion packages/shared/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const config = {

testEnvironment: 'jsdom',
roots: ['<rootDir>/src'],
setupFiles: ['./setupJest.ts'],
setupFiles: ['./jest.setup.ts'],

collectCoverage: false,
coverageProvider: 'v8',
Expand Down
File renamed without changes.
16 changes: 8 additions & 8 deletions tsconfig.eslint.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@
"allowJs": true
},
"include": [
".eslintrc.js",
"commitlint.config.js",
"jest.*.ts",
"integration/*/*.js",
"integration/**/*.ts",
"integration/**/*.tsx",
"packages/*/src",
"packages/*/*.js",
"packages/**/*.ts",
"packages/**/*.tsx",
"packages/*/*.js",
"integration/**/*.ts",
"integration/**/*.tsx",
"integration/*/*.js",
".eslintrc.js",
"commitlint.config.js",
"scripts/*.mjs",
"setupJest.afterEnv.ts"
"scripts/*.mjs"
]
}
Loading
Loading