mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-05-28 18:26:54 +00:00
chore: use turborepo for type checking (#64455)
This commit is contained in:
committed by
GitHub
parent
2ce0ff1560
commit
608afa8a39
@@ -46,6 +46,7 @@
|
|||||||
"@total-typescript/ts-reset": "0.6.1",
|
"@total-typescript/ts-reset": "0.6.1",
|
||||||
"@types/jsonwebtoken": "9.0.5",
|
"@types/jsonwebtoken": "9.0.5",
|
||||||
"@types/lodash-es": "^4.17.12",
|
"@types/lodash-es": "^4.17.12",
|
||||||
|
"@types/node": "^24.10.2",
|
||||||
"@types/nodemailer": "6.4.21",
|
"@types/nodemailer": "6.4.21",
|
||||||
"@types/supertest": "2.0.16",
|
"@types/supertest": "2.0.16",
|
||||||
"@types/validator": "13.15.10",
|
"@types/validator": "13.15.10",
|
||||||
@@ -57,6 +58,7 @@
|
|||||||
"prisma": "6.19.1",
|
"prisma": "6.19.1",
|
||||||
"supertest": "6.3.3",
|
"supertest": "6.3.3",
|
||||||
"tsx": "4.21.0",
|
"tsx": "4.21.0",
|
||||||
|
"typescript": "5.9.3",
|
||||||
"vitest": "^3.2.4"
|
"vitest": "^3.2.4"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
@@ -82,6 +84,7 @@
|
|||||||
"test": "vitest run",
|
"test": "vitest run",
|
||||||
"test:watch": "vitest",
|
"test:watch": "vitest",
|
||||||
"test:ui": "vitest --ui",
|
"test:ui": "vitest --ui",
|
||||||
|
"type-check": "tsc --noEmit",
|
||||||
"prisma": "dotenv -e ../.env prisma",
|
"prisma": "dotenv -e ../.env prisma",
|
||||||
"postinstall": "prisma generate",
|
"postinstall": "prisma generate",
|
||||||
"exam-env:generate": "tsx tools/exam-environment/generate/index.ts",
|
"exam-env:generate": "tsx tools/exam-environment/generate/index.ts",
|
||||||
|
|||||||
+3
-2
@@ -35,7 +35,8 @@
|
|||||||
"serve-ci": "serve -l 8000 -c serve.json public",
|
"serve-ci": "serve -l 8000 -c serve.json public",
|
||||||
"prestand-alone": "pnpm run prebuild",
|
"prestand-alone": "pnpm run prebuild",
|
||||||
"stand-alone": "gatsby develop",
|
"stand-alone": "gatsby develop",
|
||||||
"test": "vitest"
|
"test": "vitest",
|
||||||
|
"type-check": "tsc --noEmit"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/plugin-proposal-export-default-from": "7.23.3",
|
"@babel/plugin-proposal-export-default-from": "7.23.3",
|
||||||
@@ -129,7 +130,7 @@
|
|||||||
"store": "2.0.12",
|
"store": "2.0.12",
|
||||||
"stream-browserify": "3.0.0",
|
"stream-browserify": "3.0.0",
|
||||||
"tone": "14.7.77",
|
"tone": "14.7.77",
|
||||||
"typescript": "5.2.2",
|
"typescript": "5.9.3",
|
||||||
"util": "0.12.5",
|
"util": "0.12.5",
|
||||||
"uuid": "8.3.2",
|
"uuid": "8.3.2",
|
||||||
"validator": "13.11.0",
|
"validator": "13.11.0",
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ describe('VersionEndpoint', () => {
|
|||||||
const jsonText = preElement?.textContent;
|
const jsonText = preElement?.textContent;
|
||||||
expect(jsonText).toBeTruthy();
|
expect(jsonText).toBeTruthy();
|
||||||
|
|
||||||
const parsed = JSON.parse(jsonText!) as VersionData;
|
const parsed = JSON.parse(jsonText) as VersionData;
|
||||||
expect(parsed).toHaveProperty('client');
|
expect(parsed).toHaveProperty('client');
|
||||||
expect(parsed).toHaveProperty('api');
|
expect(parsed).toHaveProperty('api');
|
||||||
expect(parsed.client).toHaveProperty('version');
|
expect(parsed.client).toHaveProperty('version');
|
||||||
@@ -83,7 +83,7 @@ describe('VersionEndpoint', () => {
|
|||||||
|
|
||||||
const preElement = screen.getByText(/"client"/);
|
const preElement = screen.getByText(/"client"/);
|
||||||
const jsonText = preElement?.textContent;
|
const jsonText = preElement?.textContent;
|
||||||
const parsed = JSON.parse(jsonText!) as VersionData;
|
const parsed = JSON.parse(jsonText) as VersionData;
|
||||||
|
|
||||||
expect(parsed.api.error).toBe('Network error');
|
expect(parsed.api.error).toBe('Network error');
|
||||||
});
|
});
|
||||||
@@ -102,7 +102,7 @@ describe('VersionEndpoint', () => {
|
|||||||
|
|
||||||
const preElement = screen.getByText(/"client"/);
|
const preElement = screen.getByText(/"client"/);
|
||||||
const jsonText = preElement?.textContent;
|
const jsonText = preElement?.textContent;
|
||||||
const parsed = JSON.parse(jsonText!) as VersionData;
|
const parsed = JSON.parse(jsonText) as VersionData;
|
||||||
|
|
||||||
expect(parsed.api.error).toBe('HTTP 500');
|
expect(parsed.api.error).toBe('HTTP 500');
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -21,6 +21,7 @@
|
|||||||
"audit-challenges": "pnpm -w turbo compile && tsx ./src/challenge-auditor/index.ts",
|
"audit-challenges": "pnpm -w turbo compile && tsx ./src/challenge-auditor/index.ts",
|
||||||
"build": "tsx ./src/generate/build-curriculum",
|
"build": "tsx ./src/generate/build-curriculum",
|
||||||
"compile": "tsc",
|
"compile": "tsc",
|
||||||
|
"type-check": "tsc --noEmit",
|
||||||
"create-empty-steps": "CALLING_DIR=$INIT_CWD tsx --tsconfig ../tsconfig.json ../tools/challenge-helper-scripts/create-empty-steps",
|
"create-empty-steps": "CALLING_DIR=$INIT_CWD tsx --tsconfig ../tsconfig.json ../tools/challenge-helper-scripts/create-empty-steps",
|
||||||
"create-next-challenge": "CALLING_DIR=$INIT_CWD tsx --tsconfig ../tsconfig.json ../tools/challenge-helper-scripts/create-next-challenge",
|
"create-next-challenge": "CALLING_DIR=$INIT_CWD tsx --tsconfig ../tsconfig.json ../tools/challenge-helper-scripts/create-next-challenge",
|
||||||
"create-this-challenge": "CALLING_DIR=$INIT_CWD tsx --tsconfig ../tsconfig.json ../tools/challenge-helper-scripts/create-this-challenge",
|
"create-this-challenge": "CALLING_DIR=$INIT_CWD tsx --tsconfig ../tsconfig.json ../tools/challenge-helper-scripts/create-this-challenge",
|
||||||
@@ -34,7 +35,7 @@
|
|||||||
"delete-challenge": "CALLING_DIR=$INIT_CWD tsx --tsconfig ../tsconfig.json ../tools/challenge-helper-scripts/delete-challenge",
|
"delete-challenge": "CALLING_DIR=$INIT_CWD tsx --tsconfig ../tsconfig.json ../tools/challenge-helper-scripts/delete-challenge",
|
||||||
"delete-task": "CALLING_DIR=$INIT_CWD tsx --tsconfig ../tsconfig.json ../tools/challenge-helper-scripts/delete-task",
|
"delete-task": "CALLING_DIR=$INIT_CWD tsx --tsconfig ../tsconfig.json ../tools/challenge-helper-scripts/delete-task",
|
||||||
"lint": "eslint --max-warnings 0",
|
"lint": "eslint --max-warnings 0",
|
||||||
"lint-challenges": "tsx --tsconfig ../tsconfig.json src/lint-localized",
|
"lint-challenges": "tsx src/lint-localized",
|
||||||
"reorder-tasks": "CALLING_DIR=$INIT_CWD tsx --tsconfig ../tsconfig.json ../tools/challenge-helper-scripts/reorder-tasks",
|
"reorder-tasks": "CALLING_DIR=$INIT_CWD tsx --tsconfig ../tsconfig.json ../tools/challenge-helper-scripts/reorder-tasks",
|
||||||
"update-challenge-order": "CALLING_DIR=$INIT_CWD tsx --tsconfig ../tsconfig.json ../tools/challenge-helper-scripts/update-challenge-order",
|
"update-challenge-order": "CALLING_DIR=$INIT_CWD tsx --tsconfig ../tsconfig.json ../tools/challenge-helper-scripts/update-challenge-order",
|
||||||
"update-step-titles": "CALLING_DIR=$INIT_CWD tsx --tsconfig ../tsconfig.json ../tools/challenge-helper-scripts/update-step-titles",
|
"update-step-titles": "CALLING_DIR=$INIT_CWD tsx --tsconfig ../tsconfig.json ../tools/challenge-helper-scripts/update-step-titles",
|
||||||
|
|||||||
+4
-2
@@ -4,7 +4,8 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"lint": "eslint --max-warnings 0",
|
"lint": "eslint --max-warnings 0",
|
||||||
"playwright:watch": "playwright test --ui-port=0",
|
"playwright:watch": "playwright test --ui-port=0",
|
||||||
"playwright:run": "playwright test"
|
"playwright:run": "playwright test",
|
||||||
|
"type-check": "tsc --noEmit"
|
||||||
},
|
},
|
||||||
"author": "freeCodeCamp <team@freecodecamp.org>",
|
"author": "freeCodeCamp <team@freecodecamp.org>",
|
||||||
"license": "BSD-3-Clause",
|
"license": "BSD-3-Clause",
|
||||||
@@ -12,6 +13,7 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@freecodecamp/eslint-config": "workspace:*",
|
"@freecodecamp/eslint-config": "workspace:*",
|
||||||
"@freecodecamp/shared": "workspace:*",
|
"@freecodecamp/shared": "workspace:*",
|
||||||
"eslint": "^9.39.1"
|
"eslint": "^9.39.1",
|
||||||
|
"typescript": "5.9.3"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-3
@@ -50,9 +50,8 @@
|
|||||||
"knip": "npx -y knip@5 --include files",
|
"knip": "npx -y knip@5 --include files",
|
||||||
"knip:all": "npx -y knip@5 ",
|
"knip:all": "npx -y knip@5 ",
|
||||||
"lint-root": "pnpm npm-run-all lint:*",
|
"lint-root": "pnpm npm-run-all lint:*",
|
||||||
"lint": "turbo lint && turbo lint-root",
|
"lint": "turbo type-check && turbo lint && turbo lint-root",
|
||||||
"lint:challenges": "cd ./curriculum && pnpm run lint-challenges",
|
"lint:challenges": "cd ./curriculum && pnpm run lint-challenges",
|
||||||
"lint:ts": "tsc && tsc -p packages/shared && tsc -p api && tsc -p client && tsc -p curriculum && tsc -p e2e && tsc -p tools/challenge-helper-scripts",
|
|
||||||
"lint:prettier": "prettier --list-different .",
|
"lint:prettier": "prettier --list-different .",
|
||||||
"lint:css": "stylelint '**/*.css'",
|
"lint:css": "stylelint '**/*.css'",
|
||||||
"preseed": "turbo compile",
|
"preseed": "turbo compile",
|
||||||
@@ -108,7 +107,7 @@
|
|||||||
"stylelint": "16.14.1",
|
"stylelint": "16.14.1",
|
||||||
"tsx": "4.19.1",
|
"tsx": "4.19.1",
|
||||||
"turbo": "^2.6.1",
|
"turbo": "^2.6.1",
|
||||||
"typescript": "5.7.3",
|
"typescript": "5.9.3",
|
||||||
"webpack-bundle-analyzer": "4.10.1",
|
"webpack-bundle-analyzer": "4.10.1",
|
||||||
"yargs": "17.7.2"
|
"yargs": "17.7.2"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
"eslint-plugin-react": "7.37.4",
|
"eslint-plugin-react": "7.37.4",
|
||||||
"eslint-plugin-react-hooks": "4.6.0",
|
"eslint-plugin-react-hooks": "4.6.0",
|
||||||
"eslint-plugin-testing-library": "7.1.1",
|
"eslint-plugin-testing-library": "7.1.1",
|
||||||
"typescript": "5.7.3",
|
"typescript": "5.9.3",
|
||||||
"typescript-eslint": "^8.47.0"
|
"typescript-eslint": "^8.47.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,6 +11,7 @@
|
|||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "vitest",
|
"test": "vitest",
|
||||||
|
"type-check": "tsc --noEmit",
|
||||||
"compile": "tsdown --format cjs --format esm",
|
"compile": "tsdown --format cjs --format esm",
|
||||||
"lint": "eslint --max-warnings 0"
|
"lint": "eslint --max-warnings 0"
|
||||||
},
|
},
|
||||||
|
|||||||
Generated
+201
-412
File diff suppressed because it is too large
Load Diff
@@ -6,7 +6,8 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "tsx server.ts",
|
"start": "tsx server.ts",
|
||||||
"postinstall": "shx cp ./sample.env ./.env",
|
"postinstall": "shx cp ./sample.env ./.env",
|
||||||
"lint": "eslint --max-warnings 0"
|
"lint": "eslint --max-warnings 0",
|
||||||
|
"type-check": "tsc --noEmit"
|
||||||
},
|
},
|
||||||
"author": "freeCodeCamp",
|
"author": "freeCodeCamp",
|
||||||
"license": "BSD-3-Clause",
|
"license": "BSD-3-Clause",
|
||||||
@@ -23,6 +24,6 @@
|
|||||||
"dotenv": "16.4.5",
|
"dotenv": "16.4.5",
|
||||||
"eslint": "^9.39.1",
|
"eslint": "^9.39.1",
|
||||||
"shx": "0.3.4",
|
"shx": "0.3.4",
|
||||||
"typescript": "5.2.2"
|
"typescript": "5.9.3"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,7 +8,6 @@
|
|||||||
"react": "17.0.2",
|
"react": "17.0.2",
|
||||||
"react-dom": "17.0.2",
|
"react-dom": "17.0.2",
|
||||||
"react-router-dom": "6.18.0",
|
"react-router-dom": "6.18.0",
|
||||||
"typescript": "5.2.2",
|
|
||||||
"vite": "4.5.2"
|
"vite": "4.5.2"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
@@ -16,6 +15,7 @@
|
|||||||
"build": "tsc && vite build",
|
"build": "tsc && vite build",
|
||||||
"lint": "eslint --max-warnings 0",
|
"lint": "eslint --max-warnings 0",
|
||||||
"test": "echo \"no tests here yet\"",
|
"test": "echo \"no tests here yet\"",
|
||||||
|
"type-check": "tsc --noEmit",
|
||||||
"postinstall": "shx cp ./sample.env ./.env"
|
"postinstall": "shx cp ./sample.env ./.env"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
@@ -25,6 +25,7 @@
|
|||||||
"@types/react-dom": "17.0.19",
|
"@types/react-dom": "17.0.19",
|
||||||
"@uiw/react-codemirror": "3.2.10",
|
"@uiw/react-codemirror": "3.2.10",
|
||||||
"eslint": "^9.39.1",
|
"eslint": "^9.39.1",
|
||||||
"shx": "0.3.4"
|
"shx": "0.3.4",
|
||||||
|
"typescript": "5.9.3"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,7 +25,8 @@
|
|||||||
"create-quiz": "tsx create-quiz",
|
"create-quiz": "tsx create-quiz",
|
||||||
"rename-block": "tsx rename-block",
|
"rename-block": "tsx rename-block",
|
||||||
"lint": "eslint --max-warnings 0",
|
"lint": "eslint --max-warnings 0",
|
||||||
"test": "vitest"
|
"test": "vitest",
|
||||||
|
"type-check": "tsc --noEmit"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@freecodecamp/eslint-config": "workspace:*",
|
"@freecodecamp/eslint-config": "workspace:*",
|
||||||
@@ -40,7 +41,7 @@
|
|||||||
"gray-matter": "4.0.3",
|
"gray-matter": "4.0.3",
|
||||||
"inquirer": "8.2.6",
|
"inquirer": "8.2.6",
|
||||||
"prettier": "3.2.5",
|
"prettier": "3.2.5",
|
||||||
"typescript": "5.2.2",
|
"typescript": "5.9.3",
|
||||||
"vitest": "^3.2.4"
|
"vitest": "^3.2.4"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,7 +20,8 @@
|
|||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"lint": "eslint --max-warnings 0",
|
"lint": "eslint --max-warnings 0",
|
||||||
"test": "vitest"
|
"test": "vitest",
|
||||||
|
"type-check": "tsc --noEmit"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"hast-util-to-html": "7.1.3",
|
"hast-util-to-html": "7.1.3",
|
||||||
@@ -57,6 +58,7 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@freecodecamp/eslint-config": "workspace:*",
|
"@freecodecamp/eslint-config": "workspace:*",
|
||||||
"eslint": "^9.39.1",
|
"eslint": "^9.39.1",
|
||||||
|
"typescript": "5.9.3",
|
||||||
"unist-util-select": "3.0.4",
|
"unist-util-select": "3.0.4",
|
||||||
"vitest": "^3.2.4"
|
"vitest": "^3.2.4"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -39,7 +39,7 @@
|
|||||||
"process": "0.11.10",
|
"process": "0.11.10",
|
||||||
"pyodide": "^0.23.3",
|
"pyodide": "^0.23.3",
|
||||||
"sass.js": "0.11.1",
|
"sass.js": "0.11.1",
|
||||||
"typescript": "5.9.2",
|
"typescript": "5.9.3",
|
||||||
"util": "0.12.5",
|
"util": "0.12.5",
|
||||||
"webpack": "5.90.3",
|
"webpack": "5.90.3",
|
||||||
"webpack-cli": "4.10.0"
|
"webpack-cli": "4.10.0"
|
||||||
|
|||||||
@@ -4,7 +4,8 @@
|
|||||||
"main": "seed-daily-challenges.js",
|
"main": "seed-daily-challenges.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"seed-daily-challenges": "tsx seed-daily-challenges.ts",
|
"seed-daily-challenges": "tsx seed-daily-challenges.ts",
|
||||||
"lint": "eslint --max-warnings 0"
|
"lint": "eslint --max-warnings 0",
|
||||||
|
"type-check": "tsc --noEmit"
|
||||||
},
|
},
|
||||||
"author": "",
|
"author": "",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
@@ -15,7 +16,7 @@
|
|||||||
"eslint": "^9.39.1",
|
"eslint": "^9.39.1",
|
||||||
"mongodb": "6.10.0",
|
"mongodb": "6.10.0",
|
||||||
"tsx": "4.19.1",
|
"tsx": "4.19.1",
|
||||||
"typescript": "5.8.2"
|
"typescript": "5.9.3"
|
||||||
},
|
},
|
||||||
"type": "module"
|
"type": "module"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +0,0 @@
|
|||||||
{
|
|
||||||
"include": [
|
|
||||||
"curriculum/*.test.ts",
|
|
||||||
"tools/challenge-editor/**/*",
|
|
||||||
"tools/scripts/**/*.ts",
|
|
||||||
"tools/daily-challenges/**/*.ts"
|
|
||||||
],
|
|
||||||
"extends": "./tsconfig-base.json"
|
|
||||||
}
|
|
||||||
@@ -2,6 +2,7 @@
|
|||||||
"$schema": "https://turborepo.com/schema.json",
|
"$schema": "https://turborepo.com/schema.json",
|
||||||
"tasks": {
|
"tasks": {
|
||||||
"lint": { "dependsOn": ["compile"] },
|
"lint": { "dependsOn": ["compile"] },
|
||||||
|
"type-check": { "dependsOn": ["compile"] },
|
||||||
"@freecodecamp/client#lint": {
|
"@freecodecamp/client#lint": {
|
||||||
"dependsOn": [
|
"dependsOn": [
|
||||||
"@freecodecamp/curriculum#compile",
|
"@freecodecamp/curriculum#compile",
|
||||||
@@ -9,6 +10,14 @@
|
|||||||
"build:scripts"
|
"build:scripts"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"@freecodecamp/client#type-check": {
|
||||||
|
"dependsOn": [
|
||||||
|
"@freecodecamp/curriculum#compile",
|
||||||
|
"create:env",
|
||||||
|
"@freecodecamp/curriculum#build",
|
||||||
|
"build:scripts"
|
||||||
|
]
|
||||||
|
},
|
||||||
"@freecodecamp/gatsby-source-challenges#lint": {
|
"@freecodecamp/gatsby-source-challenges#lint": {
|
||||||
"dependsOn": ["@freecodecamp/curriculum#compile"]
|
"dependsOn": ["@freecodecamp/curriculum#compile"]
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user