diff --git a/.github/workflows/check-dist.yml b/.github/workflows/check-dist.yml index a89180c..8339624 100644 --- a/.github/workflows/check-dist.yml +++ b/.github/workflows/check-dist.yml @@ -31,7 +31,7 @@ jobs: - name: Compare the expected and actual dist/ directories run: | - if [ "$(git diff --ignore-space-at-eol dist/ | wc -l)" -gt "0" ]; then + if [ "$(git diff dist/ | wc -l)" -gt "0" ]; then echo "Detected uncommitted changes after build. See status below:" git diff exit 1 diff --git a/package-lock.json b/package-lock.json index e1586b2..df2d315 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17,6 +17,7 @@ }, "devDependencies": { "@vercel/ncc": "^0.36.1", + "linefix": "^0.1.1", "typescript": "5.0.4" }, "funding": { @@ -414,6 +415,15 @@ "node": ">=4" } }, + "node_modules/linefix": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/linefix/-/linefix-0.1.1.tgz", + "integrity": "sha512-fHYLcNWUGTs3QjR8GD8tzHmkVbIoTbjcB5MLXs1Iu1cZazTvcUKaCiuarDM0jVygLnpxLTVbbihLJevKARmqrA==", + "dev": true, + "bin": { + "linefix": "bin/fix.js" + } + }, "node_modules/mime-db": { "version": "1.52.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", @@ -918,6 +928,12 @@ "resolved": "https://registry.npmjs.org/ip-regex/-/ip-regex-2.1.0.tgz", "integrity": "sha512-58yWmlHpp7VYfcdTwMTvwMmqx/Elfxjd9RXTDyMsbL7lLWmhMylLEqiYVLKuLzOZqVgiWXD9MfR62Vv89VRxkw==" }, + "linefix": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/linefix/-/linefix-0.1.1.tgz", + "integrity": "sha512-fHYLcNWUGTs3QjR8GD8tzHmkVbIoTbjcB5MLXs1Iu1cZazTvcUKaCiuarDM0jVygLnpxLTVbbihLJevKARmqrA==", + "dev": true + }, "mime-db": { "version": "1.52.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", diff --git a/package.json b/package.json index 31d6ad4..8dc89cb 100644 --- a/package.json +++ b/package.json @@ -30,9 +30,10 @@ }, "devDependencies": { "@vercel/ncc": "^0.36.1", + "linefix": "^0.1.1", "typescript": "5.0.4" }, "scripts": { - "prepare": "ncc build --target es2020 -o dist/restore src/restore.ts && ncc build --target es2020 -o dist/save src/save.ts" + "prepare": "ncc build --target es2020 -o dist/restore src/restore.ts && ncc build --target es2020 -o dist/save src/save.ts && linefix dist" } }