Skip to content
This repository has been archived by the owner on Mar 20, 2023. It is now read-only.

chore: update to the latest dependencies #793

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions .eslintrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,16 @@ plugins:
- node
- istanbul
- import
- mocha
extends:
- 'plugin:mocha/recommended'
settings:
node:
tryExtensions: ['.js', '.json', '.node', '.ts', '.d.ts']

rules:
mocha/no-mocha-arrows: off

##############################################################################
# Internal rules located in 'resources/eslint-internal-rules'.
# See './resources/eslint-internal-rules/README.md'
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ jobs:
with:
node-version: ${{ env.NODE_VERSION_USED_FOR_DEVELOPMENT }}

# We install bunch of packages during integration tests without locking them
# so we skip cache action to not pollute cache for other jobs.
# We install a bunch of packages during integration tests without locking them
# so skip the cache action to not pollute cache for other jobs.
- name: Install Dependencies
run: npm ci

Expand Down Expand Up @@ -116,7 +116,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node_version_to_setup: [10, 12, 14, 15]
node_version_to_setup: [12, 14, 15, 16, 17]
steps:
- name: Checkout repo
uses: actions/checkout@v2
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,6 @@
/node_modules
/coverage
/npmDist

.idea
.vscode
13 changes: 5 additions & 8 deletions cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,15 @@
"tsconfig.json"
],
"words": [
"charsets",
"codecov",
"downlevel",
"graphiql",
"unfetch",
"noindex",
"codecov",
"originalname",
"recognise",
"serializable",
"subcommand",
"charsets",
"downlevel",

// TODO: remove bellow words
"Graphi", // GraphiQL
"QL's" // GraphQL's
"unfetch"
]
}
1 change: 1 addition & 0 deletions examples/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ const rootValue = {
const app = express();
app.use(
'/graphql',
// eslint-disable-next-line @typescript-eslint/no-misused-promises
graphqlHTTP({
schema,
rootValue,
Expand Down
1 change: 1 addition & 0 deletions examples/index_subscription.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ const subscriptionEndpoint = `ws://localhost:${PORT}/subscriptions`;
const app = express();
app.use(
'/graphql',
// eslint-disable-next-line @typescript-eslint/no-misused-promises
graphqlHTTP({
schema,
rootValue,
Expand Down
1 change: 1 addition & 0 deletions examples/index_subscription_legacy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ const subscriptionEndpoint = `ws://localhost:${PORT}/subscriptions`;
const app = express();
app.use(
'/graphql',
// eslint-disable-next-line @typescript-eslint/no-misused-promises
graphqlHTTP({
schema,
rootValue,
Expand Down
28 changes: 18 additions & 10 deletions integrationTests/integration-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,24 @@ function exec(command, options = {}) {
}

describe('Integration Tests', () => {
const tmpDir = path.join(os.tmpdir(), 'express-graphql-integrationTmp');
fs.rmdirSync(tmpDir, { recursive: true, force: true });
fs.mkdirSync(tmpDir);

const distDir = path.resolve('./npmDist');
const archiveName = exec(`npm --quiet pack ${distDir}`, { cwd: tmpDir });
fs.renameSync(
path.join(tmpDir, archiveName),
path.join(tmpDir, 'express-graphql.tgz'),
);
let tmpDir;

before(function () {
// eslint-disable-next-line no-invalid-this
this.timeout(10000);
tmpDir = path.join(os.tmpdir(), 'express-graphql-integrationTmp');
fs.mkdirSync(tmpDir, { recursive: true });
fs.rmSync(tmpDir, { recursive: true, force: true });
fs.mkdirSync(tmpDir, { recursive: true });

const distDir = path.resolve('./npmDist');
const archiveName = exec(`npm --quiet pack ${distDir}`, { cwd: tmpDir });

fs.renameSync(
path.join(tmpDir, archiveName),
path.join(tmpDir, 'express-graphql.tgz'),
);
});

function testOnNodeProject(projectName) {
exec(`cp -R ${path.join(__dirname, projectName)} ${tmpDir}`);
Expand Down
7 changes: 4 additions & 3 deletions integrationTests/node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@
},
"dependencies": {
"express-graphql": "file:../express-graphql.tgz",
"graphql": "14.7.0",
"node-10": "npm:node@10.x.x",
"graphql": "16.0.1",
"node-12": "npm:node@12.x.x",
"node-14": "npm:node@14.x.x",
"node-15": "npm:node@15.x.x"
"node-15": "npm:node@15.x.x",
"node-16": "npm:node@16.x.x",
"node-17": "npm:node@17.x.x"
}
}
1 change: 1 addition & 0 deletions integrationTests/node/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
const path = require('path');
const childProcess = require('child_process');

// eslint-disable-next-line import/extensions
const { dependencies } = require('./package.json');

const nodeVersions = Object.keys(dependencies)
Expand Down
17 changes: 7 additions & 10 deletions integrationTests/ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,13 @@
"test": "node test.js"
},
"dependencies": {
"@types/node": "14.0.13",
"@types/node": "16.11.11",
"express-graphql": "file:../express-graphql.tgz",
"graphql": "14.7.0",
"typescript-3.4": "npm:typescript@3.4.x",
"typescript-3.5": "npm:typescript@3.5.x",
"typescript-3.6": "npm:typescript@3.6.x",
"typescript-3.7": "npm:typescript@3.7.x",
"typescript-3.8": "npm:typescript@3.8.x",
"typescript-3.9": "npm:typescript@3.9.x",
"typescript-4.0": "npm:typescript@4.0.x",
"typescript-4.1": "npm:typescript@4.1.x"
"graphql": "16.0.1",
"typescript-4.1": "npm:typescript@4.1.x",
"typescript-4.2": "npm:typescript@4.2.x",
"typescript-4.3": "npm:typescript@4.3.x",
"typescript-4.4": "npm:typescript@4.4.x",
"typescript-4.5": "npm:typescript@4.5.x"
}
}
2 changes: 2 additions & 0 deletions integrationTests/ts/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
const path = require('path');
const childProcess = require('child_process');

// eslint-disable-next-line import/extensions
const { dependencies } = require('./package.json');

const tsVersions = Object.keys(dependencies)
Expand All @@ -13,5 +14,6 @@ for (const version of tsVersions) {
console.log(`Testing on ${version} ...`);

const tscPath = path.join(__dirname, 'node_modules', version, 'bin/tsc');
console.log('tscPath', tscPath);
childProcess.execSync(tscPath, { stdio: 'inherit' });
}