Skip to content

Commit 560b6f0

Browse files
authored
Add stub archive workspace (#448)
This way we can declare that anything in the `workspaces` directory is a workspace, making it simpler to add new workspaces by simply adding a new directory.
1 parent a583509 commit 560b6f0

File tree

4 files changed

+20
-14
lines changed

4 files changed

+20
-14
lines changed

package.json

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,7 @@
55
"url": "https://github.com/code-chronicles-code/leetcode-curriculum.git"
66
},
77
"workspaces": [
8-
"workspaces/adventure-pack",
9-
"workspaces/download-leetcode-submissions",
10-
"workspaces/eslint-config",
11-
"workspaces/fetch-leetcode-problem-list",
12-
"workspaces/fetch-recent-accepted-leetcode-submissions",
13-
"workspaces/generate-health-report",
14-
"workspaces/javascript-leetcode-month",
15-
"workspaces/leetcode-api",
16-
"workspaces/leetcode-zen-mode",
17-
"workspaces/post-leetcode-potd-to-discord",
18-
"workspaces/repository-scripts",
19-
"workspaces/util"
8+
"workspaces/*"
209
],
2110
"type": "module",
2211
"scripts": {

workspaces/archive/package.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"name": "@code-chronicles/archive",
3+
"private": true,
4+
"repository": {
5+
"type": "git",
6+
"url": "https://github.com/code-chronicles-code/leetcode-curriculum.git",
7+
"directory": "workspaces/archive"
8+
},
9+
"type": "module"
10+
}

yarn.config.cjs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,12 @@ module.exports = defineConfig({
5454
}
5555
}
5656

57-
// Expect each workspace to specify a version, except for the root.
57+
// Expect each workspace to specify a version, except for the root and
58+
// anything private.
5859
for (const workspace of Yarn.workspaces()) {
5960
if (workspace.cwd === ".") {
6061
workspace.unset("version");
61-
} else {
62+
} else if (!workspace.manifest.private) {
6263
workspace.set("version", workspace.manifest.version ?? "0.0.1");
6364
}
6465
}

yarn.lock

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)