-
Notifications
You must be signed in to change notification settings - Fork 16
Modernize #36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Modernize #36
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
module.exports = { | ||
parser: '@typescript-eslint/parser', | ||
plugins: ['@typescript-eslint'], | ||
parserOptions: { | ||
project: './tsconfig.json' | ||
}, | ||
extends: [ | ||
'eslint:recommended', | ||
'plugin:@typescript-eslint/recommended', | ||
'prettier', | ||
'prettier/@typescript-eslint', | ||
'plugin:prettier/recommended' | ||
], | ||
rules: { | ||
'interface-name': 0, | ||
'object-literal-sort-keys': 0, | ||
'no-increment-decrement': 0, | ||
'@typescript-eslint/no-explicit-any': 0, | ||
'@typescript-eslint/no-unused-vars': 0, | ||
'@typescript-eslint/explicit-module-boundary-types': 0, | ||
'@typescript-eslint/no-non-null-assertion': 0 | ||
} | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: Continuous Integration | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
test-and-lint: | ||
name: Run tests and lint | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Install node | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: '14.x' | ||
- run: yarn install | ||
- run: yarn lint | ||
- run: yarn typecheck | ||
- run: yarn test | ||
- run: yarn build |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,50 +1,46 @@ | ||
{ | ||
"name": "graphql-query-rewriter", | ||
"name": "@graphql-query-rewriter/core", | ||
"version": "0.0.1", | ||
"description": "", | ||
"keywords": [], | ||
"main": "dist/index.umd.js", | ||
"module": "dist/index.es5.js", | ||
"typings": "dist/types/index.d.ts", | ||
"keywords": [ | ||
"graphql", | ||
"query", | ||
"rewriter", | ||
"ast", | ||
"schema" | ||
], | ||
"main": "dist/index.js", | ||
"types": "dist/index.d.ts", | ||
"files": [ | ||
"dist" | ||
], | ||
"author": "David Chanin <chanindav@gmail.com>", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/ef-eng/graphql-query-rewriter" | ||
"url": "https://github.com/ef-en/graphql-query-rewriter" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this URL isn't correct - should be https://github.com/graphql-query-rewriter/core |
||
}, | ||
"license": "MIT", | ||
"engines": { | ||
"node": ">=6.0.0" | ||
"node": ">=10.0.0" | ||
}, | ||
"scripts": { | ||
"lint": "tslint --project tsconfig.json -t codeFrame 'src/**/*.ts' 'test/**/*.ts'", | ||
"prebuild": "rimraf dist", | ||
"build": "tsc --module commonjs && rollup -c rollup.config.ts && typedoc --out docs --target es6 --theme minimal --mode file src", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think it's probably fine to get rid of rollup, just out of curiosity why remove it? Is it related to updating the node version? This wall all from https://github.com/alexjoverm/typescript-library-starter There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah I saw the similarities, I reality I never saw something similar to that setup. If you look around all libs that mainly support node all use similar tsconfig and output commonjs code with types near the js code. So unless we need to do something fancy there is no need at this point to support es5/umd/other types of import. |
||
"start": "rollup -c rollup.config.ts -w", | ||
"lint": "eslint --ext .ts,.js src/ test/", | ||
"prebuild": "rimraf dist && rimraf docs", | ||
"build": "tsc -p tsconfig.build.json && typedoc --tsconfig tsconfig.build.json", | ||
"test": "jest --coverage", | ||
"test:watch": "jest --coverage --watch", | ||
"test:prod": "npm run lint && npm run test -- --no-cache", | ||
"deploy-docs": "ts-node tools/gh-pages-publish", | ||
"report-coverage": "cat ./coverage/lcov.info | coveralls", | ||
"commit": "git-cz", | ||
"semantic-release": "semantic-release", | ||
"semantic-release-prepare": "ts-node tools/semantic-release-prepare", | ||
"precommit": "lint-staged", | ||
"travis-deploy-once": "travis-deploy-once" | ||
"typecheck": "tsc -p tsconfig.build.json --noEmit" | ||
}, | ||
"lint-staged": { | ||
"{src,test}/**/*.ts": [ | ||
"prettier --write", | ||
"git add" | ||
"prettier --write" | ||
] | ||
}, | ||
"config": { | ||
"commitizen": { | ||
"path": "node_modules/cz-conventional-changelog" | ||
} | ||
}, | ||
"jest": { | ||
"transform": { | ||
".(ts|tsx)": "ts-jest" | ||
|
@@ -76,52 +72,45 @@ | |
"prettier": { | ||
"singleQuote": true | ||
}, | ||
"husky": { | ||
"hooks": { | ||
"pre-commit": "lint-staged", | ||
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS" | ||
} | ||
}, | ||
"commitlint": { | ||
"extends": [ | ||
"@commitlint/config-conventional" | ||
] | ||
}, | ||
"devDependencies": { | ||
"@commitlint/cli": "^7.1.2", | ||
"@commitlint/config-conventional": "^7.1.2", | ||
"@types/express": "^4.16.1", | ||
"@types/graphql": "^14.2.0", | ||
"@types/jest": "^23.3.2", | ||
"@types/node": "^10.11.0", | ||
"colors": "^1.3.2", | ||
"commitizen": "^3.0.0", | ||
"coveralls": "^3.0.2", | ||
"cross-env": "^5.2.0", | ||
"cz-conventional-changelog": "^2.1.0", | ||
"dedent-js": "^1.0.1", | ||
"graphql": "^14.2.1", | ||
"husky": "^1.0.1", | ||
"jest": "^23.6.0", | ||
"jest-config": "^23.6.0", | ||
"lint-staged": "^8.0.0", | ||
"lodash.camelcase": "^4.3.0", | ||
"prettier": "^1.14.3", | ||
"prompt": "^1.0.0", | ||
"replace-in-file": "^3.4.2", | ||
"rimraf": "^2.6.2", | ||
"rollup": "^0.67.0", | ||
"rollup-plugin-commonjs": "^9.1.8", | ||
"rollup-plugin-json": "^3.1.0", | ||
"rollup-plugin-node-resolve": "^3.4.0", | ||
"rollup-plugin-sourcemaps": "^0.4.2", | ||
"rollup-plugin-typescript2": "^0.18.0", | ||
"semantic-release": "^15.9.16", | ||
"shelljs": "^0.8.3", | ||
"travis-deploy-once": "^5.0.9", | ||
"ts-jest": "^23.10.2", | ||
"ts-node": "^7.0.1", | ||
"tslint": "^5.11.0", | ||
"tslint-config-airbnb": "^5.11.1", | ||
"tslint-config-prettier": "^1.15.0", | ||
"typedoc": "^0.12.0", | ||
"typescript": "~3.3.0" | ||
"@commitlint/cli": "11.0.0", | ||
"@commitlint/config-conventional": "11.0.0", | ||
"@types/express": "4.17.11", | ||
"@types/jest": "26.0.20", | ||
"@types/node": "14.14.25", | ||
"@typescript-eslint/eslint-plugin": "4.14.1", | ||
"@typescript-eslint/parser": "4.14.1", | ||
"colors": "1.4.0", | ||
"coveralls": "3.1.0", | ||
"dedent-js": "1.0.1", | ||
"eslint": "7.19.0", | ||
"eslint-config-prettier": "7.2.0", | ||
"eslint-plugin-prettier": "3.3.1", | ||
"graphql": "15.5.0", | ||
"husky": "4.3.8", | ||
"jest": "26.6.3", | ||
"lint-staged": "10.5.3", | ||
"prettier": "2.2.1", | ||
"rimraf": "3.0.2", | ||
"semantic-release": "17.3.7", | ||
"shelljs": "0.8.4", | ||
"ts-jest": "26.5.0", | ||
"ts-node": "9.1.1", | ||
"typedoc": "0.20.20", | ||
"typescript": "4.1.3" | ||
}, | ||
"peerDependencies": { | ||
"graphql": "^0.12.0 || ^0.13.0 || ^14.0.0" | ||
"graphql": "^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0" | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"extends": ["config:base"], | ||
"timezone": "America/New_York", | ||
"schedule": ["before 10am on Friday"], | ||
"lockFileMaintenance": { | ||
"enabled": true, | ||
"schedule": "before 10am on Friday" | ||
}, | ||
"packageRules": [ | ||
{ | ||
"updateTypes": ["minor", "patch", "pin", "digest"], | ||
"automerge": true | ||
} | ||
] | ||
} |
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also need to add
yarn report-coverage
and set up coveralls for GH actions