Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
100 commits
Select commit Hold shift + click to select a range
23f444b
internal: add node@18 to supported versions and test it (#3544)
IvanGoncharov Apr 26, 2022
7499423
package.json: Switch to alpha tag on NPM (#3545)
IvanGoncharov Apr 26, 2022
58a8e8a
Drop support for node 12 and 17, update rest to latest minor version …
IvanGoncharov Apr 26, 2022
5499f5c
Set TS 4.4 as minimal supported version (#3547)
IvanGoncharov Apr 26, 2022
c01a2e4
ci: disable Codecov and measure test coverage on every run (#3548)
IvanGoncharov Apr 27, 2022
644fcd4
ESLint: add 'shared-node-browser' environment (#3549)
IvanGoncharov Apr 27, 2022
af9c4d9
print: add spaces inside input object (#3456)
IvanGoncharov Apr 27, 2022
2baee7c
Switch NPM package to support only ESM (#3552)
IvanGoncharov May 2, 2022
6ffb0e0
Update deps (#3553)
IvanGoncharov May 2, 2022
78ac10e
Add test watch script (#3551)
yaacovCR May 2, 2022
a49dbc1
Switch from shell's `cp` to 'fs.cpSync' in scripts (#3555)
IvanGoncharov May 4, 2022
934b2e6
Fully switch to `tsc` and remove `babel` (#3557)
IvanGoncharov May 4, 2022
4f7687c
integrationTests: switch tests to TS (#3558)
IvanGoncharov May 5, 2022
399ac91
benchmark: rewrite benchmark in TS (#3559)
IvanGoncharov May 5, 2022
88e6e8c
diff-npm-packages: fix crash with ENOBUFS (#3560)
IvanGoncharov May 6, 2022
af5d591
resources: switch internal scripts to TS (#3562)
IvanGoncharov May 8, 2022
cb9a1b7
Update deps (#3563)
IvanGoncharov May 8, 2022
0adb628
validateSchema: unify check of root types (#3566)
IvanGoncharov May 10, 2022
7e44a00
validation-test: Test root type validation with multiple types (#3567)
IvanGoncharov May 10, 2022
8d96bc9
Refactor out `AccumulatorMap` from `groupBy` (#3568)
IvanGoncharov May 10, 2022
b527d47
fix(validate): no reusing root types (#3453)
thomasheyenbrock May 10, 2022
bee6f46
invariant/devAssert: make typings of `condition` stricter (#3569)
IvanGoncharov May 11, 2022
dadac87
Delete deprecated 'graphql/subscription' module (#3570)
IvanGoncharov May 11, 2022
938d222
Remove deprecated `getOperationRootType` (#3571)
IvanGoncharov May 11, 2022
eec6328
Remove deprecated `assertValidName` & `isValidNameError` (#3572)
IvanGoncharov May 11, 2022
975ea72
Remove deprecated `TypeInfo` argument of `validate` function (#3574)
IvanGoncharov May 11, 2022
2065f62
Remove deprecate `getFieldDefFn` argument of `TypeInfo` constructor (…
IvanGoncharov May 11, 2022
d93097c
Drop deprecated positional arguments on GraphQLError (#3577)
IvanGoncharov May 11, 2022
808b9da
Remove dev asserts added temporary for v15 to v16 migration (#3578)
IvanGoncharov May 11, 2022
f94e7db
Remove deprecated `*Enum` types (#3579)
IvanGoncharov May 11, 2022
1ffdaad
Remove deprecated `getVisitFn` function (#3580)
IvanGoncharov May 11, 2022
61275f4
ASTVisitorKeyMap: drop deprecation notice (#3581)
IvanGoncharov May 12, 2022
fdbc3b1
Remove deprecate printError/formatError methods (#3582)
IvanGoncharov May 12, 2022
5efad64
tests: Use chai's `assert` instead of `invariant` (#3583)
IvanGoncharov May 12, 2022
920026a
Speedup tests by ~15% by moving some `stripIgnoredCharacters` tests t…
IvanGoncharov May 12, 2022
2fb4ff8
internal: move `benchmark.ts` into resources folder (#3585)
IvanGoncharov May 12, 2022
92d3355
Fix performance issue with ESLint (#3586)
IvanGoncharov May 12, 2022
42042f8
resources: mark node's modules with 'node:' prefix (#3587)
IvanGoncharov May 13, 2022
cf3562f
resources: remove all usages of `require.main` (#3590)
IvanGoncharov May 15, 2022
d3d8264
Initial support of mutation testing with stryker-js (#3591)
IvanGoncharov May 15, 2022
785fc35
Revert "Remove deprecate `getFieldDefFn` argument of `TypeInfo` const…
IvanGoncharov May 16, 2022
822ff3c
Revert "Remove deprecated `TypeInfo` argument of `validate` function"…
IvanGoncharov May 16, 2022
9318e91
Fix typing for `isNonNullType`
yaacovCR May 19, 2022
850d4a3
Refactor `GraphQL*Type` TS types to be more DRY
yaacovCR May 19, 2022
14dbaec
benchmark: test performance cost of re-creating schema (#3596)
IvanGoncharov May 20, 2022
51cf777
gen-changelog: fix crash due to 'git rev-list' returning empty string…
IvanGoncharov May 24, 2022
a92e8ec
benchmark: improve accuracy by disabling GC during benchmarks
IvanGoncharov May 24, 2022
6e37aaf
benchmark: reject samples that had involuntary context switches
IvanGoncharov May 24, 2022
4ac89c1
benchmark: switch communication with spawned process to 'pipe'
IvanGoncharov May 24, 2022
fb5b14e
Add new 'GraphQLSchema.getField' method (#3605)
IvanGoncharov May 27, 2022
42244fd
Update deps (#3607)
IvanGoncharov May 27, 2022
ac5dbbb
Remove 'utf-8' as argument of `writeFileSync` (#3608)
IvanGoncharov May 28, 2022
2345921
resources: add new `localRepoPath` utility function (#3610)
IvanGoncharov May 28, 2022
6aafe06
diff-npm-package: move report into shared 'reports' folder (#3611)
IvanGoncharov May 28, 2022
5197ffe
Update GitHub actions dependencies (#3615)
IvanGoncharov May 30, 2022
5d4846e
diff-npm-package: create reports folder (#3623)
yaacovCR Jun 1, 2022
192c985
benchmark: replace failing on context switching with warning (#3625)
IvanGoncharov Jun 2, 2022
d724ca0
diff-npm-package: polish reports dir creation (#3624)
yaacovCR Jun 2, 2022
1073586
extendSchema: Do not modify standard directives (#3618)
IvanGoncharov Jun 3, 2022
888749f
fix: update remaining `GraphQLNonNull<GraphQLType>` codepoints to (#3…
yaacovCR Jun 6, 2022
8bcc99e
Reuse GraphQLWrappingType in 'GraphQLType' definition (#3627)
IvanGoncharov Jun 6, 2022
effd809
ci: speed up 'ci' workflow by removing unneeded internal dependencies…
IvanGoncharov Jun 7, 2022
ea60c64
benchmark: add Windows compatibility (#3628)
yaacovCR Jun 8, 2022
a7adf44
subscribe-test: extract `subscribeWithBadFn` function (#3630)
yaacovCR Jun 8, 2022
16d4cc0
change incorrect subscribe return type to a GraphQLError rather than …
yaacovCR Jun 8, 2022
2a6e69d
subscribe: stay synchronous when possible (#3620)
yaacovCR Jun 9, 2022
9ea6f82
createSourceEventStream: remove deprecated positional arguments (#3635)
yaacovCR Jun 12, 2022
4d83bb7
refactor: move `subscribe` code to `execute` file (#3636)
yaacovCR Jun 12, 2022
255220e
refactor: move `assertValidExecutionArguments` into `buildExecutionCo…
yaacovCR Jun 12, 2022
b24890b
refactor: remove `rootValue` argument from `executeOperation`
yaacovCR Jun 12, 2022
775e334
refactor: remove null from executeOperation return type
yaacovCR Jun 12, 2022
24e62d0
ESLint: error on function accepting more than 5 parameters (#3641)
IvanGoncharov Jun 13, 2022
2aeb6d9
Remove 'devAssert' checks that duplicate TS types (#3642)
IvanGoncharov Jun 13, 2022
978813d
Remove 'assertValidExecutionArguments' function (#3643)
IvanGoncharov Jun 14, 2022
7128190
refactor: executeOperation can take only one parameter
yaacovCR Jun 19, 2022
476c294
refactor: use spread syntax with exeContext
yaacovCR Jun 19, 2022
c933fd6
refactor: subscribe: introduce `buildPerEventExecutionContext` (#3639)
yaacovCR Jun 21, 2022
ce05320
Async benchmarks (#3134)
robrichard Jun 22, 2022
9fdbffc
Support returning async iterables from resolver functions (#2757)
IvanGoncharov Jun 23, 2022
6d127c0
[RFC] Client Controlled Nullability experiment implementation w/o exe…
twof Jun 28, 2022
1e6a84e
Update deps (#3667)
IvanGoncharov Jul 7, 2022
5e321f9
Cleanup words/files ignores in `cspell.yml` (#3668)
IvanGoncharov Jul 7, 2022
9743c0f
tsconfig: Explicitly list all type checking options
IvanGoncharov Jul 7, 2022
b10487e
tsconfig: Add support for comments
IvanGoncharov Jul 7, 2022
c01f2ac
tsconfig: enable `noImplicitOverride` check
IvanGoncharov Jul 7, 2022
e060c4c
Fix: make public API compatible with 'exactOptionalPropertyTypes' (#3…
IvanGoncharov Jul 21, 2022
b1d9a0a
Fix coerceInputValue test name (#3681)
spawnia Jul 26, 2022
c73dafb
validate: remove warning about throwing literal (#3680)
IvanGoncharov Jul 26, 2022
d2663df
polish: remove unnecessary Maybe (#3683)
yaacovCR Aug 1, 2022
bf6fd5b
Replace all instances of `ObjMap<boolean>` with ES6 Set (#3688)
IvanGoncharov Aug 9, 2022
8302744
Remove superficial `.values()` and `.entries()` calls (#3689)
IvanGoncharov Aug 9, 2022
8ef7a84
Motivation: looked into this it as part of #3687 (#3690)
IvanGoncharov Aug 10, 2022
db28435
gen-changelog: Use `fetch` instead of `http.request` (#3692)
IvanGoncharov Aug 12, 2022
b7eaa26
Update deps (#3693)
IvanGoncharov Aug 14, 2022
06ba558
polish: add tests for `expectPromise` and `expectEqualPromisesOrValue…
yaacovCR Aug 14, 2022
ecd6017
benchmark: use 'execOutput' from 'util.ts' (#3695)
IvanGoncharov Aug 15, 2022
0217ee9
polish: rename `mapAsyncIterator` to `mapAsyncIterable`
yaacovCR Aug 14, 2022
acd2708
mapAsyncIterable: use `expectPromise` in tests
yaacovCR Aug 14, 2022
fd7ca08
resources: Move `mkdirSync` into `writeGeneratedFile` (#3697)
IvanGoncharov Aug 15, 2022
3897594
resources: merge execOutput and exec into single function (#3698)
IvanGoncharov Aug 16, 2022
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
29 changes: 6 additions & 23 deletions .babelrc-npm.json
Original file line number Diff line number Diff line change
@@ -1,27 +1,10 @@
{
"presets": [
["@babel/preset-env", { "modules": false, "targets": { "node": "14" } }]
],
"plugins": [
["./resources/add-extension-to-import-paths.js", { "extension": "js" }],
"@babel/plugin-transform-typescript",
"./resources/inline-invariant"
],
"env": {
"cjs": {
"presets": [
[
"@babel/preset-env",
{ "modules": "commonjs", "targets": { "node": "12" } }
]
],
"plugins": [
["./resources/add-extension-to-import-paths", { "extension": "js" }]
]
},
"mjs": {
"presets": [
["@babel/preset-env", { "modules": false, "targets": { "node": "12" } }]
],
"plugins": [
["./resources/add-extension-to-import-paths", { "extension": "mjs" }]
]
}
}
"./resources/inline-invariant.js"
]
}
6 changes: 2 additions & 4 deletions .c8rc.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,13 @@
"src/jsutils/Maybe.ts",
"src/jsutils/ObjMap.ts",
"src/jsutils/PromiseOrValue.ts",
"src/utilities/assertValidName.ts",
"src/utilities/typedQueryDocumentNode.ts",
"src/**/__tests__/**/*.ts"
],
"clean": true,
"temp-directory": "coverage",
"report-dir": "coverage",
"report-dir": "reports/coverage",
"skip-full": true,
"reporter": ["json", "html", "text"],
"reporter": ["html", "text"],
"check-coverage": true,
"branches": 100,
"lines": 100,
Expand Down
3 changes: 2 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# Copied from '.gitignore', please keep it in sync.
/.eslintcache
/.stryker-tmp
/node_modules
/coverage
/reports
/npmDist
/denoDist
/websiteDist
Expand Down
48 changes: 31 additions & 17 deletions .eslintrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ parserOptions:
sourceType: script
env:
es2022: true
shared-node-browser: true
reportUnusedDisableDirectives: true
plugins:
- internal-rules
Expand All @@ -10,7 +11,10 @@ plugins:
- simple-import-sort
settings:
node:
tryExtensions: ['.js', '.jsx', '.json', '.node', '.ts', '.d.ts']
tryExtensions: ['.js', '.ts', '.jsx', '.json', '.node', '.d.ts']
# eslint-plugin-import tries to parse all imported files included huge ones (e.g. 'typescript')
# that leads to very poor perfomance so to fix that we disable all checks on external files.
import/ignore: ['node_modules']

rules:
##############################################################################
Expand All @@ -34,7 +38,7 @@ rules:
node/no-exports-assign: error
node/no-extraneous-import: error
node/no-extraneous-require: error
node/no-missing-import: error
node/no-missing-import: [error, { allowModules: ['graphql'] }]
node/no-missing-require: error
node/no-new-require: error
node/no-path-concat: error
Expand Down Expand Up @@ -80,7 +84,7 @@ rules:

# Static analysis
# https://github.com/benmosher/eslint-plugin-import#static-analysis
import/no-unresolved: error
import/no-unresolved: [error, { ignore: ['graphql'] }]
import/named: error
import/default: error
import/namespace: error
Expand Down Expand Up @@ -146,6 +150,9 @@ rules:
simple-import-sort/imports:
- error
- groups:
# Node.js builtin modules
- ["^node:\\w"]

# Packages.
# Things that start with a letter (or digit or underscore), or `@` followed by a letter.
- ["^@?\\w"]
Expand All @@ -172,7 +179,7 @@ rules:
simple-import-sort/exports: off # TODO

##############################################################################
# ESLint builtin rules list based on `v8.13.x`
# ESLint builtin rules list based on `v8.21.x`
##############################################################################

# Possible Errors
Expand All @@ -184,6 +191,7 @@ rules:
no-await-in-loop: error
no-compare-neg-zero: error
no-cond-assign: error
no-constant-binary-expression: error
no-console: warn
no-constant-condition: error
no-control-regex: error
Expand Down Expand Up @@ -340,7 +348,7 @@ rules:
max-lines: off
max-lines-per-function: off
max-nested-callbacks: off
max-params: off
max-params: [error, 5] # TODO: drop to default number, which is 3
max-statements: off
max-statements-per-line: off
multiline-comment-style: off
Expand Down Expand Up @@ -487,7 +495,7 @@ overrides:
tsdoc/syntax: error

##########################################################################
# `@typescript-eslint/eslint-plugin` rule list based on `v5.19.x`
# `@typescript-eslint/eslint-plugin` rule list based on `v5.33.x`
##########################################################################

# Supported Rules
Expand All @@ -499,6 +507,7 @@ overrides:
'@typescript-eslint/ban-tslint-comment': error
'@typescript-eslint/ban-types': off # TODO temporarily disabled
'@typescript-eslint/class-literal-property-style': off # TODO enable after TS conversion
'@typescript-eslint/consistent-generic-constructors': error
'@typescript-eslint/consistent-indexed-object-style':
[error, index-signature]
'@typescript-eslint/consistent-type-assertions': off # TODO temporarily disable
Expand All @@ -514,6 +523,7 @@ overrides:
'@typescript-eslint/no-base-to-string': error
'@typescript-eslint/no-confusing-non-null-assertion': error
'@typescript-eslint/no-confusing-void-expression': off # TODO enable with ignoreArrowShorthand
'@typescript-eslint/no-duplicate-enum-values': error
'@typescript-eslint/no-dynamic-delete': off
'@typescript-eslint/no-empty-interface': error
'@typescript-eslint/no-explicit-any': off # TODO error
Expand All @@ -531,7 +541,6 @@ overrides:
'@typescript-eslint/no-non-null-asserted-nullish-coalescing': error
'@typescript-eslint/no-non-null-asserted-optional-chain': error
'@typescript-eslint/no-non-null-assertion': error
'@typescript-eslint/no-parameter-properties': error
'@typescript-eslint/no-redundant-type-constituents': error
'@typescript-eslint/no-invalid-void-type': error
'@typescript-eslint/no-require-imports': error
Expand All @@ -551,6 +560,7 @@ overrides:
'@typescript-eslint/no-useless-empty-export': error
'@typescript-eslint/no-var-requires': error
'@typescript-eslint/non-nullable-type-assertion-style': off #TODO temporarily disabled
'@typescript-eslint/parameter-properties': error
'@typescript-eslint/prefer-as-const': error
'@typescript-eslint/prefer-enum-initializers': error
'@typescript-eslint/prefer-for-of': error
Expand Down Expand Up @@ -668,40 +678,44 @@ overrides:
node: true
rules:
node/no-sync: off
node/no-unpublished-require: [error, { allowModules: ['mocha'] }]
node/no-unpublished-import: [error, { allowModules: ['mocha'] }]
import/no-extraneous-dependencies: [error, { devDependencies: true }]
import/no-namespace: off
import/no-nodejs-modules: off
- files: 'integrationTests/*/**'
parserOptions:
sourceType: module
env:
node: true
rules:
node/no-sync: off
node/no-missing-require: [error, { allowModules: ['graphql'] }]
import/no-commonjs: off
import/no-nodejs-modules: off
no-console: off
- files: 'benchmark/**'
parserOptions:
sourceType: module
env:
node: true
rules:
internal-rules/only-ascii: [error, { allowEmoji: true }]
node/no-sync: off
node/no-missing-require: off
import/no-unresolved: off
import/no-nodejs-modules: off
import/no-commonjs: off
no-console: off
no-await-in-loop: off
- files: 'resources/**'
env:
node: true
rules:
internal-rules/only-ascii: [error, { allowEmoji: true }]
node/no-unpublished-require: off
node/no-unpublished-import: off
node/no-sync: off
import/no-namespace: off
import/no-extraneous-dependencies: [error, { devDependencies: true }]
import/no-nodejs-modules: off
import/no-commonjs: off
no-console: off
- files: 'resources/eslint-internal-rules/**'
env:
node: true
rules:
import/no-commonjs: off
- files: '**/*.jsx'
parserOptions:
sourceType: module
Expand Down
43 changes: 4 additions & 39 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
name: CI
on:
workflow_call:
secrets:
codecov_token:
required: true
on: workflow_call
permissions: {}
jobs:
lint:
Expand Down Expand Up @@ -144,41 +140,12 @@ jobs:
- name: Run Tests
run: npm run fuzzonly

coverage:
name: Measure test coverage
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
persist-credentials: false

- name: Setup Node.js
uses: actions/setup-node@v4
with:
cache: npm
node-version-file: '.node-version'

- name: Install Dependencies
run: npm ci --ignore-scripts

- name: Run tests and measure code coverage
run: npm run testonly:cover

- name: Upload coverage to Codecov
if: ${{ always() }}
uses: codecov/codecov-action@v4
with:
file: ./coverage/coverage-final.json
fail_ci_if_error: true
token: ${{ secrets.codecov_token }}

test:
name: Run tests on Node v${{ matrix.node_version_to_setup }}
runs-on: ubuntu-latest
strategy:
matrix:
node_version_to_setup: [12, 14, 16, 17]
node_version_to_setup: [14, 16, 18]
permissions:
contents: read # for actions/checkout
steps:
Expand All @@ -196,8 +163,8 @@ jobs:
- name: Install Dependencies
run: npm ci --ignore-scripts

- name: Run Tests
run: npm run testonly
- name: Run Tests with coverage
run: npm run testonly:cover

codeql:
name: Run CodeQL security scan
Expand All @@ -222,7 +189,6 @@ jobs:
build-npm-dist:
name: Build 'npmDist' artifact
runs-on: ubuntu-latest
needs: [test, fuzz, lint, integrationTests]
permissions:
contents: read # for actions/checkout
steps:
Expand Down Expand Up @@ -252,7 +218,6 @@ jobs:
build-deno-dist:
name: Build 'denoDist' artifact
runs-on: ubuntu-latest
needs: [test, fuzz, lint, integrationTests]
permissions:
contents: read # for actions/checkout
steps:
Expand Down
32 changes: 32 additions & 0 deletions .github/workflows/mutation-testing.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Mutation Testing
on:
workflow_dispatch:
schedule:
- cron: '0 0 * * *' # run once every day at 00:00 UTC
jobs:
lint:
name: Run mutation testing
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
with:
persist-credentials: false

- name: Setup Node.js
uses: actions/setup-node@v3
with:
cache: npm
node-version-file: '.node-version'

- name: Install Dependencies
run: npm ci --ignore-scripts

- name: Run mutation testing
run: npm run testonly:mutate

- name: Upload mutation testing report
uses: actions/upload-artifact@v3
with:
name: mutationTestingReport
path: ./reports/mutation/mutation.html
6 changes: 2 additions & 4 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ jobs:
contents: read # for actions/checkout
security-events: write # for codeql-action
uses: ./.github/workflows/ci.yml
secrets:
codecov_token: ${{ secrets.CODECOV_TOKEN }}

dependency-review:
name: Security check of added dependencies
Expand Down Expand Up @@ -50,11 +48,11 @@ jobs:
run: npm ci --ignore-scripts

- name: Generate report
run: 'node resources/diff-npm-package.js BASE HEAD'
run: 'npm run diff:npm BASE HEAD'

- name: Upload generated report
uses: actions/upload-artifact@v4
with:
name: npm-dist-diff.html
path: ./npm-dist-diff.html
path: ./reports/npm-dist-diff.html
if-no-files-found: ignore
2 changes: 0 additions & 2 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ jobs:
contents: read # for actions/checkout
security-events: write
uses: ./.github/workflows/ci.yml
secrets:
codecov_token: ${{ secrets.CODECOV_TOKEN }}
deploy-to-npm-branch:
name: Deploy to `npm` branch
needs: ci
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@
/diff-npm-package.html
/.eslintcache
/.cspellcache
/.stryker-tmp
node_modules
/coverage
/reports
/npmDist
/denoDist
/websiteDist
Expand Down
2 changes: 1 addition & 1 deletion .mocharc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ fail-zero: true
throw-deprecation: true
check-leaks: true
require:
- 'resources/ts-register.js'
- 'ts-node/register/transpile-only'
extension:
- 'ts'
2 changes: 1 addition & 1 deletion .node-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v17
v18
Loading
Loading