Skip to content

Commit 6360b51

Browse files
committed
Merge remote-tracking branch 'skeleton/master'
2 parents 93f5f85 + 19f7882 commit 6360b51

10 files changed

Lines changed: 4686 additions & 5170 deletions

File tree

.babelrc.js

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,13 @@
1-
module.exports = function(api) {
2-
const plugins = [
3-
'@babel/plugin-syntax-dynamic-import',
4-
'@babel/plugin-proposal-class-properties',
5-
'@babel/plugin-proposal-export-default-from',
6-
'@babel/plugin-proposal-export-namespace-from',
7-
'@babel/plugin-proposal-object-rest-spread',
8-
'@babel/plugin-proposal-optional-chaining',
9-
'@babel/plugin-proposal-nullish-coalescing-operator',
10-
]
1+
module.exports = function (api) {
2+
const plugins = ['@babel/plugin-proposal-class-properties']
113
const presets = [
124
[
135
'@babel/preset-env',
146
api.env('es5')
157
? { forceAllTransforms: true }
16-
: { targets: { node: 'current' } },
8+
: { targets: { node: '12' } },
179
],
18-
'@babel/preset-typescript',
10+
['@babel/preset-typescript', { allowDeclareFields: true }],
1911
]
2012

2113
if (api.env(['test', 'coverage', 'es5'])) {

.circleci/config.yml

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,37 +2,25 @@ version: 2
22
jobs:
33
build:
44
docker:
5-
- image: circleci/node:10
5+
- image: circleci/node:16
66

77
steps:
88
- checkout
9-
- restore_cache:
10-
name: Restore Yarn Package Cache
11-
keys:
12-
- v1-yarn-packages-{{ checksum "yarn.lock" }}
13-
149
- run:
1510
name: Setup NPM Token
1611
command: |
1712
yarn config set registry "https://registry.npmjs.org/"
1813
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > .npmrc
1914
echo "registry=https://registry.npmjs.org/" >> .npmrc
20-
2115
- run:
2216
name: Install Dependencies
2317
command: yarn install --frozen-lockfile
24-
- save_cache:
25-
name: Save Yarn Package Cache
26-
key: v1-yarn-packages-{{ checksum "yarn.lock" }}
27-
paths:
28-
- ~/.cache/yarn
29-
3018
- run:
3119
name: build
3220
command: yarn run prepublishOnly
3321
- run:
3422
name: upload test coverage
35-
command: yarn codecov || true
23+
command: yarn codecov
3624
- run:
3725
name: release
38-
command: yarn run semantic-release || true
26+
command: yarn run semantic-release

.eslintrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"extends": [
33
"@jedwards1211/eslint-config-typescript",
4-
"eslint-config-prettier"
4+
"prettier"
55
],
66
"env": {
77
"node": true

.flowconfig

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
[ignore]
2+
3+
[include]
4+
5+
[libs]
6+
7+
[lints]
8+
9+
[options]
10+
11+
[strict]

.gitignore

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,16 @@
1-
coverage
2-
.nyc_output
1+
/coverage
2+
/.nyc_output
33
node_modules
4-
es
4+
/es
55
.eslintcache
6-
/*.js
7-
/*.js.flow
8-
/*.d.ts
6+
*.js
7+
*.js.flow
8+
*.d.ts
9+
!/flow-typed/**/*.js
10+
!/src/**/*.ts
11+
!/src/**/*.js
12+
!/src/**/*.js.flow
13+
!/test/**/*.ts
14+
!/test/**/*.js
15+
!/test/**/*.js.flow
916
!/.babelrc.js

.npmignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
!**/*.js.flow
44
!**/*.d.ts
55
!/*.md
6-
!yarn.lock
76
/src
87
/test
98
/coverage

package.json

Lines changed: 49 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -6,41 +6,40 @@
66
"scripts": {
77
"lint": "eslint $npm_package_config_lint",
88
"lint:fix": "eslint $npm_package_config_lint",
9-
"lint:watch": "esw --watch $npm_package_config_lint",
10-
"prettier": "prettier --write .babelrc.js *.json *.md *.ts '{src,test}/**/*.{js,ts}'",
11-
"prettier:check": "prettier --list-different .babelrc.js *.json *.md *.ts '{src,test}/**/*.{js,ts}'",
12-
"tsc": "tsc --noEmit",
9+
"prettier": "prettier --write $npm_package_config_prettier",
10+
"prettier:check": "prettier --list-different $npm_package_config_prettier",
11+
"tsc": "tsc",
1312
"tsc:watch": "npm run tsc -- --watch",
14-
"clean": "rimraf es lib $(cd src; ls) *.js *.d.ts",
13+
"clean": "rimraf es lib $(cd src; ls) *.js *.d.ts *.js.flow",
1514
"build": "npm run clean && npm run build:types && npm run build:js",
16-
"build:types": "tsc --emitDeclarationOnly",
17-
"build:js": "babel src --out-dir es --extensions \".ts\" --source-maps inline && cross-env BABEL_ENV=es5 babel src --out-dir . --extensions \".ts\" && copy 'src/**/*.js' .",
15+
"build:types": "tsc -p tsconfig.build.json && tsc -p tsconfig.build.json --outDir es && copy 'src/**/*.js.flow' . && copy 'src/**/*.js.flow' es",
16+
"build:js": "babel src --out-dir es --extensions \".ts\" --source-maps inline && cross-env BABEL_ENV=es5 babel src --out-dir . --extensions \".ts\"",
1817
"test": "cross-env NODE_ENV=test BABEL_ENV=es5 mocha $npm_package_config_mocha && cross-env NODE_ENV=test BABEL_ENV=coverage nyc --reporter=lcov --reporter=text mocha $npm_package_config_mocha",
19-
"test:watch": "cross-env NODE_ENV=test BABEL_ENV=test mocha $npm_package_config_mocha --watch --watch-extensions js,ts",
18+
"test:watch": "cross-env NODE_ENV=test BABEL_ENV=test mocha $npm_package_config_mocha --watch",
2019
"test:debug": "cross-env NODE_ENV=test BABEL_ENV=test mocha --inspect-brk $npm_package_config_mocha",
2120
"codecov": "nyc report --reporter=text-lcov > coverage.lcov; codecov",
22-
"prepublishOnly": "npm run clean && npm run prettier:check && npm run lint && npm test && npm run build",
21+
"prepublishOnly": "npm run clean && npm run prettier:check && npm run lint && flow && npm test && npm run build",
2322
"open:coverage": "open coverage/lcov-report/index.html",
2423
"semantic-release": "semantic-release"
2524
},
2625
"config": {
2726
"lint": "--cache --ext .js,.ts src test",
28-
"mocha": "test/configure.js 'src/**/*.spec.ts' 'test/**/*.spec.ts'",
27+
"mocha": "--extension js --extension ts test/configure.js 'src/**/*.spec.ts' 'test/**/*.ts'",
28+
"prettier": ".babelrc.js *.{json,md} {src,test}/**/*.{js,ts,flow}",
2929
"commitizen": {
3030
"path": "cz-conventional-changelog"
3131
}
3232
},
3333
"husky": {
3434
"hooks": {
35-
"pre-commit": "lint-staged && npm run lint && npm run tsc",
35+
"pre-commit": "lint-staged && npm run lint && npm run tsc && flow",
3636
"commit-msg": "commitlint -e $GIT_PARAMS",
3737
"pre-push": "npm test"
3838
}
3939
},
4040
"lint-staged": {
41-
"*.{js,ts,json,css,md}": [
42-
"prettier --write",
43-
"git add"
41+
"*.{js,ts,json,css,md,flow}": [
42+
"prettier --write"
4443
]
4544
},
4645
"commitlint": {
@@ -83,58 +82,58 @@
8382
},
8483
"homepage": "https://github.com/codemodsquad/graphql-typegen#readme",
8584
"devDependencies": {
86-
"@babel/cli": "^7.1.5",
87-
"@babel/core": "^7.1.6",
88-
"@babel/plugin-proposal-class-properties": "^7.1.0",
89-
"@babel/plugin-proposal-export-default-from": "^7.0.0",
90-
"@babel/plugin-proposal-export-namespace-from": "^7.0.0",
91-
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.4.4",
92-
"@babel/plugin-proposal-object-rest-spread": "^7.0.0",
93-
"@babel/plugin-proposal-optional-chaining": "^7.6.0",
94-
"@babel/plugin-syntax-dynamic-import": "^7.0.0",
95-
"@babel/plugin-transform-runtime": "^7.1.0",
96-
"@babel/preset-env": "^7.1.6",
97-
"@babel/preset-typescript": "^7.7.2",
98-
"@babel/register": "^7.8.3",
99-
"@commitlint/cli": "^8.3.5",
100-
"@commitlint/config-conventional": "^6.0.2",
101-
"@jedwards1211/commitlint-config": "^1.0.0",
102-
"@jedwards1211/eslint-config-typescript": "^1.0.0",
103-
"@types/chai": "^4.2.0",
85+
"@babel/cli": "^7.15.7",
86+
"@babel/core": "^7.15.5",
87+
"@babel/plugin-proposal-export-default-from": "^7.14.5",
88+
"@babel/plugin-proposal-export-namespace-from": "^7.14.5",
89+
"@babel/plugin-transform-runtime": "^7.15.0",
90+
"@babel/preset-env": "^7.15.6",
91+
"@babel/preset-typescript": "^7.15.0",
92+
"@babel/register": "^7.15.3",
93+
"@commitlint/cli": "^13.2.0",
94+
"@commitlint/config-conventional": "^13.2.0",
95+
"@jedwards1211/commitlint-config": "^1.0.2",
96+
"@jedwards1211/eslint-config-typescript": "^2.0.2",
97+
"@jedwards1211/eslint-config": "^2.0.2",
10498
"@types/chai-as-promised": "^7.1.2",
99+
"@types/chai": "^4.2.22",
105100
"@types/fs-extra": "^8.0.1",
106101
"@types/graphql": "^14.5.0",
107102
"@types/jscodeshift": "^0.6.3",
108103
"@types/lodash": "^4.14.149",
109-
"@types/mocha": "^5.2.7",
110-
"@types/node": "^13.7.4",
104+
"@types/mocha": "^9.0.0",
105+
"@types/node": "^16.10.2",
111106
"@types/prettier": "^1.19.0",
112107
"@types/superagent": "^4.1.4",
108+
"@typescript-eslint/eslint-plugin": "^4.32.0",
109+
"@typescript-eslint/parser": "^4.32.0",
110+
"@typescript-eslint/typescript-estree": "^4.32.0",
113111
"babel-eslint": "^10.0.1",
114-
"babel-plugin-istanbul": "^5.1.0",
115-
"chai": "^4.2.0",
112+
"babel-plugin-istanbul": "^6.0.0",
116113
"chai-as-promised": "^7.1.1",
117-
"codecov": "^3.6.5",
114+
"chai": "^4.3.4",
115+
"codecov": "^3.8.3",
118116
"copy": "^0.3.2",
119-
"cross-env": "^5.2.0",
120-
"eslint": "^5.9.0",
121-
"eslint-config-prettier": "^3.3.0",
117+
"cross-env": "^7.0.3",
118+
"eslint-config-prettier": "^8.3.0",
122119
"eslint-watch": "^4.0.2",
123-
"husky": "^1.1.4",
120+
"eslint": "^7.32.0",
121+
"flow-bin": "^0.161.0",
122+
"husky": "^7.0.2",
124123
"istanbul": "^0.4.5",
125124
"jscodeshift": "^0.7.0",
126-
"lint-staged": "^8.0.4",
127-
"mocha": "^6.2.1",
128-
"nyc": "^13.1.0",
129-
"prettier": "^1.15.2",
130-
"prettier-eslint": "^8.8.2",
125+
"lint-staged": "^11.1.2",
126+
"mocha": "^9.1.2",
127+
"nyc": "^15.1.0",
128+
"prettier-eslint": "^13.0.0",
129+
"prettier": "^2.4.1",
131130
"require-glob": "^3.2.0",
132-
"rimraf": "^2.6.0",
133-
"semantic-release": "^15.1.4",
134-
"typescript": "^3.7.2"
131+
"rimraf": "^3.0.2",
132+
"semantic-release": "^18.0.0",
133+
"typescript": "^4.4.3"
135134
},
136135
"dependencies": {
137-
"@babel/runtime": "^7.1.5",
136+
"@babel/runtime": "^7.15.4",
138137
"fs-extra": "^8.1.0",
139138
"graphql": "^14.6.0",
140139
"graphql-tag": "^2.10.1",
@@ -145,23 +144,5 @@
145144
"lodash": "^4.17.15",
146145
"pkg-conf": "^3.1.0",
147146
"superagent": "^5.2.1"
148-
},
149-
"renovate": {
150-
"extends": [
151-
":separateMajorReleases",
152-
":combinePatchMinorReleases",
153-
":ignoreUnstable",
154-
":prImmediately",
155-
":renovatePrefix",
156-
":updateNotScheduled",
157-
":preserveSemverRanges",
158-
":semanticPrefixFixDepsChoreOthers",
159-
":automergeDisabled",
160-
"group:monorepos"
161-
],
162-
"automerge": true,
163-
"major": {
164-
"automerge": false
165-
}
166147
}
167148
}

tsconfig.build.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"extends": "./tsconfig.json",
3+
"include": ["./src"],
4+
"exclude": ["node_modules", "./src/**/*.spec.ts", "./test"],
5+
"compilerOptions": {
6+
"declaration": true /* Generates corresponding '.d.ts' file. */,
7+
"noEmit": false
8+
}
9+
}

tsconfig.json

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,25 @@
11
{
22
"include": ["./src"],
3-
"exclude": ["node_modules", "./src/**/*.spec.ts", "./test"],
3+
"exclude": ["node_modules"],
44
"compilerOptions": {
55
/* Basic Options */
6-
"target": "esnext" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017','ES2018' or 'ESNEXT'. */,
6+
"target": "es2019" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017','ES2018' or 'ESNEXT'. */,
77
"module": "commonjs" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */,
8-
// "lib": [], /* Specify library files to be included in the compilation. */
8+
"lib": [
9+
"es2019"
10+
] /* Specify library files to be included in the compilation. */,
911
// "allowJs": true, /* Allow javascript files to be compiled. */
1012
// "checkJs": true, /* Report errors in .js files. */
1113
// "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */
12-
"declaration": true /* Generates corresponding '.d.ts' file. */,
14+
// "declaration": true /* Generates corresponding '.d.ts' file. */,
1315
// "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */
1416
// "sourceMap": true, /* Generates corresponding '.map' file. */
1517
// "outFile": "./", /* Concatenate and emit output to single file. */
1618
"outDir": "./" /* Redirect output structure to the directory. */,
1719
// "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */
1820
// "composite": true, /* Enable project compilation */
1921
// "removeComments": true, /* Do not emit comments to output. */
20-
// "noEmit": true, /* Do not emit outputs. */
22+
"noEmit": true /* Do not emit outputs. */,
2123
// "importHelpers": true, /* Import emit helpers from 'tslib'. */
2224
// "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */
2325
// "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */

0 commit comments

Comments
 (0)