@decohere/forge 0.0.1-dev.118 → 0.0.1-dev.119

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.
Files changed (109) hide show
  1. package/commonjs/src/actions/build.action.js +2 -2
  2. package/commonjs/src/actions/clean.action.js +1 -1
  3. package/commonjs/src/actions/commit.action.js +2 -2
  4. package/commonjs/src/actions/copy.action.js +4 -3
  5. package/commonjs/src/actions/dependency-report.action.js +1 -1
  6. package/commonjs/src/actions/dependency-sync.action.js +1 -1
  7. package/commonjs/src/actions/docker.action.js +2 -2
  8. package/commonjs/src/actions/link.action.js +1 -1
  9. package/commonjs/src/actions/package.action.js +2 -2
  10. package/commonjs/src/actions/paths.action.js +1 -1
  11. package/commonjs/src/actions/publish.action.js +2 -2
  12. package/commonjs/src/actions/sync-lock-file.action.js +2 -2
  13. package/commonjs/src/actions/tag.action.js +2 -2
  14. package/commonjs/src/actions/typecheck.action.js +2 -2
  15. package/commonjs/src/actions/unlink.action.js +1 -1
  16. package/commonjs/src/actions/version.action.js +7 -7
  17. package/commonjs/src/actions/watch.action.js +1 -1
  18. package/commonjs/src/commands/build.command.js +1 -1
  19. package/commonjs/src/commands/dependency.command.js +1 -1
  20. package/commonjs/src/commands/docker.command.js +1 -1
  21. package/commonjs/src/commands/forge.command.js +1 -1
  22. package/commonjs/src/commands/link.command.js +1 -1
  23. package/commonjs/src/commands/package.command.js +1 -1
  24. package/commonjs/src/commands/paths.command.js +1 -1
  25. package/commonjs/src/commands/publish.command.js +1 -1
  26. package/commonjs/src/commands/tag.command.js +1 -1
  27. package/commonjs/src/commands/typecheck.command.js +1 -1
  28. package/commonjs/src/commands/version.command.js +1 -1
  29. package/commonjs/src/factories/swc-config.factory.js +1 -1
  30. package/commonjs/src/forge.module.js +1 -1
  31. package/commonjs/src/semver/index.js +18 -0
  32. package/commonjs/src/semver/semver.js +92 -0
  33. package/commonjs/src/services/file-writer.service.js +1 -1
  34. package/commonjs/src/services/swc-transpiler.js +3 -3
  35. package/commonjs/src/services/ts-program-host.js +1 -1
  36. package/commonjs/src/services/type-emission-program.js +1 -1
  37. package/commonjs/src/services/type-emitter.js +4 -4
  38. package/es6/src/actions/build.action.js +2 -2
  39. package/es6/src/actions/clean.action.js +1 -1
  40. package/es6/src/actions/commit.action.js +2 -2
  41. package/es6/src/actions/copy.action.js +4 -3
  42. package/es6/src/actions/dependency-report.action.js +1 -1
  43. package/es6/src/actions/dependency-sync.action.js +1 -1
  44. package/es6/src/actions/docker.action.js +2 -2
  45. package/es6/src/actions/link.action.js +1 -1
  46. package/es6/src/actions/package.action.js +2 -2
  47. package/es6/src/actions/paths.action.js +1 -1
  48. package/es6/src/actions/publish.action.js +2 -2
  49. package/es6/src/actions/sync-lock-file.action.js +2 -2
  50. package/es6/src/actions/tag.action.js +2 -2
  51. package/es6/src/actions/typecheck.action.js +2 -2
  52. package/es6/src/actions/unlink.action.js +1 -1
  53. package/es6/src/actions/version.action.js +3 -3
  54. package/es6/src/actions/watch.action.js +1 -1
  55. package/es6/src/commands/build.command.js +1 -1
  56. package/es6/src/commands/dependency.command.js +1 -1
  57. package/es6/src/commands/docker.command.js +1 -1
  58. package/es6/src/commands/forge.command.js +1 -1
  59. package/es6/src/commands/link.command.js +1 -1
  60. package/es6/src/commands/package.command.js +1 -1
  61. package/es6/src/commands/paths.command.js +1 -1
  62. package/es6/src/commands/publish.command.js +1 -1
  63. package/es6/src/commands/tag.command.js +1 -1
  64. package/es6/src/commands/typecheck.command.js +1 -1
  65. package/es6/src/commands/version.command.js +1 -1
  66. package/es6/src/factories/swc-config.factory.js +1 -1
  67. package/es6/src/forge.module.js +1 -1
  68. package/es6/src/semver/index.js +1 -0
  69. package/es6/src/semver/semver.js +71 -0
  70. package/es6/src/services/file-writer.service.js +1 -1
  71. package/es6/src/services/swc-transpiler.js +3 -3
  72. package/es6/src/services/ts-program-host.js +1 -1
  73. package/es6/src/services/type-emission-program.js +1 -1
  74. package/es6/src/services/type-emitter.js +4 -4
  75. package/package.json +6 -5
  76. package/types/src/actions/build.action.d.ts +2 -2
  77. package/types/src/actions/clean.action.d.ts +2 -2
  78. package/types/src/actions/commit.action.d.ts +2 -2
  79. package/types/src/actions/copy.action.d.ts +2 -2
  80. package/types/src/actions/dependency-report.action.d.ts +2 -2
  81. package/types/src/actions/dependency-sync.action.d.ts +2 -2
  82. package/types/src/actions/docker.action.d.ts +2 -2
  83. package/types/src/actions/link.action.d.ts +2 -2
  84. package/types/src/actions/package.action.d.ts +2 -2
  85. package/types/src/actions/paths.action.d.ts +2 -2
  86. package/types/src/actions/publish.action.d.ts +2 -2
  87. package/types/src/actions/sync-lock-file.action.d.ts +2 -2
  88. package/types/src/actions/tag.action.d.ts +2 -2
  89. package/types/src/actions/typecheck.action.d.ts +2 -2
  90. package/types/src/actions/unlink.action.d.ts +2 -2
  91. package/types/src/actions/version.action.d.ts +3 -3
  92. package/types/src/actions/watch.action.d.ts +2 -2
  93. package/types/src/commands/build.command.d.ts +2 -2
  94. package/types/src/commands/dependency.command.d.ts +2 -2
  95. package/types/src/commands/docker.command.d.ts +1 -1
  96. package/types/src/commands/forge.command.d.ts +2 -2
  97. package/types/src/commands/link.command.d.ts +2 -2
  98. package/types/src/commands/package.command.d.ts +1 -1
  99. package/types/src/commands/paths.command.d.ts +1 -1
  100. package/types/src/commands/publish.command.d.ts +1 -1
  101. package/types/src/commands/tag.command.d.ts +1 -1
  102. package/types/src/commands/typecheck.command.d.ts +1 -1
  103. package/types/src/commands/version.command.d.ts +1 -1
  104. package/types/src/create-workspace.d.ts +1 -1
  105. package/types/src/forge.module.d.ts +2 -2
  106. package/types/src/semver/index.d.ts +1 -0
  107. package/types/src/semver/semver.d.ts +18 -0
  108. package/types/src/types/dependency.types.d.ts +1 -1
  109. package/types/src/types/workspace-config.type.d.ts +1 -1
@@ -9,7 +9,7 @@ function _ts_metadata(k, v) {
9
9
  }
10
10
  import { injectable } from "@decohere/crucible/decorators";
11
11
  import { Workspace } from "@decohere/workspace";
12
- import { ActionResponse } from "@decohere/core/cli";
12
+ import { ActionResponse } from "@decohere/devkit/cli";
13
13
  import { io } from "@decohere/core/io";
14
14
  import { scribe } from "@decohere/scribe";
15
15
  import { formatUnknownError } from "../errors.js";
@@ -9,7 +9,7 @@ function _ts_metadata(k, v) {
9
9
  }
10
10
  import { injectable } from "@decohere/crucible/decorators";
11
11
  import { Workspace } from "@decohere/workspace";
12
- import { ActionResponse } from "@decohere/core/cli";
12
+ import { ActionResponse } from "@decohere/devkit/cli";
13
13
  import { scribe } from "@decohere/scribe";
14
14
  import { formatUnknownError } from "../errors.js";
15
15
  import { DependencyResolver } from "../services/dependency-resolver.service.js";
@@ -10,8 +10,8 @@ function _ts_metadata(k, v) {
10
10
  import path from "node:path";
11
11
  import { injectable } from "@decohere/crucible/decorators";
12
12
  import { Workspace } from "@decohere/workspace";
13
- import { ActionResponse } from "@decohere/core/cli";
14
- import { Docker as DockerInterop } from "@decohere/core/interop";
13
+ import { ActionResponse } from "@decohere/devkit/cli";
14
+ import { Docker as DockerInterop } from "@decohere/devkit/interop";
15
15
  import { io } from "@decohere/core/io";
16
16
  import { scribe } from "@decohere/scribe";
17
17
  import { ForgeError, formatUnknownError } from "../errors.js";
@@ -11,7 +11,7 @@ import fs from "node:fs/promises";
11
11
  import path from "node:path";
12
12
  import { injectable } from "@decohere/crucible/decorators";
13
13
  import { Workspace } from "@decohere/workspace";
14
- import { ActionResponse } from "@decohere/core/cli";
14
+ import { ActionResponse } from "@decohere/devkit/cli";
15
15
  import { scribe } from "@decohere/scribe";
16
16
  import "../extensions/project.extensions.js";
17
17
  import { ForgeError } from "../errors.js";
@@ -11,8 +11,8 @@ import fs from "node:fs/promises";
11
11
  import path from "node:path";
12
12
  import { injectable } from "@decohere/crucible/decorators";
13
13
  import { Workspace } from "@decohere/workspace";
14
- import { ActionResponse } from "@decohere/core/cli";
15
- import { Npm } from "@decohere/core/interop";
14
+ import { ActionResponse } from "@decohere/devkit/cli";
15
+ import { Npm } from "@decohere/devkit/interop";
16
16
  import { io } from "@decohere/core/io";
17
17
  import { scribe } from "@decohere/scribe";
18
18
  import { ForgeError, formatUnknownError } from "../errors.js";
@@ -12,7 +12,7 @@ import { readFile, writeFile } from "node:fs/promises";
12
12
  import path from "node:path";
13
13
  import { injectable } from "@decohere/crucible/decorators";
14
14
  import { packageAliases, Workspace } from "@decohere/workspace";
15
- import { ActionResponse } from "@decohere/core/cli";
15
+ import { ActionResponse } from "@decohere/devkit/cli";
16
16
  import { scribe } from "@decohere/scribe";
17
17
  export const PATHS_FILE = "tsconfig.paths.json";
18
18
  export class Paths {
@@ -9,8 +9,8 @@ function _ts_metadata(k, v) {
9
9
  }
10
10
  import { injectable } from "@decohere/crucible/decorators";
11
11
  import { Workspace } from "@decohere/workspace";
12
- import { ActionResponse } from "@decohere/core/cli";
13
- import { Npm } from "@decohere/core/interop";
12
+ import { ActionResponse } from "@decohere/devkit/cli";
13
+ import { Npm } from "@decohere/devkit/interop";
14
14
  import { scribe } from "@decohere/scribe";
15
15
  import { ForgeError, formatUnknownError } from "../errors.js";
16
16
  export class Publish {
@@ -5,8 +5,8 @@ function _ts_decorate(decorators, target, key, desc) {
5
5
  return c > 3 && r && Object.defineProperty(target, key, r), r;
6
6
  }
7
7
  import { injectable } from "@decohere/crucible/decorators";
8
- import { ActionResponse } from "@decohere/core/cli";
9
- import { Pnpm } from "@decohere/core/interop";
8
+ import { ActionResponse } from "@decohere/devkit/cli";
9
+ import { Pnpm } from "@decohere/devkit/interop";
10
10
  import { scribe } from "@decohere/scribe";
11
11
  import { formatUnknownError } from "../errors.js";
12
12
  export class SyncLockFile {
@@ -9,8 +9,8 @@ function _ts_metadata(k, v) {
9
9
  }
10
10
  import { injectable } from "@decohere/crucible/decorators";
11
11
  import { Workspace } from "@decohere/workspace";
12
- import { ActionResponse } from "@decohere/core/cli";
13
- import { Git } from "@decohere/core/interop";
12
+ import { ActionResponse } from "@decohere/devkit/cli";
13
+ import { Git } from "@decohere/devkit/interop";
14
14
  import { scribe } from "@decohere/scribe";
15
15
  import { ForgeError, formatUnknownError } from "../errors.js";
16
16
  export class Tag {
@@ -9,8 +9,8 @@ function _ts_metadata(k, v) {
9
9
  }
10
10
  import { injectable } from "@decohere/crucible/decorators";
11
11
  import { Workspace } from "@decohere/workspace";
12
- import { ActionResponse } from "@decohere/core/cli";
13
- import { Trace } from "@decohere/core/diagnostics";
12
+ import { ActionResponse } from "@decohere/devkit/cli";
13
+ import { Trace } from "@decohere/devkit/diagnostics";
14
14
  import { scribe } from "@decohere/scribe";
15
15
  import ts from "typescript";
16
16
  import { ForgeError } from "../errors.js";
@@ -7,7 +7,7 @@ function _ts_decorate(decorators, target, key, desc) {
7
7
  import fs from "node:fs/promises";
8
8
  import path from "node:path";
9
9
  import { injectable } from "@decohere/crucible/decorators";
10
- import { ActionResponse } from "@decohere/core/cli";
10
+ import { ActionResponse } from "@decohere/devkit/cli";
11
11
  import { scribe } from "@decohere/scribe";
12
12
  import { ForgeError } from "../errors.js";
13
13
  import { LINK_MANIFEST } from "./link.action.js";
@@ -12,9 +12,9 @@ import { readdir, readFile } from "node:fs/promises";
12
12
  import { join } from "node:path";
13
13
  import { injectable } from "@decohere/crucible/decorators";
14
14
  import { Workspace } from "@decohere/workspace";
15
- import { ActionResponse } from "@decohere/core/cli";
16
- import { Git } from "@decohere/core/interop";
17
- import { Semver, SemverError, VersionTypes } from "@decohere/core/semver";
15
+ import { ActionResponse } from "@decohere/devkit/cli";
16
+ import { Git } from "@decohere/devkit/interop";
17
+ import { Semver, SemverError, VersionTypes } from "../semver/index.js";
18
18
  import { scribe } from "@decohere/scribe";
19
19
  import { ForgeError, formatUnknownError } from "../errors.js";
20
20
  export const DefaultChannel = "beta";
@@ -9,7 +9,7 @@ function _ts_metadata(k, v) {
9
9
  }
10
10
  import { injectable } from "@decohere/crucible/decorators";
11
11
  import { Workspace } from "@decohere/workspace";
12
- import { ActionResponse } from "@decohere/core/cli";
12
+ import { ActionResponse } from "@decohere/devkit/cli";
13
13
  import { scribe } from "@decohere/scribe";
14
14
  export class Watch {
15
15
  workspace;
@@ -1,4 +1,4 @@
1
- import { CommandResponse, ConfigurationOption, DecohereCommand, NoCleanOptions } from "@decohere/core/cli";
1
+ import { CommandResponse, ConfigurationOption, DecohereCommand, NoCleanOptions } from "@decohere/devkit/cli";
2
2
  import auto from "async/auto.js";
3
3
  export class BuildCommand extends DecohereCommand {
4
4
  constructor(name){
@@ -1,4 +1,4 @@
1
- import { CommandResponse, ConfigurationOption, DecohereCommand } from "@decohere/core/cli";
1
+ import { CommandResponse, ConfigurationOption, DecohereCommand } from "@decohere/devkit/cli";
2
2
  import { CommitFiles } from "../actions/commit.action.js";
3
3
  import { ReportDependencies } from "../actions/dependency-report.action.js";
4
4
  import { SyncDependencies as DependencySync } from "../actions/dependency-sync.action.js";
@@ -1,4 +1,4 @@
1
- import { ConfigurationOption, DecohereCommand, DryRunOption } from "@decohere/core/cli";
1
+ import { ConfigurationOption, DecohereCommand, DryRunOption } from "@decohere/devkit/cli";
2
2
  import { Docker } from "../actions/docker.action.js";
3
3
  export class DockerCommand extends DecohereCommand {
4
4
  get actions() {
@@ -1,4 +1,4 @@
1
- import { DecohereCommand } from "@decohere/core/cli";
1
+ import { DecohereCommand } from "@decohere/devkit/cli";
2
2
  export class ForgeCommand extends DecohereCommand {
3
3
  constructor(commands, handler){
4
4
  super(ForgeCommand);
@@ -1,4 +1,4 @@
1
- import { CommandResponse, ConfigurationOption, DecohereCommand, NoCleanOptions } from "@decohere/core/cli";
1
+ import { CommandResponse, ConfigurationOption, DecohereCommand, NoCleanOptions } from "@decohere/devkit/cli";
2
2
  import auto from "async/auto.js";
3
3
  import { Build } from "../actions/build.action.js";
4
4
  import { Clean } from "../actions/clean.action.js";
@@ -1,4 +1,4 @@
1
- import { DecohereCommand } from "@decohere/core/cli";
1
+ import { DecohereCommand } from "@decohere/devkit/cli";
2
2
  import { PackageDeployable } from "../actions/package.action.js";
3
3
  export class PackageCommand extends DecohereCommand {
4
4
  get actions() {
@@ -1,4 +1,4 @@
1
- import { DecohereCommand } from "@decohere/core/cli";
1
+ import { DecohereCommand } from "@decohere/devkit/cli";
2
2
  import { Paths } from "../actions/paths.action.js";
3
3
  export class PathsCommand extends DecohereCommand {
4
4
  get actions() {
@@ -1,4 +1,4 @@
1
- import { ConfigurationOption, DecohereCommand, DryRunOption } from "@decohere/core/cli";
1
+ import { ConfigurationOption, DecohereCommand, DryRunOption } from "@decohere/devkit/cli";
2
2
  import { Publish } from "../actions/publish.action.js";
3
3
  export class PublishCommand extends DecohereCommand {
4
4
  get actions() {
@@ -1,4 +1,4 @@
1
- import { DecohereCommand, DryRunOption } from "@decohere/core/cli";
1
+ import { DecohereCommand, DryRunOption } from "@decohere/devkit/cli";
2
2
  import { Tag } from "../actions/tag.action.js";
3
3
  export class TagCommand extends DecohereCommand {
4
4
  get actions() {
@@ -1,4 +1,4 @@
1
- import { ConfigurationOption, DecohereCommand } from "@decohere/core/cli";
1
+ import { ConfigurationOption, DecohereCommand } from "@decohere/devkit/cli";
2
2
  import { TypeCheck } from "../actions/typecheck.action.js";
3
3
  export class TypeCheckCommand extends DecohereCommand {
4
4
  get actions() {
@@ -1,4 +1,4 @@
1
- import { ConfigurationOption, DecohereCommand, DryRunOption } from "@decohere/core/cli";
1
+ import { ConfigurationOption, DecohereCommand, DryRunOption } from "@decohere/devkit/cli";
2
2
  import { SyncLockFile } from "../actions/sync-lock-file.action.js";
3
3
  import { DefaultChannel, DefaultReleaseType, Version } from "../actions/version.action.js";
4
4
  export class VersionCommand extends DecohereCommand {
@@ -6,7 +6,7 @@ function _ts_decorate(decorators, target, key, desc) {
6
6
  }
7
7
  import path from "node:path";
8
8
  import { packageAliases } from "@decohere/workspace";
9
- import { Trace } from "@decohere/core/diagnostics";
9
+ import { Trace } from "@decohere/devkit/diagnostics";
10
10
  import { merge } from "@decohere/core/objects";
11
11
  import { ForgeError } from "../errors.js";
12
12
  const defaultOptions = {
@@ -1,4 +1,4 @@
1
- import { ModuleManifest } from "@decohere/core/cli";
1
+ import { ModuleManifest } from "@decohere/devkit/cli";
2
2
  import * as Actions from "./actions/index.js";
3
3
  import * as Commands from "./commands/index.js";
4
4
  import { createWorkspace } from "./create-workspace.js";
@@ -0,0 +1 @@
1
+ export * from "./semver.js";
@@ -0,0 +1,71 @@
1
+ export const VersionTypes = {
2
+ major: "major",
3
+ minor: "minor",
4
+ patch: "patch",
5
+ prerelease: "prerelease"
6
+ };
7
+ export class SemverError extends Error {
8
+ constructor(message){
9
+ super(message);
10
+ this.name = SemverError.name;
11
+ }
12
+ }
13
+ const SEMVER_REGEX = /^(\d+)\.(\d+)\.(\d+)(?:-([0-9A-Za-z.-]+))?$/;
14
+ export class Semver {
15
+ version;
16
+ constructor(version){
17
+ this.ensureValid(version);
18
+ this.version = version;
19
+ }
20
+ increment(versionType, preid = "pre") {
21
+ const { major, minor, patch, prerelease } = this.parse(this.version);
22
+ if (versionType === "major") {
23
+ this.version = `${major + 1}.0.0`;
24
+ return this;
25
+ }
26
+ if (versionType === "minor") {
27
+ this.version = `${major}.${minor + 1}.0`;
28
+ return this;
29
+ }
30
+ if (versionType === "patch") {
31
+ this.version = `${major}.${minor}.${patch + 1}`;
32
+ return this;
33
+ }
34
+ if (prerelease == null) {
35
+ this.version = `${major}.${minor}.${patch + 1}-${preid}.0`;
36
+ return this;
37
+ }
38
+ const [identifier, ...rest] = prerelease.split(".");
39
+ const maybeCounter = rest.at(-1);
40
+ const counter = maybeCounter != null ? Number.parseInt(maybeCounter, 10) : Number.NaN;
41
+ if (identifier === preid && Number.isFinite(counter)) {
42
+ const nextCounter = counter + 1;
43
+ const prefix = rest.length > 1 ? `${rest.slice(0, -1).join(".")}.` : "";
44
+ this.version = `${major}.${minor}.${patch}-${preid}.${prefix}${nextCounter}`;
45
+ return this;
46
+ }
47
+ this.version = `${major}.${minor}.${patch}-${preid}.0`;
48
+ return this;
49
+ }
50
+ toString() {
51
+ return this.version;
52
+ }
53
+ ensureValid(version) {
54
+ if (SEMVER_REGEX.test(version)) {
55
+ return;
56
+ }
57
+ throw new SemverError(`Invalid semantic version: ${version}`);
58
+ }
59
+ parse(version) {
60
+ const match = version.match(SEMVER_REGEX);
61
+ if (match == null) {
62
+ throw new SemverError(`Invalid semantic version: ${version}`);
63
+ }
64
+ return {
65
+ major: Number.parseInt(match[1], 10),
66
+ minor: Number.parseInt(match[2], 10),
67
+ patch: Number.parseInt(match[3], 10),
68
+ prerelease: match[4]
69
+ };
70
+ }
71
+ }
@@ -6,7 +6,7 @@ function _ts_decorate(decorators, target, key, desc) {
6
6
  }
7
7
  import fs from "node:fs/promises";
8
8
  import { injectable } from "@decohere/crucible/decorators";
9
- import { Trace } from "@decohere/core/diagnostics";
9
+ import { Trace } from "@decohere/devkit/diagnostics";
10
10
  import { io } from "@decohere/core/io";
11
11
  import "../extensions/project.extensions.js";
12
12
  const DEFAULT_WRITE_CONCURRENCY = 16;
@@ -10,8 +10,8 @@ function _ts_metadata(k, v) {
10
10
  import path from "node:path";
11
11
  import { sourceExtensions } from "@decohere/workspace";
12
12
  import { cache, invalidateCache } from "@decohere/core/caching";
13
- import { Trace } from "@decohere/core/diagnostics";
14
- import { io } from "@decohere/core/io";
13
+ import { Trace } from "@decohere/devkit/diagnostics";
14
+ import { WatchEvents } from "@decohere/devkit/io";
15
15
  import { transform, transformSync } from "@swc/core";
16
16
  import { BuildTargets } from "../types/build-target.type.js";
17
17
  import "../extensions/project.extensions.js";
@@ -157,7 +157,7 @@ export class SwcTranspiler {
157
157
  }
158
158
  async onIncrementalFileEvent(evt) {
159
159
  const { file, project } = evt;
160
- if (evt.eventName === io.WatchEvents.unlink) {
160
+ if (evt.eventName === WatchEvents.unlink) {
161
161
  this.#outputs.delete(file.fullPath);
162
162
  return [];
163
163
  }
@@ -9,7 +9,7 @@ function _ts_metadata(k, v) {
9
9
  }
10
10
  import fs from "node:fs";
11
11
  import { cache } from "@decohere/core/caching";
12
- import { Trace } from "@decohere/core/diagnostics";
12
+ import { Trace } from "@decohere/devkit/diagnostics";
13
13
  import { createCompilerHost, createProgram } from "typescript";
14
14
  import { DEFAULT_TYPE_EMITTER_OPTIONS, REQUIRED_TYPE_EMITTER_OPTIONS } from "./type-emitter.js";
15
15
  export class TsProgramHost {
@@ -8,7 +8,7 @@ function _ts_metadata(k, v) {
8
8
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
9
  }
10
10
  import path from "node:path";
11
- import { Trace } from "@decohere/core/diagnostics";
11
+ import { Trace } from "@decohere/devkit/diagnostics";
12
12
  import ts from "typescript";
13
13
  import { TransformResponse } from "../types/transform-response.model.js";
14
14
  export class TypeEmissionProgram {
@@ -8,8 +8,8 @@ function _ts_metadata(k, v) {
8
8
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
9
  }
10
10
  import { invalidateCache } from "@decohere/core/caching";
11
- import { Trace } from "@decohere/core/diagnostics";
12
- import { io } from "@decohere/core/io";
11
+ import { Trace } from "@decohere/devkit/diagnostics";
12
+ import { WatchEvents } from "@decohere/devkit/io";
13
13
  import "../extensions/project.extensions.js";
14
14
  import { IncrementalWatch } from "./incremental-watch.js";
15
15
  import { OutputCache } from "./output-cache.js";
@@ -129,14 +129,14 @@ export class TypeEmitter {
129
129
  }
130
130
  async onIncrementalFileEvent(evt) {
131
131
  const { file, project } = evt;
132
- if (evt.eventName === io.WatchEvents.unlink) {
132
+ if (evt.eventName === WatchEvents.unlink) {
133
133
  this.#outputs.delete(file.fullPath);
134
134
  return [];
135
135
  }
136
136
  if (!project.isSourceFile(file)) {
137
137
  return [];
138
138
  }
139
- if (evt.eventName === io.WatchEvents.add) {
139
+ if (evt.eventName === WatchEvents.add) {
140
140
  this.#programs?.forEach((p)=>{
141
141
  p.addFile(file, project);
142
142
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@decohere/forge",
3
- "version": "0.0.1-dev.118",
3
+ "version": "0.0.1-dev.119",
4
4
  "description": "TypeScript monorepo build system — zero config, fast compilation, streamlined developer workflow",
5
5
  "keywords": [
6
6
  "typescript",
@@ -29,10 +29,11 @@
29
29
  "test": "echo \"Error: no test specified\" && exit 1"
30
30
  },
31
31
  "dependencies": {
32
- "@decohere/core": "0.0.1-dev.118",
33
- "@decohere/crucible": "0.0.1-dev.118",
34
- "@decohere/scribe": "0.0.1-dev.118",
35
- "@decohere/workspace": "0.0.1-dev.118",
32
+ "@decohere/core": "0.0.1-dev.119",
33
+ "@decohere/crucible": "0.0.1-dev.119",
34
+ "@decohere/devkit": "0.0.1-dev.119",
35
+ "@decohere/scribe": "0.0.1-dev.119",
36
+ "@decohere/workspace": "0.0.1-dev.119",
36
37
  "@swc/core": "^1.11.11",
37
38
  "async": "^3.2.6",
38
39
  "parse-imports": "^2.2.1",
@@ -1,7 +1,7 @@
1
1
  import type { Project } from "@decohere/workspace";
2
2
  import { Workspace } from "@decohere/workspace";
3
- import type { Action } from "@decohere/core/cli";
4
- import { ActionResponse } from "@decohere/core/cli";
3
+ import type { Action } from "@decohere/devkit/cli";
4
+ import { ActionResponse } from "@decohere/devkit/cli";
5
5
  import { FileWriterService } from "../services/file-writer.service.js";
6
6
  import type { TransformResponse } from "../types/transform-response.model.js";
7
7
  import { type Transformer } from "../types/transformer.type.js";
@@ -1,6 +1,6 @@
1
1
  import { Workspace } from "@decohere/workspace";
2
- import type { Action } from "@decohere/core/cli";
3
- import { ActionResponse } from "@decohere/core/cli";
2
+ import type { Action } from "@decohere/devkit/cli";
3
+ import { ActionResponse } from "@decohere/devkit/cli";
4
4
  export type CleanOptions = {
5
5
  clean: boolean;
6
6
  configuration: string;
@@ -1,6 +1,6 @@
1
1
  import { Workspace } from "@decohere/workspace";
2
- import type { Action } from "@decohere/core/cli";
3
- import { ActionResponse } from "@decohere/core/cli";
2
+ import type { Action } from "@decohere/devkit/cli";
3
+ import { ActionResponse } from "@decohere/devkit/cli";
4
4
  export type CommitFilesOptions = {
5
5
  configuration?: string;
6
6
  commit?: boolean;
@@ -1,6 +1,6 @@
1
1
  import { Workspace } from "@decohere/workspace";
2
- import type { Action } from "@decohere/core/cli";
3
- import { ActionResponse } from "@decohere/core/cli";
2
+ import type { Action } from "@decohere/devkit/cli";
3
+ import { ActionResponse } from "@decohere/devkit/cli";
4
4
  export type CopyOptions = {
5
5
  copy: boolean;
6
6
  configuration: string;
@@ -1,6 +1,6 @@
1
1
  import { Workspace } from "@decohere/workspace";
2
- import type { Action } from "@decohere/core/cli";
3
- import { ActionResponse } from "@decohere/core/cli";
2
+ import type { Action } from "@decohere/devkit/cli";
3
+ import { ActionResponse } from "@decohere/devkit/cli";
4
4
  import { DependencyResolver } from "../services/dependency-resolver.service.js";
5
5
  import type { DependencyWarning, DriftEntry } from "../types/dependency.types.js";
6
6
  type ReportOptions = {
@@ -1,6 +1,6 @@
1
1
  import { Workspace } from "@decohere/workspace";
2
- import type { Action } from "@decohere/core/cli";
3
- import { ActionResponse } from "@decohere/core/cli";
2
+ import type { Action } from "@decohere/devkit/cli";
3
+ import { ActionResponse } from "@decohere/devkit/cli";
4
4
  import { DependencyResolver } from "../services/dependency-resolver.service.js";
5
5
  import type { SyncprojectResult } from "../types/dependency.types.js";
6
6
  export type DependenciesOptions = {
@@ -1,6 +1,6 @@
1
1
  import { Workspace } from "@decohere/workspace";
2
- import type { Action, ResultStatus } from "@decohere/core/cli";
3
- import { ActionResponse } from "@decohere/core/cli";
2
+ import type { Action, ResultStatus } from "@decohere/devkit/cli";
3
+ import { ActionResponse } from "@decohere/devkit/cli";
4
4
  export type DockerOptions = {
5
5
  configuration: string;
6
6
  dryRun?: boolean;
@@ -1,6 +1,6 @@
1
1
  import { Workspace } from "@decohere/workspace";
2
- import type { Action } from "@decohere/core/cli";
3
- import { ActionResponse } from "@decohere/core/cli";
2
+ import type { Action } from "@decohere/devkit/cli";
3
+ import { ActionResponse } from "@decohere/devkit/cli";
4
4
  import "../extensions/project.extensions.js";
5
5
  export declare const LINK_MANIFEST = ".forge-link.json";
6
6
  export type LinkOptions = {
@@ -1,6 +1,6 @@
1
1
  import { Workspace } from "@decohere/workspace";
2
- import type { Action, ResultStatus } from "@decohere/core/cli";
3
- import { ActionResponse } from "@decohere/core/cli";
2
+ import type { Action, ResultStatus } from "@decohere/devkit/cli";
3
+ import { ActionResponse } from "@decohere/devkit/cli";
4
4
  import { DependencyPinner } from "../packaging/dependency-pinner.service.js";
5
5
  import { ImportGraph } from "../packaging/import-graph.service.js";
6
6
  export type PackageOptions = {
@@ -1,6 +1,6 @@
1
1
  import { Workspace } from "@decohere/workspace";
2
- import type { Action } from "@decohere/core/cli";
3
- import { ActionResponse } from "@decohere/core/cli";
2
+ import type { Action } from "@decohere/devkit/cli";
3
+ import { ActionResponse } from "@decohere/devkit/cli";
4
4
  export declare const PATHS_FILE = "tsconfig.paths.json";
5
5
  export type PathsOptions = {
6
6
  /** Fail if the file is missing or out of date, instead of writing it. */
@@ -1,7 +1,7 @@
1
1
  import type { Project } from "@decohere/workspace";
2
2
  import { Workspace } from "@decohere/workspace";
3
- import type { Action, ResultStatus } from "@decohere/core/cli";
4
- import { ActionResponse } from "@decohere/core/cli";
3
+ import type { Action, ResultStatus } from "@decohere/devkit/cli";
4
+ import { ActionResponse } from "@decohere/devkit/cli";
5
5
  export type PublishOptions = {
6
6
  configuration: string;
7
7
  channel?: string;
@@ -1,5 +1,5 @@
1
- import type { Action } from "@decohere/core/cli";
2
- import { ActionResponse } from "@decohere/core/cli";
1
+ import type { Action } from "@decohere/devkit/cli";
2
+ import { ActionResponse } from "@decohere/devkit/cli";
3
3
  export type SyncLockFileOptions = {
4
4
  sync?: boolean;
5
5
  dryRun?: boolean;
@@ -1,6 +1,6 @@
1
1
  import { Workspace } from "@decohere/workspace";
2
- import type { Action } from "@decohere/core/cli";
3
- import { ActionResponse } from "@decohere/core/cli";
2
+ import type { Action } from "@decohere/devkit/cli";
3
+ import { ActionResponse } from "@decohere/devkit/cli";
4
4
  export type TagOptions = {
5
5
  prefix?: string;
6
6
  dryRun?: boolean;
@@ -1,6 +1,6 @@
1
1
  import { Workspace } from "@decohere/workspace";
2
- import type { Action } from "@decohere/core/cli";
3
- import { ActionResponse } from "@decohere/core/cli";
2
+ import type { Action } from "@decohere/devkit/cli";
3
+ import { ActionResponse } from "@decohere/devkit/cli";
4
4
  import { TypeEmitter } from "../services/type-emitter.js";
5
5
  export type TypeCheckOptions = {
6
6
  configuration: string;
@@ -1,5 +1,5 @@
1
- import type { Action } from "@decohere/core/cli";
2
- import { ActionResponse } from "@decohere/core/cli";
1
+ import type { Action } from "@decohere/devkit/cli";
2
+ import { ActionResponse } from "@decohere/devkit/cli";
3
3
  export type UnlinkOptions = {
4
4
  targetDir: string;
5
5
  };
@@ -1,7 +1,7 @@
1
1
  import { Workspace } from "@decohere/workspace";
2
- import type { Action, ResultStatus } from "@decohere/core/cli";
3
- import { ActionResponse } from "@decohere/core/cli";
4
- import { type VersionType } from "@decohere/core/semver";
2
+ import type { Action, ResultStatus } from "@decohere/devkit/cli";
3
+ import { ActionResponse } from "@decohere/devkit/cli";
4
+ import { type VersionType } from "../semver/index.js";
5
5
  export type VersionResponse = ResultStatus & {
6
6
  name: string;
7
7
  };
@@ -1,6 +1,6 @@
1
1
  import { Workspace } from "@decohere/workspace";
2
- import type { Action } from "@decohere/core/cli";
3
- import { ActionResponse } from "@decohere/core/cli";
2
+ import type { Action } from "@decohere/devkit/cli";
3
+ import { ActionResponse } from "@decohere/devkit/cli";
4
4
  export type WatchOptions = {
5
5
  watch: boolean;
6
6
  configuration: string;
@@ -1,5 +1,5 @@
1
- import type { MergeOptions } from "@decohere/core/cli";
2
- import { CommandResponse, DecohereCommand } from "@decohere/core/cli";
1
+ import type { MergeOptions } from "@decohere/devkit/cli";
2
+ import { CommandResponse, DecohereCommand } from "@decohere/devkit/cli";
3
3
  import type { Build } from "../actions/build.action.js";
4
4
  import type { Clean } from "../actions/clean.action.js";
5
5
  import type { Copy } from "../actions/copy.action.js";