From 17c1792c8f188696b29a8176fea6f4f31db772cb Mon Sep 17 00:00:00 2001 From: Jeremy Tuloup Date: Wed, 8 Sep 2021 14:51:22 +0200 Subject: [PATCH] Remove release-npm script (#210) * Remove release-npm script * Remove the npm publish check on CI --- .github/workflows/buildutils.yml | 6 ------ buildutils/src/release-npm.ts | 29 ----------------------------- package.json | 1 - 3 files changed, 36 deletions(-) delete mode 100644 buildutils/src/release-npm.ts diff --git a/.github/workflows/buildutils.yml b/.github/workflows/buildutils.yml index 0492ed3f..7db3fe5b 100644 --- a/.github/workflows/buildutils.yml +++ b/.github/workflows/buildutils.yml @@ -75,9 +75,3 @@ jobs: python -m pip install -U jupyterlab~=3.0 jupyter_packaging~=0.10 pip jlpm jlpm run build - - name: Publish to npm in dry-run mode - run: | - mkdir dist - jlpm lerna exec -- npm pack - cp packages/*/*.tgz dist - jlpm release:npm --dist ./dist --dry-run diff --git a/buildutils/src/release-npm.ts b/buildutils/src/release-npm.ts deleted file mode 100644 index 108f3141..00000000 --- a/buildutils/src/release-npm.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { readdirSync } from 'fs'; - -import { resolve } from 'path'; - -import { run } from '@jupyterlab/buildutils'; - -import commander from 'commander'; - -commander - .description('Publish packages to npm') - .option( - '--dist ', - 'The path to the directory with the package tarballs' - ) - .option('--dry-run', 'Run in dry-run mode') - .action((options: any) => { - const dryRun = options.dryRun ?? false; - const distDir = resolve(options.dist); - const files = readdirSync(distDir); - files.forEach(file => { - if (!file.endsWith('.tgz')) { - return; - } - const tarball = resolve(distDir, file); - run(`npm publish ${tarball} ${dryRun ? '--dry-run' : ''}`); - }); - }); - -commander.parse(process.argv); diff --git a/package.json b/package.json index aacd25cc..49646a9d 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,6 @@ "prettier:check": "prettier --list-different \"**/*{.ts,.tsx,.js,.jsx,.css,.json,.md}\"", "publish": "yarn run clean && yarn run build && lerna publish", "release:bump": "node ./buildutils/lib/release-bump.js", - "release:npm": "node ./buildutils/lib/release-npm.js", "release:patch": "node ./buildutils/lib/release-patch.js", "start": "jupyter retro --config ./app/test/jupyter_server_config.py --no-browser", "test": "lerna run test",