Skip to content

Commit

Permalink
feat: add patch step
Browse files Browse the repository at this point in the history
  • Loading branch information
coodos committed Aug 15, 2024
1 parent dc3154c commit d224870
Show file tree
Hide file tree
Showing 6 changed files with 1,613 additions and 8,284 deletions.
Binary file modified .DS_Store
Binary file not shown.
13 changes: 4 additions & 9 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,25 +46,20 @@ jobs:
node-version: "20.x"
registry-url: "https://registry.npmjs.org"

- name: Setup pnpm
uses: pnpm/action-setup@v3 # docs https://pnpm.io/continuous-integration#github-actions
with:
version: 8 # Optional: specify a pnpm versio

- name: install deps
run: pnpm i
run: yarn

- name: build
run: pnpm build
run: yarn build

- name: Publish tagged version
if: steps.release.outputs.tag != ''
run: pnpm version --no-git-tag-version ${{ steps.release.outputs.version }} && pnpm publish --tag ${{ steps.release.outputs.tag }} --access public
run: yarn publish --new-version ${{ steps.release.outputs.version }} --tag ${{ steps.release.outputs.tag }} --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Publish version
if: steps.release.outputs.tag == ''
run: pnpm version --no-git-tag-version ${{ steps.release.outputs.version }} && pnpm publish --access public
run: yarn publish --new-version ${{ steps.release.outputs.version }} --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
9 changes: 2 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@
"author": "Merul <[email protected]>",
"license": "GPL-2.0",
"scripts": {
"build": "tsc; fix-esm-import-path ./dist;",
"build": "yarn postinstall; tsc; fix-esm-import-path ./dist;",
"test": "jest",
"coverage": "jest --coverage",
"lint": "eslint . --cache",
"format": "prettier -w \"**/*.{ts,js,json,scss,css}\"",
"format-check": "prettier -c \"src/**{ts,js,json,scss,css}\"",
"semantic-release": "semantic-release --branches main",
"dev": "nodemon --watch './**/*.ts' --exec 'node --experimental-specifier-resolution=node --trace-warnings --loader ts-node/esm' src/test.ts",
"postinstall": "patch-package"
"postinstall": "cd $INIT_CWD && ./node_modules/.bin/patch-package --patch-dir ./patches"
},
"devDependencies": {
"@types/jest": "^29.5.3",
Expand Down Expand Up @@ -45,10 +45,5 @@
"nanoid": "^5.0.7",
"patch-package": "^8.0.0",
"postinstall-postinstall": "^2.1.0"
},
"pnpm": {
"patchedDependencies": {
"@iota/[email protected]": "patches/@[email protected]"
}
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
diff --git a/package.json b/package.json
index c7e0c7a67cafa27f98b503fdb47d115db14ea77d..4a400e147c00edcfb815c6c580d0da598cabc98b 100644
--- a/package.json
+++ b/package.json
diff --git a/node_modules/@iota/sdk-wasm/package.json b/node_modules/@iota/sdk-wasm/package.json
index c7e0c7a..4a400e1 100644
--- a/node_modules/@iota/sdk-wasm/package.json
+++ b/node_modules/@iota/sdk-wasm/package.json
@@ -17,6 +17,16 @@
"!web/test/",
"!node/test/"
Expand Down
Loading

0 comments on commit d224870

Please sign in to comment.