Skip to content
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
2 changes: 1 addition & 1 deletion .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ module.exports = {
'prefer-exponentiation-operator': 'error',
'prefer-named-capture-group': 'off', // TODO: needs a better support in TS, see https://github.com/microsoft/TypeScript/issues/32098
'prefer-numeric-literals': 'error',
'prefer-object-has-own': 'off', // TODO: requires Node.js v16.9.0
'prefer-object-has-own': 'error',
'prefer-object-spread': 'error',
'prefer-promise-reject-errors': 'error',
'prefer-regex-literals': 'error',
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node_version_to_setup: [14, 16, 18]
node_version_to_setup: [16, 18, 19]
permissions:
contents: read # for actions/checkout
steps:
Expand Down
13,641 changes: 5 additions & 13,636 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"graphql-js"
],
"engines": {
"node": "^14.19.0 || ^16.10.0 || ^18.0.0 || >=19.0.0"
"node": "^16.19.0 || ^18.14.0 || >=19.7.0"
},
"scripts": {
"preversion": ". ./resources/checkgit.sh && npm ci --ignore-scripts",
Expand Down
2 changes: 1 addition & 1 deletion resources/eslint-internal-rules/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"private": true,
"engines": {
"node": ">= 14.0.0"
"node": ">= 16.0.0"
}
}
8 changes: 2 additions & 6 deletions src/execution/values.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ function coerceVariableValues(
continue;
}

if (!hasOwnProperty(inputs, varName)) {
if (!Object.hasOwn(inputs, varName)) {
if (varDefNode.defaultValue) {
coercedValues[varName] = valueFromAST(varDefNode.defaultValue, varType);
} else if (isNonNullType(varType)) {
Expand Down Expand Up @@ -186,7 +186,7 @@ export function getArgumentValues(
const variableName = valueNode.name.value;
if (
variableValues == null ||
!hasOwnProperty(variableValues, variableName)
!Object.hasOwn(variableValues, variableName)
) {
if (argDef.defaultValue !== undefined) {
coercedValues[name] = argDef.defaultValue;
Expand Down Expand Up @@ -249,7 +249,3 @@ export function getDirectiveValues(
return getArgumentValues(directiveDef, directiveNode, variableValues);
}
}

function hasOwnProperty(obj: unknown, prop: string): boolean {
return Object.prototype.hasOwnProperty.call(obj, prop);
}
2 changes: 1 addition & 1 deletion src/language/parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1449,7 +1449,7 @@ export class Parser {
parseDirectiveLocation(): NameNode {
const start = this._lexer.token;
const name = this.parseName();
if (Object.prototype.hasOwnProperty.call(DirectiveLocation, name.value)) {
if (Object.hasOwn(DirectiveLocation, name.value)) {
return name;
}
throw this.unexpected(start);
Expand Down
4 changes: 2 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
],
"compilerOptions": {
"lib": [
"es2020",
"es2022",
"dom" // Workaround for missing web-compatible globals in `@types/node`
],
"target": "es2020",
"target": "es2021",
"module": "es2022",
"moduleResolution": "node",
"noEmit": true,
Expand Down