From 1ed283708d22c605db0c310132af00f31edda9db Mon Sep 17 00:00:00 2001 From: seiry <4397354+seiry@users.noreply.github.com> Date: Sun, 12 Nov 2023 01:19:55 +0800 Subject: [PATCH] ci: add registry back --- .github/workflows/publish.yml | 1 + package.json | 3 ++- src/webWorker.ts | 10 ++++++++++ yarn.lock | 8 ++++++++ 4 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 src/webWorker.ts diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 31e9cd5..d9c6670 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -46,6 +46,7 @@ jobs: # ref is *.*.*, no v run: | yarn build + npm login --registry=https://registry.npmjs.org/ npm publish --access public env: NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} diff --git a/package.json b/package.json index 63a3908..bcd5252 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,7 @@ ], "repository": { "type": "git", - "url": "https://github.com/seiry/use-mmdb" + "url": "git+https://github.com/seiry/use-mmdb.git" }, "scripts": { "dev": "concurrently \"yarn build --watch\" \"yarn storybook\" \"yarn test\" ", @@ -111,6 +111,7 @@ "@vitejs/plugin-react": "^4.0.3", "@vitest/coverage-v8": "^0.34.0", "babel-loader": "9.1.3", + "comlink": "^4.4.1", "concurrently": "8.2.2", "eslint": "8.53.0", "eslint-config-airbnb": "19.0.4", diff --git a/src/webWorker.ts b/src/webWorker.ts new file mode 100644 index 0000000..cf225ef --- /dev/null +++ b/src/webWorker.ts @@ -0,0 +1,10 @@ +import { expose } from 'comlink'; + +const obj = { + counter: 0, + inc() { + this.counter++; + }, +}; + +expose(obj); diff --git a/yarn.lock b/yarn.lock index 4779211..3ae6f01 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8842,6 +8842,13 @@ __metadata: languageName: node linkType: hard +"comlink@npm:^4.4.1": + version: 4.4.1 + resolution: "comlink@npm:4.4.1" + checksum: 3d953e987874bf0d60c02a3dd96e9f661141e58709eaab82097369c585382935651ce61f004e7bb1a5eb868ca8d8734d1cec885965ae53c56567d91b9539f2d0 + languageName: node + linkType: hard + "commander@npm:11.1.0": version: 11.1.0 resolution: "commander@npm:11.1.0" @@ -18952,6 +18959,7 @@ __metadata: "@vitest/coverage-v8": "npm:^0.34.0" babel-loader: "npm:9.1.3" buffer: "npm:^6.0.3" + comlink: "npm:^4.4.1" concurrently: "npm:8.2.2" eslint: "npm:8.53.0" eslint-config-airbnb: "npm:19.0.4"