@decohere/workspace 0.0.1-dev.125 → 0.0.1-dev.126

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
@@ -46,7 +46,7 @@ Per-project settings go under `projects`, keyed by package name: `docker` (image
46
46
 
47
47
  ### Package aliases
48
48
 
49
- For each discovered project, the workspace package maps `package.json` `name` to its source entry, and its subpaths to their sources (#518):
49
+ For each discovered project, the workspace package maps `package.json` `name` to its source entry, and its subpaths to their sources:
50
50
 
51
51
  - **The entry:** a TypeScript `main` as written (default `src/index.ts`). A `main` or `exports["."]` that describes the published layout (`index.js`, `./es6/src/index.js`) maps back to the source under `src/`.
52
52
  - **Each subpath in `exports`:** `./auth` → `./es6/src/auth/auth.extensions.js` becomes `src/auth/auth.extensions.ts`. Entries whose source doesn't exist are left out.
@@ -74,7 +74,7 @@ function conventionAliasPaths(projects, baseUrl) {
74
74
  `${toPosixRelative(baseUrl, subpathRoot)}/*`
75
75
  ];
76
76
  }
77
- // Subpaths the package exports, mapped to their sources (#518): these can name any file,
77
+ // Subpaths the package exports, mapped to their sources: these can name any file,
78
78
  // not just `<sub>.ts` or `<sub>/index.ts` under the entry's directory.
79
79
  for (const [subpath, source] of Object.entries(project.getSourceExports())){
80
80
  aliases[`${name}/${subpath.slice(2)}`] = [
@@ -193,7 +193,7 @@ class Project extends (0, _extensibility.mixwith)(_haspackagejsonmixin.HasPackag
193
193
  * The package's entry source file. A TypeScript `main` (the workspace convention,
194
194
  * `src/index.ts`) is used as written. A `main` or `exports["."]` that describes the published
195
195
  * layout (`index.js`, `./es6/src/index.js`) is mapped back to the source it was built from,
196
- * falling back to `src/index.ts` (#518).
196
+ * falling back to `src/index.ts`.
197
197
  */ getSourceEntryPath() {
198
198
  const projectRoot = _nodepath.default.join(this.rootDir, this.projectDirectory);
199
199
  const main = this.packageJson?.main;
@@ -216,7 +216,7 @@ class Project extends (0, _extensibility.mixwith)(_haspackagejsonmixin.HasPackag
216
216
  }
217
217
  /**
218
218
  * The source file each subpath in package.json `exports` names, such as `./auth` →
219
- * `<project>/src/auth/auth.extensions.ts` (#518). Exports point at the release layout
219
+ * `<project>/src/auth/auth.extensions.ts`. Exports point at the release layout
220
220
  * (`./es6/src/auth/auth.extensions.js`); the source is the part from `src/`, with its
221
221
  * TypeScript extension. Wildcard subpaths, and targets with no such source file, are left out.
222
222
  */ getSourceExports() {
@@ -14,7 +14,7 @@ function _interop_require_default(obj) {
14
14
  default: obj
15
15
  };
16
16
  }
17
- /** TypeScript source extensions a workspace compiles (#518). */ const SOURCE = [
17
+ /** TypeScript source extensions a workspace compiles. */ const SOURCE = [
18
18
  ".ts",
19
19
  ".tsx",
20
20
  ".mts",
@@ -35,7 +35,7 @@ class Workspace extends (0, _extensibility.mixwith)(_haspackagejsonmixin.HasPack
35
35
  #projectCache = new Map();
36
36
  /**
37
37
  * Each project's source file paths as a set, so `findProject` is a lookup rather than a scan
38
- * of every file: the Vitest plugin asks once per transformed file (#517). Keyed by the list
38
+ * of every file: the Vitest plugin asks once per transformed file. Keyed by the list
39
39
  * `getAllFiles` returns, so a new list (after its cache is flushed) gets a new set.
40
40
  */ #sourcePaths = new WeakMap();
41
41
  #projectFileChangedSubject = new _rxjs.Subject();
@@ -59,7 +59,7 @@ function conventionAliasPaths(projects, baseUrl) {
59
59
  `${toPosixRelative(baseUrl, subpathRoot)}/*`
60
60
  ];
61
61
  }
62
- // Subpaths the package exports, mapped to their sources (#518): these can name any file,
62
+ // Subpaths the package exports, mapped to their sources: these can name any file,
63
63
  // not just `<sub>.ts` or `<sub>/index.ts` under the entry's directory.
64
64
  for (const [subpath, source] of Object.entries(project.getSourceExports())){
65
65
  aliases[`${name}/${subpath.slice(2)}`] = [
@@ -178,7 +178,7 @@ export class Project extends mixwith(HasPackageJson, HasTsConfig) {
178
178
  * The package's entry source file. A TypeScript `main` (the workspace convention,
179
179
  * `src/index.ts`) is used as written. A `main` or `exports["."]` that describes the published
180
180
  * layout (`index.js`, `./es6/src/index.js`) is mapped back to the source it was built from,
181
- * falling back to `src/index.ts` (#518).
181
+ * falling back to `src/index.ts`.
182
182
  */ getSourceEntryPath() {
183
183
  const projectRoot = path.join(this.rootDir, this.projectDirectory);
184
184
  const main = this.packageJson?.main;
@@ -201,7 +201,7 @@ export class Project extends mixwith(HasPackageJson, HasTsConfig) {
201
201
  }
202
202
  /**
203
203
  * The source file each subpath in package.json `exports` names, such as `./auth` →
204
- * `<project>/src/auth/auth.extensions.ts` (#518). Exports point at the release layout
204
+ * `<project>/src/auth/auth.extensions.ts`. Exports point at the release layout
205
205
  * (`./es6/src/auth/auth.extensions.js`); the source is the part from `src/`, with its
206
206
  * TypeScript extension. Wildcard subpaths, and targets with no such source file, are left out.
207
207
  */ getSourceExports() {
@@ -1,5 +1,5 @@
1
1
  import path from "node:path";
2
- /** TypeScript source extensions a workspace compiles (#518). */ const SOURCE = [
2
+ /** TypeScript source extensions a workspace compiles. */ const SOURCE = [
3
3
  ".ts",
4
4
  ".tsx",
5
5
  ".mts",
@@ -25,7 +25,7 @@ export class Workspace extends mixwith(HasPackageJson, HasTsConfig) {
25
25
  #projectCache = new Map();
26
26
  /**
27
27
  * Each project's source file paths as a set, so `findProject` is a lookup rather than a scan
28
- * of every file: the Vitest plugin asks once per transformed file (#517). Keyed by the list
28
+ * of every file: the Vitest plugin asks once per transformed file. Keyed by the list
29
29
  * `getAllFiles` returns, so a new list (after its cache is flushed) gets a new set.
30
30
  */ #sourcePaths = new WeakMap();
31
31
  #projectFileChangedSubject = new Subject();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@decohere/workspace",
3
- "version": "0.0.1-dev.125",
3
+ "version": "0.0.1-dev.126",
4
4
  "description": "Workspace and project model primitives for monorepo tooling",
5
5
  "keywords": [
6
6
  "typescript",
@@ -33,9 +33,9 @@
33
33
  "test": "echo \"Error: no test specified\" && exit 1"
34
34
  },
35
35
  "dependencies": {
36
- "@decohere/core": "0.0.1-dev.125",
37
- "@decohere/crucible": "0.0.1-dev.125",
38
- "@decohere/devkit": "0.0.1-dev.125",
36
+ "@decohere/core": "0.0.1-dev.126",
37
+ "@decohere/crucible": "0.0.1-dev.126",
38
+ "@decohere/devkit": "0.0.1-dev.126",
39
39
  "picomatch": "^4.0.4",
40
40
  "rxjs": "^7.8.2",
41
41
  "typescript": "^6.0.3"
@@ -45,12 +45,12 @@ export declare class Project extends Project_base {
45
45
  * The package's entry source file. A TypeScript `main` (the workspace convention,
46
46
  * `src/index.ts`) is used as written. A `main` or `exports["."]` that describes the published
47
47
  * layout (`index.js`, `./es6/src/index.js`) is mapped back to the source it was built from,
48
- * falling back to `src/index.ts` (#518).
48
+ * falling back to `src/index.ts`.
49
49
  */
50
50
  getSourceEntryPath(): string;
51
51
  /**
52
52
  * The source file each subpath in package.json `exports` names, such as `./auth` →
53
- * `<project>/src/auth/auth.extensions.ts` (#518). Exports point at the release layout
53
+ * `<project>/src/auth/auth.extensions.ts`. Exports point at the release layout
54
54
  * (`./es6/src/auth/auth.extensions.js`); the source is the part from `src/`, with its
55
55
  * TypeScript extension. Wildcard subpaths, and targets with no such source file, are left out.
56
56
  */