@travetto/manifest 5.0.9 → 5.0.11

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/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2023 ArcSine Technologies
3
+ Copyright (c) 2020 ArcSine Technologies
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -32,33 +32,6 @@ Additionally, once the code has been compiled (or even bundled after that), the
32
32
  ## Manifest Delta
33
33
  During the compilation process, it is helpful to know how the output content differs from the manifest, which is produced from the source input. The [ManifestDeltaUtil](https://github.com/travetto/travetto/tree/main/module/manifest/src/delta.ts#L23) provides the functionality for a given manifest, and will produce a stream of changes grouped by module. This is the primary input into the [Compiler](https://github.com/travetto/travetto/tree/main/module/compiler#readme "The compiler infrastructure for the Travetto framework")'s incremental behavior to know when a file has changed and needs to be recompiled.
34
34
 
35
- ## Class and Function Metadata
36
- For the framework to work properly, metadata needs to be collected about files, classes and functions to uniquely identify them, with support for detecting changes during live reloads. To achieve this, every `class` is decorated with an additional field of `Ⲑid`. `Ⲑid` represents a computed id that is tied to the file/class combination.
37
-
38
- `Ⲑid` is used heavily throughout the framework for determining which classes are owned by the framework, and being able to lookup associated data by the id.
39
-
40
- **Code: Test Class**
41
- ```typescript
42
- export class TestClass {
43
- async doStuff(): Promise<void> { }
44
- }
45
- ```
46
-
47
- **Code: Test Class Compiled**
48
- ```javascript
49
- "use strict";
50
- Object.defineProperty(exports, "__esModule", { value: true });
51
- exports.TestClass = void 0;
52
- const tslib_1 = require("tslib");
53
- const Ⲑ_function_1 = tslib_1.__importStar(require("@travetto/runtime/src/function.js"));
54
- var ᚕm = ["@travetto/manifest", "doc/test-class.ts"];
55
- class TestClass {
56
- static Ⲑinit = Ⲑ_function_1.registerFunction(TestClass, ᚕm, { hash: 197152026, lines: [1, 3] }, { doStuff: { hash: 51337554, lines: [2, 2] } }, false, false);
57
- async doStuff() { }
58
- }
59
- exports.TestClass = TestClass;
60
- ```
61
-
62
35
  ## Module Indexing
63
36
  Once the manifest is created, the application runtime can now read this manifest, which allows for influencing runtime behavior. The most common patterns include:
64
37
  * Loading all source files
@@ -119,8 +92,7 @@ By default, all paths within the framework are assumed to be in a POSIX style, a
119
92
  [ "README.md", "md", 1868155200000 ]
120
93
  ],
121
94
  "doc": [
122
- [ "DOC.tsx", "ts", 1868155200000, "doc" ],
123
- [ "doc/test-class.ts", "ts", 1868155200000, "doc" ]
95
+ [ "DOC.tsx", "ts", 1868155200000, "doc" ]
124
96
  ],
125
97
  "$index": [
126
98
  [ "__index__.ts", "ts", 1868155200000 ]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@travetto/manifest",
3
- "version": "5.0.9",
3
+ "version": "5.0.11",
4
4
  "description": "Support for project indexing, manifesting, along with file watching",
5
5
  "keywords": [
6
6
  "path",
@@ -25,6 +25,9 @@
25
25
  "engines": {
26
26
  "node": ">=22.0.0"
27
27
  },
28
+ "dependencies": {
29
+ "@types/node": "^22.10.2"
30
+ },
28
31
  "repository": {
29
32
  "url": "https://github.com/travetto/travetto.git",
30
33
  "directory": "module/manifest"
@@ -149,7 +149,6 @@ export class PackageModuleVisitor {
149
149
  return [...mods].sort((a, b) => a.name.localeCompare(b.name));
150
150
  }
151
151
 
152
-
153
152
  /**
154
153
  * Visit packages with ability to track duplicates
155
154
  */
@@ -208,8 +208,8 @@ export class ManifestIndex {
208
208
  const allMods = Object.keys(this.#manifest.modules);
209
209
  const active = new Set<string>(mode === 'workspace' ? this.getWorkspaceModules().map(x => x.name) : allMods);
210
210
 
211
- for (const expr of exprList.split(/\s*,\s*/g)) {
212
- const [, neg, mod] = expr.match(/(-|[+])?([^+\- ]+)$/) ?? [];
211
+ for (const expr of exprList.split(/,/g)) {
212
+ const [, neg, mod] = expr.trim().match(/(-|[+])?([^+\- ]{1,150})$/) ?? [];
213
213
  if (mod) {
214
214
  const pattern = new RegExp(`^${mod.replace(/[*]/g, '.*')}$`);
215
215
  for (const m of allMods.filter(x => pattern.test(x))) {