From 35544c5763c57c963268c4abe349115776e3f840 Mon Sep 17 00:00:00 2001 From: Andrew Branch Date: Sat, 7 Oct 2023 23:30:35 -0700 Subject: [PATCH] Fix crash from missing optional chain --- .changeset/nervous-berries-attack.md | 5 + .../checks/exportDefaultDisagreement.ts | 4 +- .../core/test/fixtures/emoji-regex@10.0.0.tgz | Bin 0 -> 5181 bytes .../snapshots/emoji-regex@10.0.0.tgz.json | 335 ++++++++++++++++++ 4 files changed, 342 insertions(+), 2 deletions(-) create mode 100644 .changeset/nervous-berries-attack.md create mode 100644 packages/core/test/fixtures/emoji-regex@10.0.0.tgz create mode 100644 packages/core/test/snapshots/emoji-regex@10.0.0.tgz.json diff --git a/.changeset/nervous-berries-attack.md b/.changeset/nervous-berries-attack.md new file mode 100644 index 0000000..404747d --- /dev/null +++ b/.changeset/nervous-berries-attack.md @@ -0,0 +1,5 @@ +--- +"@arethetypeswrong/core": patch +--- + +Fix crash from missing optional chain diff --git a/packages/core/src/internal/checks/exportDefaultDisagreement.ts b/packages/core/src/internal/checks/exportDefaultDisagreement.ts index e024907..0950692 100644 --- a/packages/core/src/internal/checks/exportDefaultDisagreement.ts +++ b/packages/core/src/internal/checks/exportDefaultDisagreement.ts @@ -22,13 +22,13 @@ export default defineCheck({ const host = context.hosts.findHostForFiles([typesFileName])!; const typesSourceFile = host.getSourceFile(typesFileName)!; ts.bindSourceFile(typesSourceFile, bindOptions); - const typesExports = typesSourceFile.symbol.exports; + const typesExports = typesSourceFile.symbol?.exports; if (!typesExports) { return; } const implementationSourceFile = host.getSourceFile(implementationFileName)!; ts.bindSourceFile(implementationSourceFile, bindOptions); - const implExports = implementationSourceFile.symbol.exports; + const implExports = implementationSourceFile.symbol?.exports; if (!implExports) { return; } diff --git a/packages/core/test/fixtures/emoji-regex@10.0.0.tgz b/packages/core/test/fixtures/emoji-regex@10.0.0.tgz new file mode 100644 index 0000000000000000000000000000000000000000..0649be97346a87a40b268a13774f10f835a0d6aa GIT binary patch literal 5181 zcmV-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}w`XEo!b*D{WS+CViJZPZXLJ+1AHCpFL+nUO3GR#P!=|U}(Opyj zUpP{|*Ew$Xe@!tf-v8)N{{NF)UOKv>{eCZJLgQ zY=g}X`D)YVenQK0R2;%kUd18Fu=C1D0?y}#*xU2Z7-AI}(MGMCaMGufoGLS3i6wr6 z%dtthU=~w4Ocath6SB^^+YlLBS{rdd^8zBwd)cGSLP-*W=zKCB@+1rgY2B0{!;Ej^ zvz${|+?@=&363l&A3UI@=rny7Ll&X&VM@uJfLo-UbFCIlS&wfmPUD&YOzaLLNt`jC zo;+xnCxkstrivp{nRUty4_*dre>Xh%+Sv>=+x@EJ2R>VK_UUwi_~M=NtCB&W^uP3;y-hUa-HKuHt!NShL4yPFsQHQ;9_6|DU>n&%G zy?VX(YIi@N>HXTy?oMYX+@o27?O^AiNwd;aEcl8Z*#1jrYYS63uZjCT@aOHm`ev{5 z<;w&1a(BxQsL~B;TOG&U3dB?-l(*${wl|pXY&%~D7`01O_89M0aQF4g097=fL;rgR zo!y-pVdCxX9PH8K21&VhFdO=HXFu3r&R%Dq0}}4-5_t|Mjo1Yd8n+V&DjaH7(g=0o r&#(7`IWK*;#Bp020shhP5>U|F$%0BQgLd(R`G literal 0 HcmV?d00001 diff --git a/packages/core/test/snapshots/emoji-regex@10.0.0.tgz.json b/packages/core/test/snapshots/emoji-regex@10.0.0.tgz.json new file mode 100644 index 0000000..4420be2 --- /dev/null +++ b/packages/core/test/snapshots/emoji-regex@10.0.0.tgz.json @@ -0,0 +1,335 @@ +{ + "packageName": "emoji-regex", + "packageVersion": "10.0.0", + "types": { + "kind": "included" + }, + "buildTools": {}, + "entrypoints": { + ".": { + "subpath": ".", + "resolutions": { + "node10": { + "name": ".", + "resolutionKind": "node10", + "resolution": { + "fileName": "/node_modules/emoji-regex/index.d.ts", + "isJson": false, + "isTypeScript": true, + "trace": [ + "======== Resolving module 'emoji-regex' from '/index.ts'. ========", + "Explicitly specified module resolution kind: 'Node10'.", + "Loading module 'emoji-regex' from 'node_modules' folder, target file types: TypeScript, Declaration.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Found 'package.json' at '/node_modules/emoji-regex/package.json'.", + "File '/node_modules/emoji-regex.ts' does not exist.", + "File '/node_modules/emoji-regex.tsx' does not exist.", + "File '/node_modules/emoji-regex.d.ts' does not exist.", + "'package.json' does not have a 'typesVersions' field.", + "'package.json' does not have a 'typings' field.", + "'package.json' has 'types' field 'index.d.ts' that references '/node_modules/emoji-regex/index.d.ts'.", + "File '/node_modules/emoji-regex/index.d.ts' exists - use it as a name resolution result.", + "======== Module name 'emoji-regex' was successfully resolved to '/node_modules/emoji-regex/index.d.ts' with Package ID 'emoji-regex/index.d.ts@10.0.0'. ========" + ] + }, + "implementationResolution": { + "fileName": "/node_modules/emoji-regex/index.js", + "isJson": false, + "isTypeScript": false, + "trace": [ + "======== Resolving module 'emoji-regex' from '/index.ts'. ========", + "Explicitly specified module resolution kind: 'Node10'.", + "Loading module 'emoji-regex' from 'node_modules' folder, target file types: TypeScript.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript.", + "Found 'package.json' at '/node_modules/emoji-regex/package.json'.", + "File '/node_modules/emoji-regex.ts' does not exist.", + "File '/node_modules/emoji-regex.tsx' does not exist.", + "'package.json' does not have a 'typesVersions' field.", + "'package.json' has 'main' field 'index.js' that references '/node_modules/emoji-regex/index.js'.", + "File '/node_modules/emoji-regex/index.js' exists - use it as a name resolution result.", + "File '/node_modules/emoji-regex/index.js' has an unsupported extension, so skipping it.", + "Loading module as file / folder, candidate module location '/node_modules/emoji-regex/index.js', target file types: TypeScript.", + "File name '/node_modules/emoji-regex/index.js' has a '.js' extension - stripping it.", + "File '/node_modules/emoji-regex/index.ts' does not exist.", + "File '/node_modules/emoji-regex/index.tsx' does not exist.", + "File '/node_modules/emoji-regex/index.js.ts' does not exist.", + "File '/node_modules/emoji-regex/index.js.tsx' does not exist.", + "Directory '/node_modules/emoji-regex/index.js' does not exist, skipping all lookups in it.", + "File '/node_modules/emoji-regex/index.ts' does not exist.", + "File '/node_modules/emoji-regex/index.tsx' does not exist.", + "Loading module 'emoji-regex' from 'node_modules' folder, target file types: JavaScript, JSON.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript, JSON.", + "File '/node_modules/emoji-regex/package.json' exists according to earlier cached lookups.", + "File '/node_modules/emoji-regex.js' does not exist.", + "File '/node_modules/emoji-regex.jsx' does not exist.", + "'package.json' has 'main' field 'index.js' that references '/node_modules/emoji-regex/index.js'.", + "File '/node_modules/emoji-regex/index.js' exists - use it as a name resolution result.", + "======== Module name 'emoji-regex' was successfully resolved to '/node_modules/emoji-regex/index.js' with Package ID 'emoji-regex/index.js@10.0.0'. ========" + ] + }, + "files": [ + "/node_modules/typescript/lib/lib.d.ts", + "/node_modules/emoji-regex/index.d.ts" + ], + "visibleProblems": [] + }, + "node16-cjs": { + "name": ".", + "resolutionKind": "node16-cjs", + "resolution": { + "fileName": "/node_modules/emoji-regex/index.d.ts", + "isJson": false, + "isTypeScript": true, + "trace": [ + "======== Resolving module 'emoji-regex' from '/index.ts'. ========", + "Explicitly specified module resolution kind: 'Node16'.", + "Resolving in CJS mode with conditions 'require', 'types', 'node'.", + "File '/package.json' does not exist.", + "Loading module 'emoji-regex' from 'node_modules' folder, target file types: TypeScript, JavaScript, Declaration, JSON.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Found 'package.json' at '/node_modules/emoji-regex/package.json'.", + "File '/node_modules/emoji-regex.ts' does not exist.", + "File '/node_modules/emoji-regex.tsx' does not exist.", + "File '/node_modules/emoji-regex.d.ts' does not exist.", + "'package.json' does not have a 'typesVersions' field.", + "'package.json' does not have a 'typings' field.", + "'package.json' has 'types' field 'index.d.ts' that references '/node_modules/emoji-regex/index.d.ts'.", + "File '/node_modules/emoji-regex/index.d.ts' exists - use it as a name resolution result.", + "======== Module name 'emoji-regex' was successfully resolved to '/node_modules/emoji-regex/index.d.ts' with Package ID 'emoji-regex/index.d.ts@10.0.0'. ========" + ] + }, + "implementationResolution": { + "fileName": "/node_modules/emoji-regex/index.js", + "isJson": false, + "isTypeScript": false, + "trace": [ + "======== Resolving module 'emoji-regex' from '/index.ts'. ========", + "Explicitly specified module resolution kind: 'Node16'.", + "Resolving in CJS mode with conditions 'require', 'node'.", + "File '/package.json' does not exist.", + "Loading module 'emoji-regex' from 'node_modules' folder, target file types: TypeScript, JavaScript, JSON.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript.", + "Found 'package.json' at '/node_modules/emoji-regex/package.json'.", + "File '/node_modules/emoji-regex.ts' does not exist.", + "File '/node_modules/emoji-regex.tsx' does not exist.", + "'package.json' does not have a 'typesVersions' field.", + "'package.json' has 'main' field 'index.js' that references '/node_modules/emoji-regex/index.js'.", + "File '/node_modules/emoji-regex/index.js' exists - use it as a name resolution result.", + "File '/node_modules/emoji-regex/index.js' has an unsupported extension, so skipping it.", + "Loading module as file / folder, candidate module location '/node_modules/emoji-regex/index.js', target file types: TypeScript.", + "File name '/node_modules/emoji-regex/index.js' has a '.js' extension - stripping it.", + "File '/node_modules/emoji-regex/index.ts' does not exist.", + "File '/node_modules/emoji-regex/index.tsx' does not exist.", + "File '/node_modules/emoji-regex/index.js.ts' does not exist.", + "File '/node_modules/emoji-regex/index.js.tsx' does not exist.", + "Directory '/node_modules/emoji-regex/index.js' does not exist, skipping all lookups in it.", + "File '/node_modules/emoji-regex/index.ts' does not exist.", + "File '/node_modules/emoji-regex/index.tsx' does not exist.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript, JSON.", + "File '/node_modules/emoji-regex/package.json' exists according to earlier cached lookups.", + "File '/node_modules/emoji-regex.js' does not exist.", + "File '/node_modules/emoji-regex.jsx' does not exist.", + "'package.json' has 'main' field 'index.js' that references '/node_modules/emoji-regex/index.js'.", + "File '/node_modules/emoji-regex/index.js' exists - use it as a name resolution result.", + "======== Module name 'emoji-regex' was successfully resolved to '/node_modules/emoji-regex/index.js' with Package ID 'emoji-regex/index.js@10.0.0'. ========" + ] + }, + "files": [ + "/node_modules/typescript/lib/lib.d.ts", + "/node_modules/emoji-regex/index.d.ts" + ], + "visibleProblems": [] + }, + "node16-esm": { + "name": ".", + "resolutionKind": "node16-esm", + "resolution": { + "fileName": "/node_modules/emoji-regex/index.d.ts", + "isJson": false, + "isTypeScript": true, + "trace": [ + "======== Resolving module 'emoji-regex' from '/index.mts'. ========", + "Explicitly specified module resolution kind: 'Node16'.", + "Resolving in ESM mode with conditions 'import', 'types', 'node'.", + "File '/package.json' does not exist according to earlier cached lookups.", + "Loading module 'emoji-regex' from 'node_modules' folder, target file types: TypeScript, JavaScript, Declaration, JSON.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "File '/node_modules/emoji-regex/package.json' exists according to earlier cached lookups.", + "'package.json' does not have a 'typings' field.", + "'package.json' has 'types' field 'index.d.ts' that references '/node_modules/emoji-regex/index.d.ts'.", + "File '/node_modules/emoji-regex/index.d.ts' exists - use it as a name resolution result.", + "======== Module name 'emoji-regex' was successfully resolved to '/node_modules/emoji-regex/index.d.ts' with Package ID 'emoji-regex/index.d.ts@10.0.0'. ========" + ] + }, + "implementationResolution": { + "fileName": "/node_modules/emoji-regex/index.js", + "isJson": false, + "isTypeScript": false, + "trace": [ + "======== Resolving module 'emoji-regex' from '/index.mts'. ========", + "Explicitly specified module resolution kind: 'Node16'.", + "Resolving in ESM mode with conditions 'import', 'node'.", + "File '/package.json' does not exist according to earlier cached lookups.", + "Loading module 'emoji-regex' from 'node_modules' folder, target file types: TypeScript, JavaScript, JSON.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript.", + "File '/node_modules/emoji-regex/package.json' exists according to earlier cached lookups.", + "'package.json' has 'main' field 'index.js' that references '/node_modules/emoji-regex/index.js'.", + "File '/node_modules/emoji-regex/index.js' exists - use it as a name resolution result.", + "File '/node_modules/emoji-regex/index.js' has an unsupported extension, so skipping it.", + "Loading module as file / folder, candidate module location '/node_modules/emoji-regex/index.js', target file types: TypeScript.", + "File name '/node_modules/emoji-regex/index.js' has a '.js' extension - stripping it.", + "File '/node_modules/emoji-regex/index.ts' does not exist.", + "File '/node_modules/emoji-regex/index.tsx' does not exist.", + "File '/node_modules/emoji-regex/index.js.ts' does not exist.", + "File '/node_modules/emoji-regex/index.js.tsx' does not exist.", + "Directory '/node_modules/emoji-regex/index.js' does not exist, skipping all lookups in it.", + "File name '/node_modules/emoji-regex/index.js' has a '.js' extension - stripping it.", + "File '/node_modules/emoji-regex/index.ts' does not exist.", + "File '/node_modules/emoji-regex/index.tsx' does not exist.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript, JSON.", + "File '/node_modules/emoji-regex/package.json' exists according to earlier cached lookups.", + "'package.json' has 'main' field 'index.js' that references '/node_modules/emoji-regex/index.js'.", + "File '/node_modules/emoji-regex/index.js' exists - use it as a name resolution result.", + "Resolution of non-relative name failed; trying with modern Node resolution features disabled to see if npm library needs configuration update.", + "File '/package.json' does not exist according to earlier cached lookups.", + "Loading module 'emoji-regex' from 'node_modules' folder, target file types: TypeScript.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript.", + "File '/node_modules/emoji-regex/package.json' exists according to earlier cached lookups.", + "'package.json' has 'main' field 'index.js' that references '/node_modules/emoji-regex/index.js'.", + "File '/node_modules/emoji-regex/index.js' exists - use it as a name resolution result.", + "File '/node_modules/emoji-regex/index.js' has an unsupported extension, so skipping it.", + "Loading module as file / folder, candidate module location '/node_modules/emoji-regex/index.js', target file types: TypeScript.", + "File name '/node_modules/emoji-regex/index.js' has a '.js' extension - stripping it.", + "File '/node_modules/emoji-regex/index.ts' does not exist.", + "File '/node_modules/emoji-regex/index.tsx' does not exist.", + "File '/node_modules/emoji-regex/index.js.ts' does not exist.", + "File '/node_modules/emoji-regex/index.js.tsx' does not exist.", + "Directory '/node_modules/emoji-regex/index.js' does not exist, skipping all lookups in it.", + "File name '/node_modules/emoji-regex/index.js' has a '.js' extension - stripping it.", + "File '/node_modules/emoji-regex/index.ts' does not exist.", + "File '/node_modules/emoji-regex/index.tsx' does not exist.", + "======== Module name 'emoji-regex' was successfully resolved to '/node_modules/emoji-regex/index.js' with Package ID 'emoji-regex/index.js@10.0.0'. ========" + ] + }, + "files": [ + "/node_modules/typescript/lib/lib.d.ts", + "/node_modules/emoji-regex/index.d.ts" + ], + "visibleProblems": [] + }, + "bundler": { + "name": ".", + "resolutionKind": "bundler", + "resolution": { + "fileName": "/node_modules/emoji-regex/index.d.ts", + "isJson": false, + "isTypeScript": true, + "trace": [ + "======== Resolving module 'emoji-regex' from '/index.ts'. ========", + "Explicitly specified module resolution kind: 'Bundler'.", + "Resolving in CJS mode with conditions 'import', 'types'.", + "File '/package.json' does not exist.", + "Loading module 'emoji-regex' from 'node_modules' folder, target file types: TypeScript, JavaScript, Declaration, JSON.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", + "Found 'package.json' at '/node_modules/emoji-regex/package.json'.", + "File '/node_modules/emoji-regex.ts' does not exist.", + "File '/node_modules/emoji-regex.tsx' does not exist.", + "File '/node_modules/emoji-regex.d.ts' does not exist.", + "'package.json' does not have a 'typesVersions' field.", + "'package.json' does not have a 'typings' field.", + "'package.json' has 'types' field 'index.d.ts' that references '/node_modules/emoji-regex/index.d.ts'.", + "File '/node_modules/emoji-regex/index.d.ts' exists - use it as a name resolution result.", + "======== Module name 'emoji-regex' was successfully resolved to '/node_modules/emoji-regex/index.d.ts' with Package ID 'emoji-regex/index.d.ts@10.0.0'. ========" + ] + }, + "implementationResolution": { + "fileName": "/node_modules/emoji-regex/index.js", + "isJson": false, + "isTypeScript": false, + "trace": [ + "======== Resolving module 'emoji-regex' from '/index.ts'. ========", + "Explicitly specified module resolution kind: 'Bundler'.", + "Resolving in CJS mode with conditions 'import'.", + "File '/package.json' does not exist.", + "Loading module 'emoji-regex' from 'node_modules' folder, target file types: TypeScript, JavaScript, JSON.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript.", + "Found 'package.json' at '/node_modules/emoji-regex/package.json'.", + "File '/node_modules/emoji-regex.ts' does not exist.", + "File '/node_modules/emoji-regex.tsx' does not exist.", + "'package.json' does not have a 'typesVersions' field.", + "'package.json' has 'main' field 'index.js' that references '/node_modules/emoji-regex/index.js'.", + "File '/node_modules/emoji-regex/index.js' exists - use it as a name resolution result.", + "File '/node_modules/emoji-regex/index.js' has an unsupported extension, so skipping it.", + "Loading module as file / folder, candidate module location '/node_modules/emoji-regex/index.js', target file types: TypeScript.", + "File name '/node_modules/emoji-regex/index.js' has a '.js' extension - stripping it.", + "File '/node_modules/emoji-regex/index.ts' does not exist.", + "File '/node_modules/emoji-regex/index.tsx' does not exist.", + "File '/node_modules/emoji-regex/index.js.ts' does not exist.", + "File '/node_modules/emoji-regex/index.js.tsx' does not exist.", + "Directory '/node_modules/emoji-regex/index.js' does not exist, skipping all lookups in it.", + "File '/node_modules/emoji-regex/index.ts' does not exist.", + "File '/node_modules/emoji-regex/index.tsx' does not exist.", + "Searching all ancestor node_modules directories for fallback extensions: JavaScript, JSON.", + "File '/node_modules/emoji-regex/package.json' exists according to earlier cached lookups.", + "File '/node_modules/emoji-regex.js' does not exist.", + "File '/node_modules/emoji-regex.jsx' does not exist.", + "'package.json' has 'main' field 'index.js' that references '/node_modules/emoji-regex/index.js'.", + "File '/node_modules/emoji-regex/index.js' exists - use it as a name resolution result.", + "Resolution of non-relative name failed; trying with modern Node resolution features disabled to see if npm library needs configuration update.", + "File '/package.json' does not exist according to earlier cached lookups.", + "Loading module 'emoji-regex' from 'node_modules' folder, target file types: TypeScript.", + "Searching all ancestor node_modules directories for preferred extensions: TypeScript.", + "File '/node_modules/emoji-regex/package.json' exists according to earlier cached lookups.", + "File '/node_modules/emoji-regex.ts' does not exist.", + "File '/node_modules/emoji-regex.tsx' does not exist.", + "'package.json' has 'main' field 'index.js' that references '/node_modules/emoji-regex/index.js'.", + "File '/node_modules/emoji-regex/index.js' exists - use it as a name resolution result.", + "File '/node_modules/emoji-regex/index.js' has an unsupported extension, so skipping it.", + "Loading module as file / folder, candidate module location '/node_modules/emoji-regex/index.js', target file types: TypeScript.", + "File name '/node_modules/emoji-regex/index.js' has a '.js' extension - stripping it.", + "File '/node_modules/emoji-regex/index.ts' does not exist.", + "File '/node_modules/emoji-regex/index.tsx' does not exist.", + "File '/node_modules/emoji-regex/index.js.ts' does not exist.", + "File '/node_modules/emoji-regex/index.js.tsx' does not exist.", + "Directory '/node_modules/emoji-regex/index.js' does not exist, skipping all lookups in it.", + "File '/node_modules/emoji-regex/index.ts' does not exist.", + "File '/node_modules/emoji-regex/index.tsx' does not exist.", + "======== Module name 'emoji-regex' was successfully resolved to '/node_modules/emoji-regex/index.js' with Package ID 'emoji-regex/index.js@10.0.0'. ========" + ] + }, + "files": [ + "/node_modules/typescript/lib/lib.d.ts", + "/node_modules/emoji-regex/index.d.ts" + ], + "visibleProblems": [] + } + }, + "hasTypes": true, + "isWildcard": false + } + }, + "programInfo": { + "node10": {}, + "node16": { + "moduleKinds": { + "/node_modules/typescript/lib/lib.d.ts": { + "detectedKind": 1, + "detectedReason": "no:type", + "reasonFileName": "/node_modules/typescript/lib/lib.d.ts" + }, + "/node_modules/emoji-regex/index.d.ts": { + "detectedKind": 1, + "detectedReason": "no:type", + "reasonFileName": "/node_modules/emoji-regex/package.json" + }, + "/node_modules/emoji-regex/index.js": { + "detectedKind": 1, + "detectedReason": "no:type", + "reasonFileName": "/node_modules/emoji-regex/package.json" + } + } + }, + "bundler": {} + }, + "problems": [] +}