Skip to content

Commit

Permalink
feat: drop node 12 support (#8885)
Browse files Browse the repository at this point in the history
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
n1ru4l and github-actions[bot] committed Feb 1, 2023
1 parent c49c066 commit fd0b0c8
Show file tree
Hide file tree
Showing 12 changed files with 2,385 additions and 1,718 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@graphql-codegen/client-preset": patch
---
dependencies updates:
- Updated dependency [`@babel/helper-plugin-utils@^7.20.2` ↗︎](https://www.npmjs.com/package/@babel/helper-plugin-utils/v/7.20.2) (from `^7.14.5`, in `dependencies`)
- Updated dependency [`@babel/template@^7.20.7` ↗︎](https://www.npmjs.com/package/@babel/template/v/7.20.7) (from `^7.15.4`, in `dependencies`)
24 changes: 24 additions & 0 deletions .changeset/hot-bikes-boil.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
'@graphql-cli/codegen': major
'@graphql-codegen/cli': major
'@graphql-codegen/core': major
'@graphql-codegen/add': major
'@graphql-codegen/fragment-matcher': major
'@graphql-codegen/introspection': major
'@graphql-codegen/schema-ast': major
'@graphql-codegen/time': major
'@graphql-codegen/visitor-plugin-common': major
'@graphql-codegen/typescript-document-nodes': major
'@graphql-codegen/gql-tag-operations': major
'@graphql-codegen/typescript-operations': major
'@graphql-codegen/typescript-resolvers': major
'@graphql-codegen/typed-document-node': major
'@graphql-codegen/typescript': major
'@graphql-codegen/client-preset': major
'@graphql-codegen/gql-tag-operations-preset': major
'@graphql-codegen/graphql-modules-preset': major
'@graphql-codegen/testing': major
'@graphql-codegen/plugin-helpers': major
---

drop Node.js 12 support
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,10 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest] # remove windows to speed up the tests
node_version: [12, 14, 16, 18]
node_version: [14, 16, 18]
graphql_version: [15, 16]
include:
- node-version: 12
- node-version: 14
os: windows-latest
graphql_version: 16
steps:
Expand Down
2 changes: 1 addition & 1 deletion examples/front-end/advanced/babel-optimized/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"case-sensitive-paths-webpack-plugin": "2.4.0",
"css-loader": "6.7.3",
"css-minimizer-webpack-plugin": "3.4.1",
"dotenv": "10.0.0",
"dotenv": "16.0.3",
"dotenv-expand": "5.1.0",
"eslint": "8.22.0",
"eslint-config-react-app": "7.0.1",
Expand Down
18 changes: 9 additions & 9 deletions examples/programmatic-typescript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@
"start:mjs": "tsup --onSuccess \"node dist/index.mjs\""
},
"dependencies": {
"@graphql-codegen/core": "*",
"@graphql-codegen/plugin-helpers": "*",
"@graphql-codegen/typed-document-node": "*",
"@graphql-codegen/typescript": "*",
"@graphql-codegen/typescript-operations": "*",
"@graphql-codegen/typescript-resolvers": "*",
"@graphql-tools/graphql-file-loader": "7.5.4",
"@graphql-tools/load": "7.7.6",
"@graphql-tools/schema": "9.0.3",
"@graphql-codegen/core": "2.6.8",
"@graphql-codegen/plugin-helpers": "3.1.2",
"@graphql-codegen/typed-document-node": "2.3.13",
"@graphql-codegen/typescript": "2.8.8",
"@graphql-codegen/typescript-operations": "2.5.13",
"@graphql-codegen/typescript-resolvers": "2.7.13",
"@graphql-tools/graphql-file-loader": "7.5.14",
"@graphql-tools/load": "7.8.10",
"@graphql-tools/schema": "9.0.14",
"graphql": "16.6.0",
"graphql-tag": "2.12.6",
"prettier": "2.7.1"
Expand Down
1 change: 1 addition & 0 deletions examples/yoga-tests/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "example-yoga-tests",
"version": "0.0.0",
"private": true,
"dependencies": {
"graphql-yoga": "3.4.0"
Expand Down
10 changes: 1 addition & 9 deletions jest.project.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,14 @@ const CI = !!process.env.CI;
module.exports = ({ dirname, projectMode = true }) => {
const pkg = require(resolve(dirname, 'package.json'));

const nodeMajorVersion = parseInt(process.version.split('.')[0].substring(1), 10);

const additionalIgnorePatterns = [];

if (nodeMajorVersion <= 12) {
additionalIgnorePatterns.push('yoga-tests');
}

return {
...(CI || !projectMode ? {} : { displayName: pkg.name.replace('@graphql-codegen/', '') }),
transform: { '^.+\\.tsx?$': 'babel-jest' },
testEnvironment: 'node',
rootDir: dirname,
restoreMocks: true,
reporters: ['default'],
modulePathIgnorePatterns: ['dist', '.bob', ...additionalIgnorePatterns],
modulePathIgnorePatterns: ['dist', '.bob'],
moduleNameMapper: pathsToModuleNameMapper(tsconfig.compilerOptions.paths, { prefix: `${ROOT_DIR}/` }),
cacheDirectory: resolve(ROOT_DIR, `${CI ? '' : 'node_modules/'}.cache/jest`),
setupFiles: [`${ROOT_DIR}/dev-test/setup.js`],
Expand Down
4 changes: 2 additions & 2 deletions packages/presets/client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
"@types/babel__template": "7.4.1"
},
"dependencies": {
"@babel/helper-plugin-utils": "^7.14.5",
"@babel/template": "^7.15.4",
"@babel/helper-plugin-utils": "^7.20.2",
"@babel/template": "^7.20.7",
"@graphql-codegen/add": "^3.2.3",
"@graphql-codegen/typed-document-node": "^2.3.13",
"@graphql-codegen/typescript": "^2.8.8",
Expand Down
21 changes: 13 additions & 8 deletions packages/presets/client/tests/babel.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,22 @@ describe('client-preset > babelPlugin', () => {
babelrc: false,
configFile: false,
}).code;

expect(result).toMatchInlineSnapshot(`
"import { CFragmentDoc } from "./graphql";
import { BDocument } from "./graphql";
import { ADocument } from "./graphql";
/* eslint-disable @typescript-eslint/ban-ts-comment */
//@ts-ignore
import gql from 'gql-tag'; //@ts-ignore
import gql from 'gql-tag';
const A = ADocument; //@ts-ignore
//@ts-ignore
const A = ADocument;
const B = BDocument; //@ts-ignore
//@ts-ignore
const B = BDocument;
//@ts-ignore
const C = CFragmentDoc;"
`);
});
Expand All @@ -35,15 +38,17 @@ describe('client-preset > babelPlugin', () => {
"import { CFragmentDoc } from "../graphql";
import { BDocument } from "../graphql";
import { ADocument } from "../graphql";
/* eslint-disable @typescript-eslint/ban-ts-comment */
//@ts-ignore
import gql from 'gql-tag'; //@ts-ignore
import gql from 'gql-tag';
const A = ADocument; //@ts-ignore
//@ts-ignore
const A = ADocument;
const B = BDocument; //@ts-ignore
//@ts-ignore
const B = BDocument;
//@ts-ignore
const C = CFragmentDoc;"
`);
});
Expand Down
20 changes: 12 additions & 8 deletions packages/presets/gql-tag-operations/tests/babel.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,17 @@ describe('gql-tag-operations-preset > babelPlugin', () => {
"import { CFragmentDoc } from "./graphql";
import { BDocument } from "./graphql";
import { ADocument } from "./graphql";
/* eslint-disable @typescript-eslint/ban-ts-comment */
//@ts-ignore
import gql from 'gql-tag'; //@ts-ignore
import gql from 'gql-tag';
const A = ADocument; //@ts-ignore
//@ts-ignore
const A = ADocument;
const B = BDocument; //@ts-ignore
//@ts-ignore
const B = BDocument;
//@ts-ignore
const C = CFragmentDoc;"
`);
});
Expand All @@ -35,15 +37,17 @@ describe('gql-tag-operations-preset > babelPlugin', () => {
"import { CFragmentDoc } from "../graphql";
import { BDocument } from "../graphql";
import { ADocument } from "../graphql";
/* eslint-disable @typescript-eslint/ban-ts-comment */
//@ts-ignore
import gql from 'gql-tag'; //@ts-ignore
import gql from 'gql-tag';
const A = ADocument; //@ts-ignore
//@ts-ignore
const A = ADocument;
const B = BDocument; //@ts-ignore
//@ts-ignore
const B = BDocument;
//@ts-ignore
const C = CFragmentDoc;"
`);
});
Expand Down
2 changes: 1 addition & 1 deletion packages/utils/plugins-helpers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,6 @@
},
"type": "module",
"devDependencies": {
"@graphql-tools/apollo-engine-loader": "7.3.13"
"@graphql-tools/apollo-engine-loader": "7.3.22"
}
}
Loading

0 comments on commit fd0b0c8

Please sign in to comment.