@decohere/workspace 0.0.1-dev.20261123.379 → 0.0.1-dev.20261123.401

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -47,7 +47,18 @@ export default {
47
47
  };
48
48
  ```
49
49
 
50
- Per-project settings go under `projects`, keyed by package name: `docker` (image, Dockerfile, tags, build args) and `ui` (the UI project a deployable ships, see [forge](../forge/README.md#shipping-the-ui-with-the-api)).
50
+ Per-project settings go under `projects`, keyed by package name: `docker` (image, Dockerfile, tags, build args), `ui` (the UI project a deployable ships, see [forge](../forge/README.md#shipping-the-ui-with-the-api)), and `ignore` and `copyFiles`, which **add** to the workspace's lists:
51
+
52
+ ```js
53
+ // Files the package copies at run time: not compiled, not scanned for dependencies, shipped as they are.
54
+ export default {
55
+ projects: {
56
+ "@app/tool": { ignore: ["templates/**"], copyFiles: ["templates/**", "templates/**/.*", "templates/**/.*/**"] },
57
+ },
58
+ };
59
+ ```
60
+
61
+ Globs skip dotfiles unless a segment starts with a dot, hence the last two patterns.
51
62
 
52
63
  ### A project's own scripts
53
64
 
@@ -6,6 +6,10 @@ import { PACKAGE_JSON, PROJECTS_DIR, WorkspaceDefaults } from "../const.js";
6
6
  import { WorkspaceConfigurationError } from "../errors.js";
7
7
  import { PackageJson } from "../models/package-json.model.js";
8
8
  import { Project } from "../models/project.model.js";
9
+ /** A project's own `ignore` and `copyFiles` (under `projects` in `.decohere.js`) add to the workspace's. */ const PROJECT_ADDITIVE = [
10
+ "ignore",
11
+ "copyFiles"
12
+ ];
9
13
  export class ProjectFactory {
10
14
  static async getProjectSeeds(config) {
11
15
  const { includeProjects, ignoreProjects, rootDir } = config;
@@ -75,12 +79,22 @@ export class ProjectFactory {
75
79
  const name = packageJsonData.name;
76
80
  const packageJson = new PackageJson(packageJsonData);
77
81
  const projectDir = path.dirname(file.relativePath);
82
+ const own = config?.projects?.[name] ?? {};
78
83
  const mergedConfig = merge.withOptions({
79
84
  mergeArrays: false
80
- }, config, config?.projects?.[name] ?? {}, {
85
+ }, config, own, {
81
86
  projectDir,
82
87
  packageJson
83
88
  });
89
+ // A project's own lists add to the workspace's, so it names only what it leaves out or adds.
90
+ for (const key of PROJECT_ADDITIVE){
91
+ mergedConfig[key] = [
92
+ ...new Set([
93
+ ...config[key] ?? [],
94
+ ...own[key] ?? []
95
+ ])
96
+ ];
97
+ }
84
98
  return {
85
99
  name,
86
100
  config: mergedConfig
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@decohere/workspace",
3
- "version": "0.0.1-dev.20261123.379",
3
+ "version": "0.0.1-dev.20261123.401",
4
4
  "description": "Workspace and project model primitives for monorepo tooling",
5
5
  "keywords": [
6
6
  "typescript",
@@ -32,9 +32,9 @@
32
32
  "test": "echo \"Error: no test specified\" && exit 1"
33
33
  },
34
34
  "dependencies": {
35
- "@decohere/core": "0.0.1-dev.20261123.379",
36
- "@decohere/crucible": "0.0.1-dev.20261123.379",
37
- "@decohere/devkit": "0.0.1-dev.20261123.379",
35
+ "@decohere/core": "0.0.1-dev.20261123.401",
36
+ "@decohere/crucible": "0.0.1-dev.20261123.401",
37
+ "@decohere/devkit": "0.0.1-dev.20261123.401",
38
38
  "get-tsconfig": "^4.14.3",
39
39
  "picomatch": "^4.0.4"
40
40
  },