Skip to content

Commit 7b6af75

Browse files
hbcarlosfcollonval
andauthored
Integrity check (#132)
* Integrity check * Improve message * Add integrity to lint action Co-authored-by: Frédéric Collonval <[email protected]>
1 parent bd63880 commit 7b6af75

File tree

3 files changed

+213
-11
lines changed

3 files changed

+213
-11
lines changed

.github/workflows/test.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,18 @@ jobs:
6565
run: |
6666
yarn lint:check
6767
68+
- name: Integrity check
69+
if: ${{ !contains(matrix.os, 'windows') }}
70+
working-directory: javascript
71+
run: |
72+
set -ex
73+
yarn integrity
74+
if [[ $(git ls-files --exclude-standard -m | wc -l) > 0 ]]
75+
then
76+
echo "Integrity test failed; please run locally 'yarn integrity' and commit the changes"
77+
exit 1
78+
fi
79+
6880
- name: Run Python tests
6981
run: |
7082
pytest -v

javascript/package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,11 @@
2828
"docs": "typedoc --out ./docs src",
2929
"eslint": "eslint --ext .js,.jsx,.ts,.tsx --cache --fix .",
3030
"eslint:check": "eslint --ext .js,.jsx,.ts,.tsx --cache .",
31-
"lint": "yarn prettier && yarn eslint",
31+
"lint": "yarn integrity && yarn prettier && yarn eslint",
3232
"lint:check": "yarn prettier:check && yarn eslint:check",
3333
"prettier": "prettier --write \"**/*{.ts,.tsx,.js,.jsx,.css,.json}\"",
3434
"prettier:check": "prettier --check \"**/*{.ts,.tsx,.js,.jsx,.css,.json}\"",
35+
"integrity": "yarn tsc-esm-fix --src='src' --ext='.js'",
3536
"test": "jest",
3637
"test:cov": "jest --collect-coverage",
3738
"test:debug": "node --inspect-brk node_modules/.bin/jest --runInBand",
@@ -56,10 +57,11 @@
5657
"eslint-plugin-prettier": "^4.0.0",
5758
"jest": "^29.0.0",
5859
"prettier": "^2.6.0",
60+
"process": "0.11.10",
5961
"rimraf": "^3.0.0",
6062
"typedoc": "^0.23.21",
6163
"typescript": "^4.8.0",
62-
"process": "0.11.10"
64+
"tsc-esm-fix": "^2.20.0"
6365
},
6466
"publishConfig": {
6567
"access": "public"

0 commit comments

Comments
 (0)