From eaaffb3ceb649235a7779faedd36726eb8b79990 Mon Sep 17 00:00:00 2001 From: Bas Meeuwissen Date: Fri, 5 Apr 2024 09:45:46 +0200 Subject: [PATCH] #460: use npm with lerna as backbone --- .github/workflows/nodejsci.yml | 2 +- examples/apps/contact-list/package.json | 2 +- lerna.json | 4 +++ package.json | 37 ++++++------------------- 4 files changed, 14 insertions(+), 31 deletions(-) diff --git a/.github/workflows/nodejsci.yml b/.github/workflows/nodejsci.yml index ca1345b9..60d8e4cb 100644 --- a/.github/workflows/nodejsci.yml +++ b/.github/workflows/nodejsci.yml @@ -31,4 +31,4 @@ jobs: - run: npm ci - run: npm install @nrwl/nx-linux-x64-gnu - - run: npx lerna run lint,test --scope=@jitar/reflection --scope=@jitar/serialization --scope=@jitar/runtime --scope=@jitar/caching --scope=@jitar/server-nodejs --scope=jitar --scope=create-jitar --scope=@jitar/plugin-vite \ No newline at end of file + - run: npm run review \ No newline at end of file diff --git a/examples/apps/contact-list/package.json b/examples/apps/contact-list/package.json index 8a8dccfb..a4a06cb2 100644 --- a/examples/apps/contact-list/package.json +++ b/examples/apps/contact-list/package.json @@ -1,5 +1,5 @@ { - "name": "jitar-contact-list", + "name": "jitar-contact-list-example", "private": true, "version": "0.0.0", "type": "module", diff --git a/lerna.json b/lerna.json index d8117235..78e5737e 100644 --- a/lerna.json +++ b/lerna.json @@ -1,6 +1,10 @@ { "$schema": "node_modules/lerna/schemas/lerna-schema.json", "version": "0.7.4", + "packages": [ + "packages/*", + "examples/**/*" + ], "command": { "version": { "message": "chore(release): publish %s" diff --git a/package.json b/package.json index 1193002f..16b3840a 100644 --- a/package.json +++ b/package.json @@ -4,35 +4,14 @@ "private": true, "license": "MIT", "type": "module", - "workspaces": [ - "packages/caching", - "packages/create-jitar", - "packages/jitar", - "packages/plugin-vite", - "packages/reflection", - "packages/runtime", - "packages/serialization", - "packages/server-nodejs", - "tools/eslint-plugin", - "examples/concepts/access-protection", - "examples/concepts/construction", - "examples/concepts/cors", - "examples/concepts/data-transportation", - "examples/concepts/error-handling", - "examples/concepts/health-checks", - "examples/concepts/hello-world", - "examples/concepts/load-balancing", - "examples/concepts/middleware", - "examples/concepts/multi-version", - "examples/concepts/node-client", - "examples/concepts/overrides", - "examples/concepts/segmentation", - "examples/apps/contact-list" - ], "scripts": { - "build": "npm run build --workspace=packages/reflection --workspace=packages/serialization --workspace=packages/runtime --workspace=packages/caching --workspace=packages/server-nodejs --workspace=packages/jitar --workspace=packages/create-jitar --workspace=packages/plugin-vite --if-present", - "lint": "npm run lint --workspace=packages/reflection --workspace=packages/serialization --workspace=packages/runtime --workspace=packages/caching --workspace=packages/server-nodejs --workspace=packages/jitar --workspace=packages/create-jitar --workspace=packages/plugin-vite --if-present", - "test": "npm run test --workspace=packages/reflection --workspace=packages/serialization --workspace=packages/runtime --workspace=packages/caching --workspace=packages/server-nodejs --workspace=packages/jitar --workspace=packages/create-jitar --workspace=packages/plugin-vite --if-present", + "build": "lerna run build --scope=jitar --scope=create-jitar --scope=@jitar/plugin*", + "build:examples": "lerna run build --scope=*-example", + "build:all": "lerna run build", + "lint": "lerna run lint", + "test": "lerna run test", + "review": "lerna run test,lint", + "publish": "npx lerna publish --no-git-tag-version --no-private", "changelog": "auto-changelog --template changelog.hbs -p -u --commit-limit false --hide-empty-releases true", "changelog-debug": "auto-changelog --template changelog.hbs -p --template json --output changelog-data.json" }, @@ -59,4 +38,4 @@ "rollup-plugin-dts": "^6.1.0", "vitest": "^1.4.0" } -} +} \ No newline at end of file