Skip to content

Commit a28ef99

Browse files
try esm only
Co-Authored-By: Yaacov Rydzinski <[email protected]>
1 parent 3283f8a commit a28ef99

File tree

13 files changed

+31
-108
lines changed

13 files changed

+31
-108
lines changed

eslint.config.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -764,7 +764,7 @@ export default tsConfig(
764764
'n/no-missing-import': [
765765
'error',
766766
{
767-
allowModules: ['graphql', 'graphql-esm'],
767+
allowModules: ['graphql'],
768768
},
769769
],
770770
'n/no-missing-require': [

integrationTests/node/index.mjs

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,7 @@
11
import assert from 'node:assert';
2-
import { readFileSync } from 'node:fs';
3-
4-
import {
5-
experimentalExecuteIncrementally,
6-
graphqlSync,
7-
parse,
8-
} from 'graphql-esm';
9-
import { buildSchema } from 'graphql-esm/utilities';
10-
import { version } from 'graphql-esm/version';
11-
12-
assert.deepStrictEqual(
13-
version + '+esm',
14-
JSON.parse(readFileSync('./node_modules/graphql-esm/package.json')).version,
15-
);
2+
3+
import { experimentalExecuteIncrementally, graphqlSync, parse } from 'graphql';
4+
import { buildSchema } from 'graphql/utilities';
165

176
const schema = buildSchema('type Query { hello: String }');
187

integrationTests/node/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
"test": "node test.js"
77
},
88
"dependencies": {
9-
"graphql": "file:../graphql.tgz",
10-
"graphql-esm": "file:../graphql-esm.tgz"
9+
"graphql": "file:../graphql.tgz"
1110
}
1211
}

integrationTests/ts/esm.ts

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
1-
import type { ExecutionResult } from 'graphql-esm/execution';
1+
import type { ExecutionResult } from 'graphql/execution';
22

3-
import { graphqlSync } from 'graphql-esm';
4-
import {
5-
GraphQLString,
6-
GraphQLSchema,
7-
GraphQLObjectType,
8-
} from 'graphql-esm/type';
3+
import { graphqlSync } from 'graphql';
4+
import { GraphQLString, GraphQLSchema, GraphQLObjectType } from 'graphql/type';
95

106
const queryType: GraphQLObjectType = new GraphQLObjectType({
117
name: 'Query',

integrationTests/ts/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
},
88
"dependencies": {
99
"graphql": "file:../graphql.tgz",
10-
"graphql-esm": "file:../graphql-esm.tgz",
1110
"typescript-4.9": "npm:[email protected]",
1211
"typescript-5.0": "npm:[email protected]",
1312
"typescript-5.1": "npm:[email protected]",

integrationTests/webpack/entry-esm.mjs

Lines changed: 0 additions & 10 deletions
This file was deleted.

integrationTests/webpack/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
},
88
"dependencies": {
99
"graphql": "file:../graphql.tgz",
10-
"graphql-esm": "file:../graphql-esm.tgz",
1110
"webpack": "5.x.x",
1211
"webpack-cli": "4.x.x"
1312
}

integrationTests/webpack/test.js

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,10 @@
11
import assert from 'node:assert';
22

33
/* eslint-disable n/no-missing-import */
4-
import cjs from './dist/main-cjs.cjs';
5-
import mjs from './dist/main-mjs.cjs';
4+
import main from './dist/main.cjs';
65
/* eslint-enable n/no-missing-import */
76

8-
assert.deepStrictEqual(cjs.result, {
9-
data: {
10-
__proto__: null,
11-
hello: 'world',
12-
},
13-
});
14-
15-
assert.deepStrictEqual(mjs.result, {
7+
assert.deepStrictEqual(main.result, {
168
data: {
179
__proto__: null,
1810
hello: 'world',

integrationTests/webpack/webpack.config.json

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
{
22
"mode": "production",
3-
"entry": {
4-
"cjs": "./entry.js",
5-
"mjs": "./entry-esm.mjs"
6-
},
3+
"entry": "./entry.js",
74
"output": {
8-
"filename": "main-[name].cjs",
5+
"filename": "main.cjs",
96
"library": {
107
"type": "commonjs2"
118
}

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)