diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 954564e..8b6b09f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -32,12 +32,9 @@ jobs: env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - - run: cnpm sync - if: success() - - - run: curl -L https://npmmirror.com/sync/json-editor-vue - if: success() - - run: npx changelogithub env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - run: pnpm sync-to-cnpm + if: success() diff --git a/package.json b/package.json index 33e1df5..b23272a 100644 --- a/package.json +++ b/package.json @@ -70,6 +70,7 @@ "typegen": "npx tsup --entry.json-editor-vue src/index.ts --format esm,cjs --cjsInterop --clean --dts-only", "check-exports": "pnpm build && npx attw $(npm pack)", "release": "esno ./scripts/release.mts", + "sync-to-cnpm": "npx cnpm sync && curl -L https://npmmirror.com/sync/json-editor-vue", "license-scan": "license-checker --summary --out ./dependency-licenses.txt", "lint": "eslint \"**/*.{js,mjs,cjs,jsx,ts,mts,cts,tsx,vue,json,md,html,css,scss,sass}\" --ignore-pattern stats.html", "lint:fix": "eslint \"**/*.{js,mjs,cjs,jsx,ts,mts,cts,tsx,vue,json,md,html,css,scss,sass}\" --ignore-pattern stats.html --fix", @@ -105,6 +106,7 @@ "@vue/test-utils": "latest", "axios": "^1.7.7", "case-police": "^0.7.0", + "cnpm": "^9.4.0", "cross-spawn": "^7.0.3", "del": "^8.0.0", "destr": "^2.0.3", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index caf295f..d1605d7 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -63,6 +63,9 @@ importers: case-police: specifier: ^0.7.0 version: 0.7.0 + cnpm: + specifier: ^9.4.0 + version: 9.4.0 cross-spawn: specifier: ^7.0.3 version: 7.0.3 @@ -1729,6 +1732,23 @@ packages: resolution: {integrity: sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==} engines: {node: '>=12'} + cnpm@9.4.0: + resolution: {integrity: sha512-oxvozguyEuXp/3Ie0JEtmHKt8+OayZfNH40/B1gmtok2+0dHTS0Kt4uUn5rZ8qIYNk5UzzFVmu1pZxEn0no/iQ==} + engines: {node: '>= 14.18.0'} + hasBin: true + bundledDependencies: + - auto-correct + - bagpipe + - commander + - cross-spawn + - giturl + - ini + - npm + - npm-request + - npminstall + - open + - urllib + code-red@1.0.4: resolution: {integrity: sha512-7qJWqItLA8/VPVlKJlFXU+NBlo/qyfs39aJcuMT/2ere32ZqvF5OSxgdM5xOfJJ7O429gg2HM47y8v9P+9wrNw==} @@ -6207,6 +6227,8 @@ snapshots: strip-ansi: 6.0.1 wrap-ansi: 7.0.0 + cnpm@9.4.0: {} + code-red@1.0.4: dependencies: '@jridgewell/sourcemap-codec': 1.5.0