Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .github/workflows/ci_validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,10 @@ jobs:

- name: Run unit tests
run: npm test

- name: Verify ESM compatibility
if: matrix.node-version == '16.x'
working-directory: './test-esm'
run: |
npm ci
npm test
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,6 @@ test/development/secrets.ts

.idea/*

testResult.xml
testResult.xml

test-esm/lib/*
3 changes: 2 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ src/
scripts/
design/
changelogs/
testResult.xml
testResult.xml
test-esm/
2,909 changes: 861 additions & 2,048 deletions package-lock.json

Large diffs are not rendered by default.

17 changes: 6 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,10 @@
"prepack": "npm install && npm run build && npm run test",
"pre-build": "npm run setVersion",
"setVersion": "gulp setVersion",
"test": "npm run test:cjs && npm run test:esm",
"test": "npm run test:cjs && npm run karma",
"test:cjs": "npm run build:sub_cjs && mocha",
"test:coverage": "TS_NODE_PROJECT='./tsconfig-cjs.json' nyc mocha --require isomorphic-fetch -r ts-node/register test/common/**/*.ts && mocha --require isomorphic-fetch -r ts-node/register test/common/**/*.ts",
"test:development": "tsc --p test/tsconfig-test-development.json && mocha 'lib/test/development/**/*.js' --require isomorphic-fetch",
"test:esm": "npm run build:sub_es && mocha --require esm"
"test:development": "tsc --p test/tsconfig-test-development.json && mocha 'lib/test/development/**/*.js' --require isomorphic-fetch"
},
"mocha": {
"reporter": [
Expand All @@ -63,13 +62,10 @@
},
"spec": [
"lib/test/common/**/*.js",
"lib/test/node/**/*.js",
"lib/es/test/common/**/*.js",
"lib/es/test/node/**/*.js"
"lib/test/node/**/*.js"
],
"require": [
"isomorphic-fetch",
"esm"
"isomorphic-fetch"
]
},
"nyc": {
Expand Down Expand Up @@ -101,7 +97,7 @@
"@rollup/plugin-node-resolve": "^15.0.0",
"@rollup/plugin-terser": "^0.3.0",
"@types/chai": "^4.2.14",
"@types/mocha": "^9.0.0",
"@types/mocha": "^10.0.1",
"@types/node": "^18.0.0",
"@types/sinon": "^10.0.8",
"@typescript-eslint/eslint-plugin": "^5.12.1",
Expand All @@ -111,7 +107,6 @@
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-simple-import-sort": "^8.0.0",
"esm": "^3.2.25",
"form-data": "^4.0.0",
"gulp": "^4.0.2",
"husky": "^8.0.0",
Expand All @@ -123,7 +118,7 @@
"karma-mocha": "^2.0.1",
"karma-typescript": "^5.2.0",
"lint-staged": "^13.0.0",
"mocha": "^6.2.3",
"mocha": "^10.2.0",
"mocha-junit-reporter": "^2.1.1",
"nyc": "^15.1.0",
"prettier": "^2.5.1",
Expand Down
1 change: 1 addition & 0 deletions test-esm/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The test-esm project verifies if the Graph JS Client compiles with ESM projects successfully.
Loading