@patterkit/compiler 0.14.0 → 0.14.1

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/dist/index.cjs CHANGED
@@ -454,6 +454,16 @@ function extensionPass(input) {
454
454
  takenList.push({ id, manifest });
455
455
  }
456
456
  const sound = new Map(takenList.filter((t) => t.manifest !== void 0).map((t) => [t.id, t.manifest]));
457
+ for (const [id, manifest] of sound) {
458
+ for (const req of (0, import_extensions.missingRequirements)(manifest, Object.keys(taken))) {
459
+ issues.push({
460
+ severity: "warning",
461
+ file: projectPath,
462
+ code: "requires-missing",
463
+ message: `the project takes "${id}", which requires the extension "${req}", but doesn't take it; add "${req}" to the project, or ${manifest.name} won't work in the game`
464
+ });
465
+ }
466
+ }
457
467
  const nodes = extensionNodes(project, scenes);
458
468
  const exists = (kind, id) => kind === "cast" ? (project.cast ?? []).some((c) => c.name === id) : nodes.get(id)?.kind === kind;
459
469
  const projectId = project.project.id;
package/dist/index.js CHANGED
@@ -325,6 +325,7 @@ import {
325
325
  compiledTarget,
326
326
  entryProblems,
327
327
  manifestProblems,
328
+ missingRequirements,
328
329
  orphanedEntries,
329
330
  pickClashes,
330
331
  pickLists,
@@ -428,6 +429,16 @@ function extensionPass(input) {
428
429
  takenList.push({ id, manifest });
429
430
  }
430
431
  const sound = new Map(takenList.filter((t) => t.manifest !== void 0).map((t) => [t.id, t.manifest]));
432
+ for (const [id, manifest] of sound) {
433
+ for (const req of missingRequirements(manifest, Object.keys(taken))) {
434
+ issues.push({
435
+ severity: "warning",
436
+ file: projectPath,
437
+ code: "requires-missing",
438
+ message: `the project takes "${id}", which requires the extension "${req}", but doesn't take it; add "${req}" to the project, or ${manifest.name} won't work in the game`
439
+ });
440
+ }
441
+ }
431
442
  const nodes = extensionNodes(project, scenes);
432
443
  const exists = (kind, id) => kind === "cast" ? (project.cast ?? []).some((c) => c.name === id) : nodes.get(id)?.kind === kind;
433
444
  const projectId = project.project.id;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@patterkit/compiler",
3
- "version": "0.14.0",
3
+ "version": "0.14.1",
4
4
  "description": "Patter compiler: compile condition/effect expressions, validate them, and export source to the runtime bundle.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -35,10 +35,10 @@
35
35
  },
36
36
  "dependencies": {
37
37
  "@patterkit/model": "0.20.0",
38
- "@patterkit/core": "0.9.5",
38
+ "@patterkit/core": "0.9.6",
39
39
  "@patterkit/dialect": "0.2.17",
40
40
  "@wildwinter/expr": "^0.6.0",
41
- "@wildwinter/toolkit": "^0.3.0"
41
+ "@wildwinter/toolkit": "^0.3.1"
42
42
  },
43
43
  "peerDependencies": {
44
44
  "@wildwinter/scoperegistry": ">=0.9.0 <1.0.0"