From dbd4058912c9ce47cc4de68e0bcb96b2b633acc9 Mon Sep 17 00:00:00 2001 From: Vitaly Turovsky Date: Mon, 28 Oct 2024 17:57:40 +0300 Subject: [PATCH 01/20] should fix publishing to npm --- .github/workflows/publish.yml | 4 ++++ scripts/buildNpmReact.ts | 9 ++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index fa1f0281..c1c6af29 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -47,6 +47,10 @@ jobs: github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: .vercel/output/static force_orphan: true + - name: Set publishing config + run: pnpm config set '//registry.npmjs.org/:_authToken' "${NODE_AUTH_TOKEN}" + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - run: pnpm tsx scripts/buildNpmReact.ts ${{ steps.release.outputs.tag }} if: steps.release.outputs.tag env: diff --git a/scripts/buildNpmReact.ts b/scripts/buildNpmReact.ts index f23a37cc..9d0b3484 100644 --- a/scripts/buildNpmReact.ts +++ b/scripts/buildNpmReact.ts @@ -148,6 +148,13 @@ fs.promises.readdir(path.resolve(__dirname, '../src/react')).then(async (files) fs.copyFileSync(path.resolve(__dirname, '../README.NPM.MD'), path.resolve(__dirname, '../dist-npm/README.md')) if (version !== '0.0.0-dev') { - execSync('npm publish', { cwd: path.resolve(__dirname, '../dist-npm') }) + execSync('npm publish', { + cwd: path.resolve(__dirname, '../dist-npm'), + env: { + ...process.env, + NPM_TOKEN: process.env.NPM_TOKEN, + NODE_AUTH_TOKEN: process.env.NPM_TOKEN + } + }) } }) From 900bcb0b56196ef3ac5105d665f286614582367f Mon Sep 17 00:00:00 2001 From: Vitaly Turovsky Date: Wed, 30 Oct 2024 07:02:33 +0300 Subject: [PATCH 02/20] fix: don't crash and conflict with g663 spyware installed --- index.html | 9 +++++++++ package.json | 2 +- pnpm-lock.yaml | 20 +++++++++++++------- 3 files changed, 23 insertions(+), 8 deletions(-) diff --git a/index.html b/index.html index 304ee0a6..d662cbb6 100644 --- a/index.html +++ b/index.html @@ -4,6 +4,15 @@