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

Fix TypeScript error for unresolved reference to ts-expose-internals #127

Merged
merged 5 commits into from
Dec 21, 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
5 changes: 5 additions & 0 deletions .changeset/khaki-actors-tickle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@arethetypeswrong/core": patch
---

Fix TypeScript error for unresolved reference to ts-expose-internals
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,4 @@ jobs:
- run: pnpm tsc
- run: pnpm build
- run: pnpm test
- run: pnpm check-dts
1 change: 1 addition & 0 deletions .github/workflows/version-or-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ jobs:
- run: pnpm install
- run: pnpm build
- run: pnpm test
- run: pnpm check-dts
- uses: changesets/action@v1
with:
publish: pnpm changeset publish
Expand Down
8 changes: 7 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,22 @@
"build": "pnpm tsc && pnpm -r build",
"format": "prettier --write \"**/*.{ts,json,css}\"",
"test": "pnpm -r test",
"check-dts": "tsc -p tsconfig.check-dts.json",
"start": "pnpm --filter @arethetypeswrong/web start",
"version": "changeset version && pnpm install --lockfile-only"
},
"devDependencies": {
"@changesets/cli": "^2.27.1",
"prettier": "^3.0.3",
"typescript": "5.3.2"
"typescript": "5.3.3"
},
"engines": {
"node": ">=18",
"pnpm": ">=8"
},
"pnpm": {
"overrides": {
"ts-expose-internals-conditionally": "$typescript"
}
}
}
6 changes: 3 additions & 3 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,14 @@
"@andrewbranch/untar.js": "^1.0.3",
"fflate": "^0.7.4",
"semver": "^7.5.4",
"typescript": "5.3.2",
"ts-expose-internals-conditionally": "1.0.0-empty.0",
"typescript": "5.3.3",
"validate-npm-package-name": "^5.0.0"
},
"devDependencies": {
"@types/node": "^20.8.6",
"@types/semver": "^7.5.0",
"@types/validate-npm-package-name": "^4.0.0",
"ts-expose-internals": "5.3.2"
"@types/validate-npm-package-name": "^4.0.0"
},
"engines": {
"node": ">=18"
Expand Down
8 changes: 4 additions & 4 deletions packages/core/test/snapshots/[email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"File '/node_modules/moment.d.ts' does not exist.",
"'package.json' has a 'typesVersions' field with version-specific path mappings.",
"'package.json' has 'typings' field './moment.d.ts' that references '/node_modules/moment/moment.d.ts'.",
"'package.json' has a 'typesVersions' entry '>=3.1' that matches compiler version '5.3.2', looking for a pattern to match module name 'moment.d.ts'.",
"'package.json' has a 'typesVersions' entry '>=3.1' that matches compiler version '5.3.3', looking for a pattern to match module name 'moment.d.ts'.",
"Module name 'moment.d.ts', matched pattern '*'.",
"Trying substitution 'ts3.1-typings/*', candidate module location: 'ts3.1-typings/moment.d.ts'.",
"File '/node_modules/moment/ts3.1-typings/moment.d.ts' exists - use it as a name resolution result.",
Expand Down Expand Up @@ -63,7 +63,7 @@
"File '/node_modules/moment.d.ts' does not exist.",
"'package.json' has a 'typesVersions' field with version-specific path mappings.",
"'package.json' has 'typings' field './moment.d.ts' that references '/node_modules/moment/moment.d.ts'.",
"'package.json' has a 'typesVersions' entry '>=3.1' that matches compiler version '5.3.2', looking for a pattern to match module name 'moment.d.ts'.",
"'package.json' has a 'typesVersions' entry '>=3.1' that matches compiler version '5.3.3', looking for a pattern to match module name 'moment.d.ts'.",
"Module name 'moment.d.ts', matched pattern '*'.",
"Trying substitution 'ts3.1-typings/*', candidate module location: 'ts3.1-typings/moment.d.ts'.",
"File '/node_modules/moment/ts3.1-typings/moment.d.ts' exists - use it as a name resolution result.",
Expand Down Expand Up @@ -92,7 +92,7 @@
"Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.",
"File '/node_modules/moment/package.json' exists according to earlier cached lookups.",
"'package.json' has 'typings' field './moment.d.ts' that references '/node_modules/moment/moment.d.ts'.",
"'package.json' has a 'typesVersions' entry '>=3.1' that matches compiler version '5.3.2', looking for a pattern to match module name 'moment.d.ts'.",
"'package.json' has a 'typesVersions' entry '>=3.1' that matches compiler version '5.3.3', looking for a pattern to match module name 'moment.d.ts'.",
"Module name 'moment.d.ts', matched pattern '*'.",
"Trying substitution 'ts3.1-typings/*', candidate module location: 'ts3.1-typings/moment.d.ts'.",
"File '/node_modules/moment/ts3.1-typings/moment.d.ts' exists - use it as a name resolution result.",
Expand Down Expand Up @@ -125,7 +125,7 @@
"File '/node_modules/moment.d.ts' does not exist.",
"'package.json' has a 'typesVersions' field with version-specific path mappings.",
"'package.json' has 'typings' field './moment.d.ts' that references '/node_modules/moment/moment.d.ts'.",
"'package.json' has a 'typesVersions' entry '>=3.1' that matches compiler version '5.3.2', looking for a pattern to match module name 'moment.d.ts'.",
"'package.json' has a 'typesVersions' entry '>=3.1' that matches compiler version '5.3.3', looking for a pattern to match module name 'moment.d.ts'.",
"Module name 'moment.d.ts', matched pattern '*'.",
"Trying substitution 'ts3.1-typings/*', candidate module location: 'ts3.1-typings/moment.d.ts'.",
"File '/node_modules/moment/ts3.1-typings/moment.d.ts' exists - use it as a name resolution result.",
Expand Down
3 changes: 2 additions & 1 deletion packages/core/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
"module": "nodenext",
"outDir": "dist",
"rootDir": "src",
"types": ["ts-expose-internals"]
"types": ["ts-expose-internals-conditionally"],
"customConditions": ["ts-expose-internals"]
},
"include": ["src"]
}
4 changes: 2 additions & 2 deletions packages/history/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@
"npm-high-impact": "^1.3.0",
"pacote": "^15.2.0",
"semver": "^7.5.3",
"ts-expose-internals": "5.3.2",
"ts-expose-internals": "5.3.3",
"tsx": "^3.12.7",
"types-registry": "latest",
"typescript": "5.3.2"
"typescript": "5.3.3"
},
"engines": {
"node": ">=18"
Expand Down
39 changes: 28 additions & 11 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions tsconfig.check-dts.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"compilerOptions": {
"module": "nodenext",
"noEmit": true,
"strict": true
},
"include": ["./packages/core/dist"]
}