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 commonjs module resolution with node16,nodenext #4624

Merged
merged 5 commits into from
Aug 5, 2022
Merged
Show file tree
Hide file tree
Changes from 4 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
36 changes: 36 additions & 0 deletions .changeset/fluffy-pianos-know.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
'@graphql-tools/batch-delegate': patch
'@graphql-tools/batch-execute': patch
'@graphql-tools/delegate': patch
'@graphql-tools/graphql-tag-pluck': patch
'graphql-tools': patch
'@graphql-tools/import': patch
'@graphql-tools/jest-transform': patch
'@graphql-tools/links': patch
'@graphql-tools/load': patch
'@graphql-tools/load-files': patch
'@graphql-tools/apollo-engine-loader': patch
'@graphql-tools/code-file-loader': patch
'@graphql-tools/git-loader': patch
'@graphql-tools/github-loader': patch
'@graphql-tools/graphql-file-loader': patch
'@graphql-tools/json-file-loader': patch
'@graphql-tools/module-loader': patch
'@graphql-tools/prisma-loader': patch
'@graphql-tools/url-loader': patch
'@graphql-tools/merge': patch
'@graphql-tools/mock': patch
'@graphql-tools/node-require': patch
'@graphql-tools/optimize': patch
'@graphql-tools/relay-operation-optimizer': patch
'@graphql-tools/resolvers-composition': patch
'@graphql-tools/schema': patch
'@graphql-tools/stitch': patch
'@graphql-tools/stitching-directives': patch
'@graphql-tools/utils': patch
'@graphql-tools/webpack-loader': patch
'@graphql-tools/webpack-loader-runtime': patch
'@graphql-tools/wrap': patch
---

Fix CommonJS TypeScript resolution
n1ru4l marked this conversation as resolved.
Show resolved Hide resolved
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"@typescript-eslint/eslint-plugin": "5.32.0",
"@typescript-eslint/parser": "5.32.0",
"babel-jest": "28.1.3",
"bob-the-bundler": "2.0.0",
"bob-the-bundler": "4.0.0",
"chalk": "4.1.2",
"concurrently": "7.3.0",
"eslint": "8.21.0",
Expand Down Expand Up @@ -83,10 +83,10 @@
]
},
"workspaces": [
"./packages/*",
"./packages/loaders/*",
"./website",
"./benchmark/*"
"packages/*",
"packages/loaders/*",
"website",
"benchmark/*"
],
"resolutions": {
"graphql": "16.5.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/batch-delegate/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"exports": {
".": {
"require": {
"types": "./dist/typings/index.d.ts",
"types": "./dist/typings/index.d.cts",
"default": "./dist/cjs/index.js"
},
"import": {
Expand All @@ -28,7 +28,7 @@
},
"./*": {
"require": {
"types": "./dist/typings/*.d.ts",
"types": "./dist/typings/*.d.cts",
"default": "./dist/cjs/*.js"
},
"import": {
Expand Down
4 changes: 2 additions & 2 deletions packages/batch-execute/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"exports": {
".": {
"require": {
"types": "./dist/typings/index.d.ts",
"types": "./dist/typings/index.d.cts",
"default": "./dist/cjs/index.js"
},
"import": {
Expand All @@ -28,7 +28,7 @@
},
"./*": {
"require": {
"types": "./dist/typings/*.d.ts",
"types": "./dist/typings/*.d.cts",
"default": "./dist/cjs/*.js"
},
"import": {
Expand Down
4 changes: 2 additions & 2 deletions packages/delegate/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"exports": {
".": {
"require": {
"types": "./dist/typings/index.d.ts",
"types": "./dist/typings/index.d.cts",
"default": "./dist/cjs/index.js"
},
"import": {
Expand All @@ -28,7 +28,7 @@
},
"./*": {
"require": {
"types": "./dist/typings/*.d.ts",
"types": "./dist/typings/*.d.cts",
"default": "./dist/cjs/*.js"
},
"import": {
Expand Down
4 changes: 2 additions & 2 deletions packages/graphql-tag-pluck/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"exports": {
".": {
"require": {
"types": "./dist/typings/index.d.ts",
"types": "./dist/typings/index.d.cts",
"default": "./dist/cjs/index.js"
},
"import": {
Expand All @@ -28,7 +28,7 @@
},
"./*": {
"require": {
"types": "./dist/typings/*.d.ts",
"types": "./dist/typings/*.d.cts",
"default": "./dist/cjs/*.js"
},
"import": {
Expand Down
4 changes: 2 additions & 2 deletions packages/graphql-tools/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"exports": {
".": {
"require": {
"types": "./dist/typings/index.d.ts",
"types": "./dist/typings/index.d.cts",
"default": "./dist/cjs/index.js"
},
"import": {
Expand All @@ -28,7 +28,7 @@
},
"./*": {
"require": {
"types": "./dist/typings/*.d.ts",
"types": "./dist/typings/*.d.cts",
"default": "./dist/cjs/*.js"
},
"import": {
Expand Down
4 changes: 2 additions & 2 deletions packages/import/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"exports": {
".": {
"require": {
"types": "./dist/typings/index.d.ts",
"types": "./dist/typings/index.d.cts",
"default": "./dist/cjs/index.js"
},
"import": {
Expand All @@ -29,7 +29,7 @@
},
"./*": {
"require": {
"types": "./dist/typings/*.d.ts",
"types": "./dist/typings/*.d.cts",
"default": "./dist/cjs/*.js"
},
"import": {
Expand Down
4 changes: 2 additions & 2 deletions packages/jest-transform/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"exports": {
".": {
"require": {
"types": "./dist/typings/index.d.ts",
"types": "./dist/typings/index.d.cts",
"default": "./dist/cjs/index.js"
},
"import": {
Expand All @@ -28,7 +28,7 @@
},
"./*": {
"require": {
"types": "./dist/typings/*.d.ts",
"types": "./dist/typings/*.d.cts",
"default": "./dist/cjs/*.js"
},
"import": {
Expand Down
4 changes: 2 additions & 2 deletions packages/links/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"exports": {
".": {
"require": {
"types": "./dist/typings/index.d.ts",
"types": "./dist/typings/index.d.cts",
"default": "./dist/cjs/index.js"
},
"import": {
Expand All @@ -28,7 +28,7 @@
},
"./*": {
"require": {
"types": "./dist/typings/*.d.ts",
"types": "./dist/typings/*.d.cts",
"default": "./dist/cjs/*.js"
},
"import": {
Expand Down
4 changes: 2 additions & 2 deletions packages/load-files/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"exports": {
".": {
"require": {
"types": "./dist/typings/index.d.ts",
"types": "./dist/typings/index.d.cts",
"default": "./dist/cjs/index.js"
},
"import": {
Expand All @@ -29,7 +29,7 @@
},
"./*": {
"require": {
"types": "./dist/typings/*.d.ts",
"types": "./dist/typings/*.d.cts",
"default": "./dist/cjs/*.js"
},
"import": {
Expand Down
4 changes: 2 additions & 2 deletions packages/load/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"exports": {
".": {
"require": {
"types": "./dist/typings/index.d.ts",
"types": "./dist/typings/index.d.cts",
"default": "./dist/cjs/index.js"
},
"import": {
Expand All @@ -29,7 +29,7 @@
},
"./*": {
"require": {
"types": "./dist/typings/*.d.ts",
"types": "./dist/typings/*.d.cts",
"default": "./dist/cjs/*.js"
},
"import": {
Expand Down
4 changes: 2 additions & 2 deletions packages/loaders/apollo-engine/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"exports": {
".": {
"require": {
"types": "./dist/typings/index.d.ts",
"types": "./dist/typings/index.d.cts",
"default": "./dist/cjs/index.js"
},
"import": {
Expand All @@ -29,7 +29,7 @@
},
"./*": {
"require": {
"types": "./dist/typings/*.d.ts",
"types": "./dist/typings/*.d.cts",
"default": "./dist/cjs/*.js"
},
"import": {
Expand Down
4 changes: 2 additions & 2 deletions packages/loaders/code-file/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"exports": {
".": {
"require": {
"types": "./dist/typings/index.d.ts",
"types": "./dist/typings/index.d.cts",
"default": "./dist/cjs/index.js"
},
"import": {
Expand All @@ -29,7 +29,7 @@
},
"./*": {
"require": {
"types": "./dist/typings/*.d.ts",
"types": "./dist/typings/*.d.cts",
"default": "./dist/cjs/*.js"
},
"import": {
Expand Down
4 changes: 2 additions & 2 deletions packages/loaders/git/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"exports": {
".": {
"require": {
"types": "./dist/typings/index.d.ts",
"types": "./dist/typings/index.d.cts",
"default": "./dist/cjs/index.js"
},
"import": {
Expand All @@ -29,7 +29,7 @@
},
"./*": {
"require": {
"types": "./dist/typings/*.d.ts",
"types": "./dist/typings/*.d.cts",
"default": "./dist/cjs/*.js"
},
"import": {
Expand Down
4 changes: 2 additions & 2 deletions packages/loaders/github/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"exports": {
".": {
"require": {
"types": "./dist/typings/index.d.ts",
"types": "./dist/typings/index.d.cts",
"default": "./dist/cjs/index.js"
},
"import": {
Expand All @@ -29,7 +29,7 @@
},
"./*": {
"require": {
"types": "./dist/typings/*.d.ts",
"types": "./dist/typings/*.d.cts",
"default": "./dist/cjs/*.js"
},
"import": {
Expand Down
4 changes: 2 additions & 2 deletions packages/loaders/graphql-file/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"exports": {
".": {
"require": {
"types": "./dist/typings/index.d.ts",
"types": "./dist/typings/index.d.cts",
"default": "./dist/cjs/index.js"
},
"import": {
Expand All @@ -29,7 +29,7 @@
},
"./*": {
"require": {
"types": "./dist/typings/*.d.ts",
"types": "./dist/typings/*.d.cts",
"default": "./dist/cjs/*.js"
},
"import": {
Expand Down
4 changes: 2 additions & 2 deletions packages/loaders/json-file/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"exports": {
".": {
"require": {
"types": "./dist/typings/index.d.ts",
"types": "./dist/typings/index.d.cts",
"default": "./dist/cjs/index.js"
},
"import": {
Expand All @@ -29,7 +29,7 @@
},
"./*": {
"require": {
"types": "./dist/typings/*.d.ts",
"types": "./dist/typings/*.d.cts",
"default": "./dist/cjs/*.js"
},
"import": {
Expand Down
4 changes: 2 additions & 2 deletions packages/loaders/module/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"exports": {
".": {
"require": {
"types": "./dist/typings/index.d.ts",
"types": "./dist/typings/index.d.cts",
"default": "./dist/cjs/index.js"
},
"import": {
Expand All @@ -29,7 +29,7 @@
},
"./*": {
"require": {
"types": "./dist/typings/*.d.ts",
"types": "./dist/typings/*.d.cts",
"default": "./dist/cjs/*.js"
},
"import": {
Expand Down
4 changes: 2 additions & 2 deletions packages/loaders/prisma/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"exports": {
".": {
"require": {
"types": "./dist/typings/index.d.ts",
"types": "./dist/typings/index.d.cts",
"default": "./dist/cjs/index.js"
},
"import": {
Expand All @@ -29,7 +29,7 @@
},
"./*": {
"require": {
"types": "./dist/typings/*.d.ts",
"types": "./dist/typings/*.d.cts",
"default": "./dist/cjs/*.js"
},
"import": {
Expand Down
Loading