Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0486c75
commit bb6268a
Showing
29 changed files
with
1,226 additions
and
1,195 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ parserOptions: | |
env: | ||
es6: true | ||
node: true | ||
jest: true | ||
plugins: | ||
- import | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,27 @@ | ||
language: node_js | ||
node_js: | ||
- "13" | ||
- "12" | ||
- "10" | ||
|
||
env: | ||
- GRAPHQL_VERSION='0.12' | ||
- GRAPHQL_VERSION='0.13' | ||
- GRAPHQL_VERSION='14.0' | ||
- GRAPHQL_VERSION='14.1' | ||
- GRAPHQL_VERSION='14.2' | ||
- GRAPHQL_VERSION='14.3' | ||
- GRAPHQL_VERSION='14.4' | ||
- GRAPHQL_VERSION='14.5' | ||
- GRAPHQL_VERSION='14.6' | ||
- GRAPHQL_VERSION='latest' | ||
- GRAPHQL_VERSION='rc' | ||
|
||
install: | ||
- npm config set spin=false | ||
- npm install | ||
|
||
script: | ||
- node_version=$(node -v); if [[ ${node_version:1:2} == "13" && $GRAPHQL_VERSION == "14.6" ]]; then | ||
- if [[ $GRAPHQL_VERSION == "latest" ]]; then | ||
npm run lint; | ||
fi | ||
- node_version=$(node -v); if [[ ${node_version:1:2} == "13" && $GRAPHQL_VERSION == "14.6" ]]; then | ||
npm run prettier:check; | ||
- if [[ $GRAPHQL_VERSION == "latest" ]]; then | ||
npm run format:check; | ||
fi | ||
- npm run compile | ||
- npm install graphql@$GRAPHQL_VERSION | ||
- npm run testonly:cover | ||
|
||
after_success: | ||
- npm run coverage | ||
- npm run test | ||
|
||
# Allow Travis tests to run in containers. | ||
sudo: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
const { resolve } = require('path'); | ||
const CI = !!process.env.CI; | ||
|
||
module.exports = { | ||
transform: { '^.+\\.tsx?$': 'ts-jest' }, | ||
testEnvironment: 'node', | ||
rootDir: process.cwd(), | ||
globals: { | ||
'ts-jest': { | ||
diagnostics: false, | ||
tsConfig: 'tsconfig.json' | ||
} | ||
}, | ||
restoreMocks: true, | ||
reporters: ['default'], | ||
modulePathIgnorePatterns: ['dist'], | ||
collectCoverage: CI, | ||
collectCoverageFrom: ['src', '!src/test'] | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import autoExternal from 'rollup-plugin-auto-external'; | ||
import resolveNode from '@rollup/plugin-node-resolve'; | ||
import rollupTypescript from 'rollup-plugin-typescript2'; | ||
|
||
const commonOutputOptions = { | ||
preferConst: true, | ||
sourcemap: true | ||
}; | ||
|
||
export default { | ||
input: 'src/index.ts', | ||
plugins: [ | ||
resolveNode(), | ||
autoExternal({ builtins: true, dependencies: true, peerDependencies: true }), | ||
rollupTypescript() | ||
], | ||
output: [ | ||
{ | ||
...commonOutputOptions, | ||
file: 'dist/index.cjs.js', | ||
format: 'cjs' | ||
}, | ||
{ | ||
...commonOutputOptions, | ||
file: 'dist/index.esm.js', | ||
format: 'esm' | ||
} | ||
] | ||
}; |
Oops, something went wrong.