Skip to content

Commit 4ebe8db

Browse files
committed
Resolving merge conflicts: dropped collectFields changes, will re-add in new collectFields.ts file
2 parents b05352c + 6a5f51f commit 4ebe8db

File tree

80 files changed

+5095
-2880
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+5095
-2880
lines changed

.eslintrc.yml

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ rules:
2222

2323
internal-rules/only-ascii: error
2424
internal-rules/no-dir-import: error
25+
internal-rules/require-to-string-tag: off
2526

2627
##############################################################################
2728
# `eslint-plugin-istanbul` rule list based on `v0.1.2`
@@ -149,7 +150,7 @@ rules:
149150
import/dynamic-import-chunkname: off
150151

151152
##############################################################################
152-
# ESLint builtin rules list based on `v7.27.x`
153+
# ESLint builtin rules list based on `v7.29.x`
153154
##############################################################################
154155

155156
# Possible Errors
@@ -448,11 +449,19 @@ overrides:
448449
project: ['tsconfig.json']
449450
plugins:
450451
- '@typescript-eslint'
452+
- 'eslint-plugin-tsdoc'
451453
extends:
452454
- plugin:import/typescript
453455
rules:
454456
##########################################################################
455-
# `@typescript-eslint/eslint-plugin` rule list based on `v4.25.x`
457+
# `eslint-plugin-tsdoc` rule list based on `v0.2.x`
458+
# https://github.com/microsoft/tsdoc/tree/master/eslint-plugin
459+
##########################################################################
460+
461+
tsdoc/syntax: error
462+
463+
##########################################################################
464+
# `@typescript-eslint/eslint-plugin` rule list based on `v4.28.x`
456465
##########################################################################
457466

458467
# Supported Rules
@@ -593,8 +602,8 @@ overrides:
593602
'@typescript-eslint/no-use-before-define': off
594603
'@typescript-eslint/no-duplicate-imports': off # Superseded by `import/no-duplicates`
595604

596-
# Bellow rules are disabled because coflicts with Prettier, see:
597-
# https://github.com/prettier/eslint-config-prettier/blob/master/%40typescript-eslint.js
605+
# Below rules are disabled because they conflict with Prettier, see:
606+
# https://github.com/prettier/eslint-config-prettier/blob/main/index.js
598607
'@typescript-eslint/object-curly-spacing': off
599608
'@typescript-eslint/quotes': off
600609
'@typescript-eslint/brace-style': off
@@ -610,8 +619,12 @@ overrides:
610619
'@typescript-eslint/space-before-function-paren': off
611620
'@typescript-eslint/space-infix-ops': off
612621
'@typescript-eslint/type-annotation-spacing': off
622+
- files: 'src/**'
623+
rules:
624+
internal-rules/require-to-string-tag: error
613625
- files: 'src/**/__*__/**'
614626
rules:
627+
internal-rules/require-to-string-tag: off
615628
node/no-unpublished-import: [error, { allowModules: ['chai', 'mocha'] }]
616629
import/no-restricted-paths: off
617630
import/no-extraneous-dependencies: [error, { devDependencies: true }]
@@ -625,6 +638,7 @@ overrides:
625638
rules:
626639
node/no-sync: off
627640
node/no-missing-require: [error, { allowModules: ['graphql'] }]
641+
import/no-commonjs: off
628642
import/no-nodejs-modules: off
629643
no-console: off
630644
- files: 'benchmark/**'

.github/workflows/ci.yml

Lines changed: 50 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
uses: actions/checkout@v2
1212

1313
- name: Setup Node.js
14-
uses: actions/setup-node@v1
14+
uses: actions/setup-node@v2
1515
with:
1616
node-version: ${{ env.NODE_VERSION_USED_FOR_DEVELOPMENT }}
1717

@@ -55,6 +55,24 @@ jobs:
5555
exit 1
5656
fi
5757
58+
checkPackageLock:
59+
name: Check health of package-lock.json file
60+
runs-on: ubuntu-latest
61+
steps:
62+
- name: Checkout repo
63+
uses: actions/checkout@v2
64+
65+
- name: Setup Node.js
66+
uses: actions/setup-node@v2
67+
with:
68+
node-version: ${{ env.NODE_VERSION_USED_FOR_DEVELOPMENT }}
69+
70+
- name: Run npm install
71+
run: npm install --package-lock-only --engine-strict --strict-peer-deps
72+
73+
- name: Check that package-lock.json is in sync with package.json
74+
run: git diff --exit-code package-lock.json
75+
5876
integrationTests:
5977
name: Run integration tests
6078
runs-on: ubuntu-latest
@@ -63,7 +81,7 @@ jobs:
6381
uses: actions/checkout@v2
6482

6583
- name: Setup Node.js
66-
uses: actions/setup-node@v1
84+
uses: actions/setup-node@v2
6785
with:
6886
node-version: ${{ env.NODE_VERSION_USED_FOR_DEVELOPMENT }}
6987

@@ -83,7 +101,7 @@ jobs:
83101
uses: actions/checkout@v2
84102

85103
- name: Setup Node.js
86-
uses: actions/setup-node@v1
104+
uses: actions/setup-node@v2
87105
with:
88106
node-version: ${{ env.NODE_VERSION_USED_FOR_DEVELOPMENT }}
89107

@@ -109,7 +127,7 @@ jobs:
109127
uses: actions/checkout@v2
110128

111129
- name: Setup Node.js
112-
uses: actions/setup-node@v1
130+
uses: actions/setup-node@v2
113131
with:
114132
node-version: ${{ env.NODE_VERSION_USED_FOR_DEVELOPMENT }}
115133

@@ -145,7 +163,7 @@ jobs:
145163
uses: actions/checkout@v2
146164

147165
- name: Setup Node.js v${{ matrix.node_version_to_setup }}
148-
uses: actions/setup-node@v1
166+
uses: actions/setup-node@v2
149167
with:
150168
node-version: ${{ matrix.node_version_to_setup }}
151169

@@ -173,7 +191,7 @@ jobs:
173191
fetch-depth: 2
174192

175193
- name: Setup Node.js
176-
uses: actions/setup-node@v1
194+
uses: actions/setup-node@v2
177195
with:
178196
node-version: ${{ env.NODE_VERSION_USED_FOR_DEVELOPMENT }}
179197

@@ -191,6 +209,30 @@ jobs:
191209
- name: Run Benchmark
192210
run: 'npm run benchmark -- --revs HEAD HEAD~1'
193211

212+
diff-npm-package:
213+
name: Diff content of NPM package
214+
runs-on: ubuntu-latest
215+
steps:
216+
- name: Checkout repo
217+
uses: actions/checkout@v2
218+
with:
219+
fetch-depth: 2
220+
221+
- name: Setup Node.js
222+
uses: actions/setup-node@v2
223+
with:
224+
node-version: ${{ env.NODE_VERSION_USED_FOR_DEVELOPMENT }}
225+
226+
- name: Generate report
227+
run: 'node resources/diff-npm-package.js ${{ github.event.pull_request.base.sha }} HEAD'
228+
229+
- name: Upload generated report
230+
uses: actions/upload-artifact@v2
231+
with:
232+
name: npm-dist-diff.html
233+
path: ./npm-dist-diff.html
234+
if-no-files-found: ignore
235+
194236
deploy-to-npm-branch:
195237
name: Deploy to `npm` branch
196238
runs-on: ubuntu-latest
@@ -204,7 +246,7 @@ jobs:
204246
uses: actions/checkout@v2
205247

206248
- name: Setup Node.js
207-
uses: actions/setup-node@v1
249+
uses: actions/setup-node@v2
208250
with:
209251
node-version: ${{ env.NODE_VERSION_USED_FOR_DEVELOPMENT }}
210252

@@ -240,7 +282,7 @@ jobs:
240282
uses: actions/checkout@v2
241283

242284
- name: Setup Node.js
243-
uses: actions/setup-node@v1
285+
uses: actions/setup-node@v2
244286
with:
245287
node-version: ${{ env.NODE_VERSION_USED_FOR_DEVELOPMENT }}
246288

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
# https://help.github.com/articles/ignoring-files/#create-a-global-gitignore
66
# https://www.gitignore.io/
77

8+
/diff-npm-package.html
89
/.eslintcache
910
/node_modules
1011
/coverage

.mocharc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,5 @@ throw-deprecation: true
22
check-leaks: true
33
require:
44
- 'resources/ts-register.js'
5+
extension:
6+
- 'ts'

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# Copied from '.gitignore', please keep it in sync.
2+
/diff-npm-package.html
23
/.eslintcache
34
/node_modules
45
/coverage

benchmark/benchmark.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -274,9 +274,9 @@ async function runBenchmarks(benchmarks, benchmarkProjects) {
274274
}
275275

276276
function getArguments(argv) {
277-
const revsIdx = argv.indexOf('--revs');
278-
const revisions = revsIdx === -1 ? [] : argv.slice(revsIdx + 1);
279-
const benchmarks = revsIdx === -1 ? argv : argv.slice(0, revsIdx);
277+
const revsIndex = argv.indexOf('--revs');
278+
const revisions = revsIndex === -1 ? [] : argv.slice(revsIndex + 1);
279+
const benchmarks = revsIndex === -1 ? argv : argv.slice(0, revsIndex);
280280

281281
switch (revisions.length) {
282282
case 0:

cspell.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
language: en
22
ignorePaths:
33
# Copied from '.gitignore', please keep it in sync.
4+
- diff-npm-package.html
45
- .eslintcache
56
- node_modules
67
- coverage
@@ -20,6 +21,9 @@ overrides:
2021
- filename: '**/docs/APIReference-*.md'
2122
ignoreRegExpList: ['/href="[^"]*"/']
2223

24+
ignoreRegExpList:
25+
- u\{[0-9a-f]{1,8}\}
26+
2327
words:
2428
- graphiql
2529
- sublinks

integrationTests/integration-test.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,8 @@ describe('Integration Tests', () => {
4242
it('Should work on all supported node versions', () => {
4343
testOnNodeProject('node');
4444
}).timeout(40000);
45+
46+
it('Should be compatible with Webpack', () => {
47+
testOnNodeProject('webpack');
48+
}).timeout(40000);
4549
});

integrationTests/ts/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@
1010
"typescript-4.0": "npm:[email protected]",
1111
"typescript-4.1": "npm:[email protected]",
1212
"typescript-4.2": "npm:[email protected]",
13-
"typescript-4.3": "npm:typescript@4.2.x"
13+
"typescript-4.3": "npm:typescript@4.3.x"
1414
}
1515
}

integrationTests/webpack/entry.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
'use strict';
2+
3+
const { buildSchema, graphqlSync } = require('graphql');
4+
5+
const schema = buildSchema('type Query { hello: String }');
6+
7+
const result = graphqlSync({
8+
schema,
9+
source: '{ hello }',
10+
rootValue: { hello: 'world' },
11+
});
12+
13+
module.exports = { result };

0 commit comments

Comments
 (0)