From a9607d85912535fe278a027e207721123cf45912 Mon Sep 17 00:00:00 2001 From: Miorel-Lucian Palii Date: Sun, 29 Sep 2024 18:05:52 -0700 Subject: [PATCH] Add stub archive workspace This way we can declare that anything in the `workspaces` directory is a workspace! --- package.json | 13 +------------ workspaces/archive/package.json | 10 ++++++++++ yarn.config.cjs | 5 +++-- yarn.lock | 6 ++++++ 4 files changed, 20 insertions(+), 14 deletions(-) create mode 100644 workspaces/archive/package.json diff --git a/package.json b/package.json index d461f20f..b858b16b 100644 --- a/package.json +++ b/package.json @@ -5,18 +5,7 @@ "url": "https://github.com/code-chronicles-code/leetcode-curriculum.git" }, "workspaces": [ - "workspaces/adventure-pack", - "workspaces/download-leetcode-submissions", - "workspaces/eslint-config", - "workspaces/fetch-leetcode-problem-list", - "workspaces/fetch-recent-accepted-leetcode-submissions", - "workspaces/generate-health-report", - "workspaces/javascript-leetcode-month", - "workspaces/leetcode-api", - "workspaces/leetcode-zen-mode", - "workspaces/post-leetcode-potd-to-discord", - "workspaces/repository-scripts", - "workspaces/util" + "workspaces/*" ], "type": "module", "scripts": { diff --git a/workspaces/archive/package.json b/workspaces/archive/package.json new file mode 100644 index 00000000..2b497d61 --- /dev/null +++ b/workspaces/archive/package.json @@ -0,0 +1,10 @@ +{ + "name": "@code-chronicles/archive", + "private": true, + "repository": { + "type": "git", + "url": "https://github.com/code-chronicles-code/leetcode-curriculum.git", + "directory": "workspaces/archive" + }, + "type": "module" +} diff --git a/yarn.config.cjs b/yarn.config.cjs index 306d9982..7156d065 100644 --- a/yarn.config.cjs +++ b/yarn.config.cjs @@ -54,11 +54,12 @@ module.exports = defineConfig({ } } - // Expect each workspace to specify a version, except for the root. + // Expect each workspace to specify a version, except for the root and + // anything private. for (const workspace of Yarn.workspaces()) { if (workspace.cwd === ".") { workspace.unset("version"); - } else { + } else if (!workspace.manifest.private) { workspace.set("version", workspace.manifest.version ?? "0.0.1"); } } diff --git a/yarn.lock b/yarn.lock index 48882844..2c58b9eb 100644 --- a/yarn.lock +++ b/yarn.lock @@ -491,6 +491,12 @@ __metadata: languageName: unknown linkType: soft +"@code-chronicles/archive@workspace:workspaces/archive": + version: 0.0.0-use.local + resolution: "@code-chronicles/archive@workspace:workspaces/archive" + languageName: unknown + linkType: soft + "@code-chronicles/download-leetcode-submissions@workspace:workspaces/download-leetcode-submissions": version: 0.0.0-use.local resolution: "@code-chronicles/download-leetcode-submissions@workspace:workspaces/download-leetcode-submissions"