Unverified Commit 9db9b8ef authored by Sebastian "Sebbie" Silbermann's avatar Sebastian "Sebbie" Silbermann Committed by GitHub

Remove `tsec` (#98423)

tsec enforces nothing today. Of its 22 rules, 16 have no callsite in the
four packages it checks, 5 find violations that are all suppressed by
tsec-exemptions.json, and ban-element-innerhtml-assignments has been
inert since TypeScript dropped the `InnerHTML` mixin from lib.dom.d.ts,
so its matcher resolves to no type. Net enforced findings: zero.

font, third-parties and next-playwright never extended
tsconfig-tsec.json, so they ran all 22 rules over source with no DOM
sinks at all, paying a full extra type-check each for nothing.
parent f17979b0
...@@ -288,7 +288,6 @@ ...@@ -288,7 +288,6 @@
"tailwindcss": "3.2.7", "tailwindcss": "3.2.7",
"taskr": "1.1.0", "taskr": "1.1.0",
"tree-kill": "1.2.2", "tree-kill": "1.2.2",
"tsec": "0.2.1",
"tsx": "4.19.2", "tsx": "4.19.2",
"turbo": "2.9.4", "turbo": "2.9.4",
"typescript": "6.0.2", "typescript": "6.0.2",
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
"scripts": { "scripts": {
"build": "node ../../scripts/rm.mjs dist && pnpm ncc-fontkit && tsc -d -p tsconfig.build.json", "build": "node ../../scripts/rm.mjs dist && pnpm ncc-fontkit && tsc -d -p tsconfig.build.json",
"dev": "pnpm ncc-fontkit && tsc -d -w -p tsconfig.json", "dev": "pnpm ncc-fontkit && tsc -d -w -p tsconfig.json",
"typescript": "tsec --noEmit -p tsconfig.json", "typescript": "tsc --noEmit -p tsconfig.json",
"ncc-fontkit": "ncc build ./fontkit.js --minify -o dist/fontkit", "ncc-fontkit": "ncc build ./fontkit.js --minify -o dist/fontkit",
"pack-for-isolated-tests": "pnpm pack --out ./packed.tgz" "pack-for-isolated-tests": "pnpm pack --out ./packed.tgz"
}, },
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
"scripts": { "scripts": {
"build": "node ../../scripts/rm.mjs dist && tsc -d -p tsconfig.json", "build": "node ../../scripts/rm.mjs dist && tsc -d -p tsconfig.json",
"dev": "tsc -d -w -p tsconfig.json", "dev": "tsc -d -w -p tsconfig.json",
"typescript": "tsec --noEmit -p tsconfig.json" "typescript": "tsc --noEmit -p tsconfig.json"
}, },
"peerDependencies": { "peerDependencies": {
"@playwright/test": ">=1.0.0" "@playwright/test": ">=1.0.0"
......
...@@ -84,7 +84,7 @@ ...@@ -84,7 +84,7 @@
"dev": "cross-env NEXT_SERVER_NO_MANGLE=1 taskr", "dev": "cross-env NEXT_SERVER_NO_MANGLE=1 taskr",
"build": "taskr release", "build": "taskr release",
"types": "tsc --project tsconfig.build.json --declaration --emitDeclarationOnly --stripInternal --declarationDir dist", "types": "tsc --project tsconfig.build.json --declaration --emitDeclarationOnly --stripInternal --declarationDir dist",
"typescript": "tsec --noEmit", "typescript": "tsc --noEmit",
"ncc-compiled": "taskr ncc", "ncc-compiled": "taskr ncc",
"storybook": "BROWSER=none storybook dev -p 6006", "storybook": "BROWSER=none storybook dev -p 6006",
"build-storybook": "storybook build", "build-storybook": "storybook build",
......
{ {
"extends": "../../tsconfig-tsec.json",
"compilerOptions": { "compilerOptions": {
"strict": true, "strict": true,
"stripInternal": true, "stripInternal": true,
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
"scripts": { "scripts": {
"build": "node ../../scripts/rm.mjs dist && tsc -d -p tsconfig.json", "build": "node ../../scripts/rm.mjs dist && tsc -d -p tsconfig.json",
"dev": "tsc -d -w -p tsconfig.json", "dev": "tsc -d -w -p tsconfig.json",
"typescript": "tsec --noEmit -p tsconfig.json", "typescript": "tsc --noEmit -p tsconfig.json",
"pack-for-isolated-tests": "pnpm pack --out ./packed.tgz" "pack-for-isolated-tests": "pnpm pack --out ./packed.tgz"
}, },
"dependencies": { "dependencies": {
......
...@@ -601,9 +601,6 @@ importers: ...@@ -601,9 +601,6 @@ importers:
tree-kill: tree-kill:
specifier: 1.2.2 specifier: 1.2.2
version: 1.2.2 version: 1.2.2
tsec:
specifier: 0.2.1
version: 0.2.1(@bazel/bazelisk@1.19.0)(typescript@6.0.2)
tsx: tsx:
specifier: 4.19.2 specifier: 4.19.2
version: 4.19.2 version: 4.19.2
...@@ -1956,7 +1953,7 @@ importers: ...@@ -1956,7 +1953,7 @@ importers:
devDependencies: devDependencies:
'@napi-rs/cli': '@napi-rs/cli':
specifier: 3.7.2 specifier: 3.7.2
version: 3.7.2(@emnapi/runtime@1.9.2)(@types/node@20.17.7(patch_hash=fe6957869a9b616ec526ededb72bbe846b863bd2349204218772df5c1e62d6ab))(node-addon-api@6.1.0) version: 3.7.2(@emnapi/runtime@1.11.2)(@types/node@20.17.7(patch_hash=fe6957869a9b616ec526ededb72bbe846b863bd2349204218772df5c1e62d6ab))(node-addon-api@6.1.0)
cross-env: cross-env:
specifier: 6.0.3 specifier: 6.0.3
version: 6.0.3 version: 6.0.3
...@@ -2922,10 +2919,6 @@ packages: ...@@ -2922,10 +2919,6 @@ packages:
'@types/react': '@types/react':
optional: true optional: true
'@bazel/bazelisk@1.19.0':
resolution: {integrity: sha512-8PyRGRj/CN286IFHVILgYZ2lQ/JvgQ25ZEgoUAkpSnGmbPdQnKyHtTGEG+Sf0AISFqP5+PPzN162DcizZ/bR9w==}
hasBin: true
'@bcoe/v8-coverage@0.2.3': '@bcoe/v8-coverage@0.2.3':
resolution: {integrity: sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==} resolution: {integrity: sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==}
...@@ -17839,13 +17832,6 @@ packages: ...@@ -17839,13 +17832,6 @@ packages:
resolution: {integrity: sha512-NoZ4roiN7LnbKn9QqE1amc9DJfzvZXxF4xDavcOWt1BPkdx+m+0gJuPM+S0vCe7zTJMYUP0R8pO2XMr+Y8oLIg==} resolution: {integrity: sha512-NoZ4roiN7LnbKn9QqE1amc9DJfzvZXxF4xDavcOWt1BPkdx+m+0gJuPM+S0vCe7zTJMYUP0R8pO2XMr+Y8oLIg==}
engines: {node: '>=6'} engines: {node: '>=6'}
tsec@0.2.1:
resolution: {integrity: sha512-RP9vhbRbRI9VH4CfOlQvo5W9HdfiPKq0gdiUOWI5oKmLaZKNFN8CsPwBfT5ySmhnKNwmmAS/BtY3WoTfABwwig==}
hasBin: true
peerDependencies:
'@bazel/bazelisk': '>=1.7.5'
typescript: '>=3.9.2'
tslib@1.11.1: tslib@1.11.1:
resolution: {integrity: sha512-aZW88SY8kQbU7gpV19lN24LtXh/yD4ZZg6qieAJDDg+YBsJcSmLGK9QpnUjAKVG/xefmvJGd1WUmfpT/g6AJGA==} resolution: {integrity: sha512-aZW88SY8kQbU7gpV19lN24LtXh/yD4ZZg6qieAJDDg+YBsJcSmLGK9QpnUjAKVG/xefmvJGd1WUmfpT/g6AJGA==}
...@@ -20061,8 +20047,6 @@ snapshots: ...@@ -20061,8 +20047,6 @@ snapshots:
optionalDependencies: optionalDependencies:
'@types/react': 19.2.18 '@types/react': 19.2.18
'@bazel/bazelisk@1.19.0': {}
'@bcoe/v8-coverage@0.2.3': {} '@bcoe/v8-coverage@0.2.3': {}
'@braintree/sanitize-url@6.0.4': {} '@braintree/sanitize-url@6.0.4': {}
...@@ -21874,7 +21858,7 @@ snapshots: ...@@ -21874,7 +21858,7 @@ snapshots:
transitivePeerDependencies: transitivePeerDependencies:
- supports-color - supports-color
'@napi-rs/cli@3.7.2(@emnapi/runtime@1.9.2)(@types/node@20.17.7(patch_hash=fe6957869a9b616ec526ededb72bbe846b863bd2349204218772df5c1e62d6ab))(node-addon-api@6.1.0)': '@napi-rs/cli@3.7.2(@emnapi/runtime@1.11.2)(@types/node@20.17.7(patch_hash=fe6957869a9b616ec526ededb72bbe846b863bd2349204218772df5c1e62d6ab))(node-addon-api@6.1.0)':
dependencies: dependencies:
'@inquirer/prompts': 8.5.2(@types/node@20.17.7(patch_hash=fe6957869a9b616ec526ededb72bbe846b863bd2349204218772df5c1e62d6ab)) '@inquirer/prompts': 8.5.2(@types/node@20.17.7(patch_hash=fe6957869a9b616ec526ededb72bbe846b863bd2349204218772df5c1e62d6ab))
'@napi-rs/cross-toolchain': 1.0.3 '@napi-rs/cross-toolchain': 1.0.3
...@@ -21889,7 +21873,7 @@ snapshots: ...@@ -21889,7 +21873,7 @@ snapshots:
semver: 7.8.5 semver: 7.8.5
typanion: 3.14.0 typanion: 3.14.0
optionalDependencies: optionalDependencies:
'@emnapi/runtime': 1.9.2 '@emnapi/runtime': 1.11.2
transitivePeerDependencies: transitivePeerDependencies:
- '@napi-rs/cross-toolchain-arm64-target-aarch64' - '@napi-rs/cross-toolchain-arm64-target-aarch64'
- '@napi-rs/cross-toolchain-arm64-target-armv7' - '@napi-rs/cross-toolchain-arm64-target-armv7'
...@@ -37717,13 +37701,6 @@ snapshots: ...@@ -37717,13 +37701,6 @@ snapshots:
minimist: 1.2.8 minimist: 1.2.8
strip-bom: 3.0.0 strip-bom: 3.0.0
tsec@0.2.1(@bazel/bazelisk@1.19.0)(typescript@6.0.2):
dependencies:
'@bazel/bazelisk': 1.19.0
glob: 7.1.7
minimatch: 3.1.2
typescript: 6.0.2
tslib@1.11.1: {} tslib@1.11.1: {}
tslib@1.14.1: {} tslib@1.14.1: {}
{
"compilerOptions": {
"plugins": [
{
"name": "tsec",
"exemptionConfig": "./tsec-exemptions.json"
}
]
}
}
{
"ban-element-innerhtml-assignments": [
"packages/next/src/client/head-manager.ts",
"packages/next/src/client/script.tsx",
"packages/next/src/client/dev/dev-build-watcher.ts",
"packages/next/src/client/app-bootstrap.ts",
"packages/next/src/client/components/prerender-indicator.ts"
],
"ban-element-setattribute": [
"packages/next/src/client/head-manager.ts",
"packages/next/src/client/script.tsx",
"packages/next/src/client/set-attributes-from-props.ts",
"packages/next/src/build/webpack/loaders/next-style-loader/runtime/injectStylesIntoLinkTag.ts",
"packages/next/src/build/webpack/loaders/next-style-loader/runtime/injectStylesIntoStyleTag.ts",
"packages/next/src/client/app-bootstrap.ts",
"packages/next/src/client/components/errors/graceful-degrade-boundary.tsx"
],
"ban-script-appendchild-calls": [
"packages/next/src/next-devtools/dev-overlay.browser.tsx"
],
"ban-script-content-assignments": ["packages/next/src/client/script.tsx"],
"ban-script-src-assignments": [
"packages/next/src/client/script.tsx",
"packages/next/src/client/app-bootstrap.ts"
],
"ban-trustedtypes-createpolicy": ["packages/next/src/client/trusted-types.ts"]
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment