Skip to content

Commit

Permalink
Merge pull request #76 from iambumblehead/add-minifer-step
Browse files Browse the repository at this point in the history
add minification step at prepublishOnly and test-ci
  • Loading branch information
iambumblehead authored Jul 22, 2022
2 parents ad08ea9 + f4fde36 commit 696191d
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ jobs:
node-version: ${{ matrix.node-version }}
- run: npm install
- run: npm run build --if-present
- run: npm test
- run: npm run test-ci
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# changelog

* 1.8.3 _Jul.21.2022_
* minify sources and dependency, ~13kB smaller
* require newest resolvewithplus package, resolving minification error
* move tests to subdirectory and begin organizing them better
* 1.8.2 _Jul.19.2022_
* improved support for symlinked paths, credit @swivelgames
* 1.8.1 _Jul.19.2022_
Expand Down
12 changes: 10 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "esmock",
"version": "1.8.2",
"version": "1.8.3",
"license": "ISC",
"readmeFilename": "README.md",
"description": "provides native ESM import mocking for unit tests",
Expand Down Expand Up @@ -52,9 +52,17 @@
"rewire"
],
"dependencies": {
"resolvewithplus": "^0.8.2"
"resolvewithplus": "^0.8.4"
},
"scripts": {
"mini:esmock": "npx esbuild ./src/esmock.js --minify --allow-overwrite --outfile=./src/esmock.js",
"mini:esmockCache": "npx esbuild ./src/esmockCache.js --minify --allow-overwrite --outfile=./src/esmockCache.js",
"mini:esmockIsLoader": "npx esbuild ./src/esmockIsLoader.js --minify --allow-overwrite --outfile=./src/esmockIsLoader.js",
"mini:esmockLoader": "npx esbuild ./src/esmockLoader.mjs --minify --allow-overwrite --outfile=./src/esmockLoader.mjs",
"mini:esmockModule": "npx esbuild ./src/esmockModule.js --minify --allow-overwrite --outfile=./src/esmockModule.js",
"mini": "npm run mini:esmock && npm run mini:esmockCache && npm run mini:esmockIsLoader && npm run mini:esmockModule",
"test-ci": "npm run mini && npm run test",
"prepublishOnly": "npm run test-ci; npm pkg delete scripts",
"lint": "npx eslint . --ext .js,.mjs",
"test": "cd tests && npm install && npm test"
}
Expand Down

0 comments on commit 696191d

Please sign in to comment.