@powerlines/plugin-jest 0.1.205 → 0.1.207

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 (22) hide show
  1. package/dist/index.cjs +1 -2
  2. package/dist/index.d.mts +1 -1
  3. package/dist/index.mjs +1 -2
  4. package/dist/powerlines/src/types/config.d.cts +4 -12
  5. package/dist/{packages/powerlines → powerlines}/src/types/config.d.mts +4 -12
  6. package/dist/powerlines/src/types/context.d.cts +7 -0
  7. package/dist/{packages/powerlines → powerlines}/src/types/context.d.mts +7 -0
  8. package/dist/powerlines/src/types/resolved.d.cts +2 -2
  9. package/dist/{packages/powerlines → powerlines}/src/types/resolved.d.mts +2 -2
  10. package/dist/types/plugin.d.mts +3 -3
  11. package/package.json +4 -4
  12. package/dist/node_modules/.pnpm/@storm-software_config-tools@1.188.80_magicast@0.5.1/node_modules/@storm-software/config-tools/dist/chunk-POXTJ6GF.cjs +0 -16
  13. package/dist/node_modules/.pnpm/@storm-software_config-tools@1.188.80_magicast@0.5.1/node_modules/@storm-software/config-tools/dist/chunk-POXTJ6GF.mjs +0 -15
  14. /package/dist/{packages/powerlines → powerlines}/src/internal/helpers/hooks.d.mts +0 -0
  15. /package/dist/{packages/powerlines → powerlines}/src/types/api.d.mts +0 -0
  16. /package/dist/{packages/powerlines → powerlines}/src/types/build.d.mts +0 -0
  17. /package/dist/{packages/powerlines → powerlines}/src/types/commands.d.mts +0 -0
  18. /package/dist/{packages/powerlines → powerlines}/src/types/fs.d.mts +0 -0
  19. /package/dist/{packages/powerlines → powerlines}/src/types/hooks.d.mts +0 -0
  20. /package/dist/{packages/powerlines → powerlines}/src/types/plugin.d.mts +0 -0
  21. /package/dist/{packages/powerlines → powerlines}/src/types/tsconfig.d.mts +0 -0
  22. /package/dist/{packages/powerlines → powerlines}/src/types/unplugin.d.mts +0 -0
package/dist/index.cjs CHANGED
@@ -1,6 +1,5 @@
1
1
  Object.defineProperty(exports, '__esModule', { value: true });
2
2
  const require_rolldown_runtime = require('./_virtual/rolldown_runtime.cjs');
3
- const require_chunk_POXTJ6GF = require('./node_modules/.pnpm/@storm-software_config-tools@1.188.80_magicast@0.5.1/node_modules/@storm-software/config-tools/dist/chunk-POXTJ6GF.cjs');
4
3
  let __stryke_path_join = require("@stryke/path/join");
5
4
  let chalk = require("chalk");
6
5
  chalk = require_rolldown_runtime.__toESM(chalk);
@@ -92,7 +91,7 @@ const plugin = (options = {}) => {
92
91
  const suites = `${chalk.default.bold("Test Suites: ") + (suitesFailed ? `${chalk.default.bold(chalk.default.red(`${suitesFailed} failed`))}, ` : "") + (suitesPending ? `${chalk.default.bold(chalk.default.yellow(`${suitesPending} skipped`))}, ` : "") + (suitesPassed ? `${chalk.default.bold(chalk.default.green(`${suitesPassed} passed`))}, ` : "") + (suitesRun !== suitesTotal ? `${suitesRun} of ${suitesTotal}` : suitesTotal)} total`;
93
92
  const tests = `${chalk.default.bold("Tests: ") + (testsFailed > 0 ? `${chalk.default.bold(chalk.default.red(`${testsFailed} failed`))}, ` : "") + (testsPending > 0 ? `${chalk.default.bold(chalk.default.yellow(`${testsPending} skipped`))}, ` : "") + (testsTodo > 0 ? `${chalk.default.bold(chalk.default.magenta(`${testsTodo} todo`))}, ` : "") + (testsPassed > 0 ? `${chalk.default.bold(chalk.default.green(`${testsPassed} passed`))}, ` : "")}${testsTotal} total`;
94
93
  const snapshots = `${chalk.default.bold("Snapshots: ") + (snapshotsFailed ? `${chalk.default.bold(chalk.default.red(`${snapshotsFailed} failed`))}, ` : "") + (snapshotsOutdated && !snapshotsDidUpdate ? `${chalk.default.bold(chalk.default.yellow(`${snapshotsOutdated} obsolete`))}, ` : "") + (snapshotsOutdated && snapshotsDidUpdate ? `${chalk.default.bold(chalk.default.green(`${snapshotsOutdated} removed`))}, ` : "") + (snapshotsFilesRemoved && !snapshotsDidUpdate ? `${chalk.default.bold(chalk.default.yellow(`${(0, jest_util.pluralize)("file", snapshotsFilesRemoved)} obsolete`))}, ` : "") + (snapshotsFilesRemoved && snapshotsDidUpdate ? `${chalk.default.bold(chalk.default.green(`${(0, jest_util.pluralize)("file", snapshotsFilesRemoved)} removed`))}, ` : "") + (snapshotsUpdated ? `${chalk.default.bold(chalk.default.green(`${snapshotsUpdated} updated`))}, ` : "") + (snapshotsAdded ? `${chalk.default.bold(chalk.default.green(`${snapshotsAdded} written`))}, ` : "") + (snapshotsPassed ? `${chalk.default.bold(chalk.default.green(`${snapshotsPassed} passed`))}, ` : "")}${snapshotsTotal} total`;
95
- this.log(require_chunk_POXTJ6GF.LogLevelLabel.INFO, `
94
+ this.info(`
96
95
  ${chalk.default.bold(`Test result summary:`)}
97
96
  ${suites}
98
97
  ${tests}
package/dist/index.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { Plugin } from "./packages/powerlines/src/types/plugin.mjs";
1
+ import { Plugin } from "./powerlines/src/types/plugin.mjs";
2
2
  import { JestPluginContext, JestPluginOptions, JestPluginResolvedConfig, JestPluginUserConfig, __ΩJestPluginContext, __ΩJestPluginOptions, __ΩJestPluginResolvedConfig, __ΩJestPluginUserConfig } from "./types/plugin.mjs";
3
3
 
4
4
  //#region src/index.d.ts
package/dist/index.mjs CHANGED
@@ -1,4 +1,3 @@
1
- import { LogLevelLabel } from "./node_modules/.pnpm/@storm-software_config-tools@1.188.80_magicast@0.5.1/node_modules/@storm-software/config-tools/dist/chunk-POXTJ6GF.mjs";
2
1
  import { joinPaths } from "@stryke/path/join";
3
2
  import chalk from "chalk";
4
3
  import { runCLI } from "jest";
@@ -89,7 +88,7 @@ const plugin = (options = {}) => {
89
88
  const suites = `${chalk.bold("Test Suites: ") + (suitesFailed ? `${chalk.bold(chalk.red(`${suitesFailed} failed`))}, ` : "") + (suitesPending ? `${chalk.bold(chalk.yellow(`${suitesPending} skipped`))}, ` : "") + (suitesPassed ? `${chalk.bold(chalk.green(`${suitesPassed} passed`))}, ` : "") + (suitesRun !== suitesTotal ? `${suitesRun} of ${suitesTotal}` : suitesTotal)} total`;
90
89
  const tests = `${chalk.bold("Tests: ") + (testsFailed > 0 ? `${chalk.bold(chalk.red(`${testsFailed} failed`))}, ` : "") + (testsPending > 0 ? `${chalk.bold(chalk.yellow(`${testsPending} skipped`))}, ` : "") + (testsTodo > 0 ? `${chalk.bold(chalk.magenta(`${testsTodo} todo`))}, ` : "") + (testsPassed > 0 ? `${chalk.bold(chalk.green(`${testsPassed} passed`))}, ` : "")}${testsTotal} total`;
91
90
  const snapshots = `${chalk.bold("Snapshots: ") + (snapshotsFailed ? `${chalk.bold(chalk.red(`${snapshotsFailed} failed`))}, ` : "") + (snapshotsOutdated && !snapshotsDidUpdate ? `${chalk.bold(chalk.yellow(`${snapshotsOutdated} obsolete`))}, ` : "") + (snapshotsOutdated && snapshotsDidUpdate ? `${chalk.bold(chalk.green(`${snapshotsOutdated} removed`))}, ` : "") + (snapshotsFilesRemoved && !snapshotsDidUpdate ? `${chalk.bold(chalk.yellow(`${pluralize("file", snapshotsFilesRemoved)} obsolete`))}, ` : "") + (snapshotsFilesRemoved && snapshotsDidUpdate ? `${chalk.bold(chalk.green(`${pluralize("file", snapshotsFilesRemoved)} removed`))}, ` : "") + (snapshotsUpdated ? `${chalk.bold(chalk.green(`${snapshotsUpdated} updated`))}, ` : "") + (snapshotsAdded ? `${chalk.bold(chalk.green(`${snapshotsAdded} written`))}, ` : "") + (snapshotsPassed ? `${chalk.bold(chalk.green(`${snapshotsPassed} passed`))}, ` : "")}${snapshotsTotal} total`;
92
- this.log(LogLevelLabel.INFO, `
91
+ this.info(`
93
92
  ${chalk.bold(`Test result summary:`)}
94
93
  ${suites}
95
94
  ${tests}
@@ -14,6 +14,7 @@ import { DateString } from "compatx";
14
14
 
15
15
  //#region ../powerlines/src/types/config.d.ts
16
16
 
17
+ type LogLevel = "error" | "warn" | "info" | "debug" | "trace";
17
18
  type LogFn = (type: LogLevelLabel, ...args: string[]) => void;
18
19
  /**
19
20
  * The {@link StormWorkspaceConfig | configuration} object for an entire Powerlines workspace
@@ -91,15 +92,6 @@ interface OutputConfig {
91
92
  * @defaultValue "\{projectRoot\}/powerlines.d.ts"
92
93
  */
93
94
  dts?: string | false;
94
- /**
95
- * A prefix to use for identifying builtin modules
96
- *
97
- * @remarks
98
- * This prefix will be used to identify all builtin modules generated during the "prepare" phase. An example builtin ID for a module called `"utils"` would be `"{builtinPrefix}:utils"`.
99
- *
100
- * @defaultValue "powerlines"
101
- */
102
- builtinPrefix?: string;
103
95
  /**
104
96
  * The module format of the output files
105
97
  *
@@ -262,7 +254,7 @@ interface CommonUserConfig extends BaseConfig {
262
254
  *
263
255
  * @defaultValue "info"
264
256
  */
265
- logLevel?: LogLevelLabel | null;
257
+ logLevel?: LogLevel | null;
266
258
  /**
267
259
  * A custom logger function to use for logging messages
268
260
  */
@@ -335,7 +327,7 @@ interface CommonUserConfig extends BaseConfig {
335
327
  * A string identifier that allows a child framework or tool to identify itself when using Powerlines.
336
328
  *
337
329
  * @remarks
338
- * If no values are provided for {@link OutputConfig.dts | output.dts}, {@link OutputConfig.builtinPrefix | output.builtinPrefix}, or {@link OutputConfig.artifactsPath | output.artifactsFolder}, this value will be used as the default.
330
+ * If no values are provided for {@link OutputConfig.dts | output.dts} or {@link OutputConfig.artifactsPath | output.artifactsFolder}, this value will be used as the default.
339
331
  *
340
332
  * @defaultValue "powerlines"
341
333
  */
@@ -429,4 +421,4 @@ type DeployInlineConfig<TUserConfig extends UserConfig$1 = UserConfig$1> = Inlin
429
421
  command: "deploy";
430
422
  };
431
423
  //#endregion
432
- export { BuildInlineConfig, CleanInlineConfig, DeployInlineConfig, DocsInlineConfig, ESBuildUserConfig, EnvironmentConfig, FarmUserConfig, InlineConfig, LintInlineConfig, LogFn, NewInlineConfig, OutputConfig, PluginConfig, PrepareInlineConfig, RolldownUserConfig, RollupUserConfig, RspackUserConfig, TsdownUserConfig, TsupUserConfig, UnbuildUserConfig, UserConfig$1 as UserConfig, ViteUserConfig, WebpackUserConfig, WorkspaceConfig };
424
+ export { BuildInlineConfig, CleanInlineConfig, DeployInlineConfig, DocsInlineConfig, ESBuildUserConfig, EnvironmentConfig, FarmUserConfig, InlineConfig, LintInlineConfig, LogFn, LogLevel, NewInlineConfig, OutputConfig, PluginConfig, PrepareInlineConfig, RolldownUserConfig, RollupUserConfig, RspackUserConfig, TsdownUserConfig, TsupUserConfig, UnbuildUserConfig, UserConfig$1 as UserConfig, ViteUserConfig, WebpackUserConfig, WorkspaceConfig };
@@ -14,6 +14,7 @@ import { DateString } from "compatx";
14
14
 
15
15
  //#region ../powerlines/src/types/config.d.ts
16
16
 
17
+ type LogLevel = "error" | "warn" | "info" | "debug" | "trace";
17
18
  type LogFn = (type: LogLevelLabel, ...args: string[]) => void;
18
19
  /**
19
20
  * The {@link StormWorkspaceConfig | configuration} object for an entire Powerlines workspace
@@ -91,15 +92,6 @@ interface OutputConfig {
91
92
  * @defaultValue "\{projectRoot\}/powerlines.d.ts"
92
93
  */
93
94
  dts?: string | false;
94
- /**
95
- * A prefix to use for identifying builtin modules
96
- *
97
- * @remarks
98
- * This prefix will be used to identify all builtin modules generated during the "prepare" phase. An example builtin ID for a module called `"utils"` would be `"{builtinPrefix}:utils"`.
99
- *
100
- * @defaultValue "powerlines"
101
- */
102
- builtinPrefix?: string;
103
95
  /**
104
96
  * The module format of the output files
105
97
  *
@@ -262,7 +254,7 @@ interface CommonUserConfig extends BaseConfig {
262
254
  *
263
255
  * @defaultValue "info"
264
256
  */
265
- logLevel?: LogLevelLabel | null;
257
+ logLevel?: LogLevel | null;
266
258
  /**
267
259
  * A custom logger function to use for logging messages
268
260
  */
@@ -335,7 +327,7 @@ interface CommonUserConfig extends BaseConfig {
335
327
  * A string identifier that allows a child framework or tool to identify itself when using Powerlines.
336
328
  *
337
329
  * @remarks
338
- * If no values are provided for {@link OutputConfig.dts | output.dts}, {@link OutputConfig.builtinPrefix | output.builtinPrefix}, or {@link OutputConfig.artifactsPath | output.artifactsFolder}, this value will be used as the default.
330
+ * If no values are provided for {@link OutputConfig.dts | output.dts} or {@link OutputConfig.artifactsPath | output.artifactsFolder}, this value will be used as the default.
339
331
  *
340
332
  * @defaultValue "powerlines"
341
333
  */
@@ -429,4 +421,4 @@ type DeployInlineConfig<TUserConfig extends UserConfig$1 = UserConfig$1> = Inlin
429
421
  command: "deploy";
430
422
  };
431
423
  //#endregion
432
- export { BuildInlineConfig, CleanInlineConfig, DeployInlineConfig, DocsInlineConfig, ESBuildUserConfig, EnvironmentConfig, FarmUserConfig, InlineConfig, LintInlineConfig, LogFn, NewInlineConfig, OutputConfig, PluginConfig, PrepareInlineConfig, RolldownUserConfig, RollupUserConfig, RspackUserConfig, TsdownUserConfig, TsupUserConfig, UnbuildUserConfig, UserConfig$1 as UserConfig, ViteUserConfig, WebpackUserConfig, WorkspaceConfig };
424
+ export { BuildInlineConfig, CleanInlineConfig, DeployInlineConfig, DocsInlineConfig, ESBuildUserConfig, EnvironmentConfig, FarmUserConfig, InlineConfig, LintInlineConfig, LogFn, LogLevel, NewInlineConfig, OutputConfig, PluginConfig, PrepareInlineConfig, RolldownUserConfig, RollupUserConfig, RspackUserConfig, TsdownUserConfig, TsupUserConfig, UnbuildUserConfig, UserConfig$1 as UserConfig, ViteUserConfig, WebpackUserConfig, WorkspaceConfig };
@@ -226,6 +226,13 @@ interface UnresolvedContext<TResolvedConfig extends ResolvedConfig = ResolvedCon
226
226
  * The builtin module id that exist in the Powerlines virtual file system
227
227
  */
228
228
  builtins: string[];
229
+ /**
230
+ * The alias mappings for the project used during module resolution
231
+ *
232
+ * @remarks
233
+ * This includes both the built-in module aliases as well as any custom aliases defined in the build configuration.
234
+ */
235
+ alias: Record<string, string>;
229
236
  /**
230
237
  * The {@link Project} instance used for type reflection and module manipulation
231
238
  *
@@ -226,6 +226,13 @@ interface UnresolvedContext<TResolvedConfig extends ResolvedConfig = ResolvedCon
226
226
  * The builtin module id that exist in the Powerlines virtual file system
227
227
  */
228
228
  builtins: string[];
229
+ /**
230
+ * The alias mappings for the project used during module resolution
231
+ *
232
+ * @remarks
233
+ * This includes both the built-in module aliases as well as any custom aliases defined in the build configuration.
234
+ */
235
+ alias: Record<string, string>;
229
236
  /**
230
237
  * The {@link Project} instance used for type reflection and module manipulation
231
238
  *
@@ -1,5 +1,5 @@
1
1
  import { BuilderVariant } from "./build.cjs";
2
- import { ESBuildUserConfig, EnvironmentConfig, FarmUserConfig, InlineConfig, OutputConfig, RolldownUserConfig, RollupUserConfig, RspackUserConfig, TsdownUserConfig, TsupUserConfig, UnbuildUserConfig, UserConfig as UserConfig$1, ViteUserConfig, WebpackUserConfig } from "./config.cjs";
2
+ import { ESBuildUserConfig, EnvironmentConfig, FarmUserConfig, InlineConfig, LogLevel, OutputConfig, RolldownUserConfig, RollupUserConfig, RspackUserConfig, TsdownUserConfig, TsupUserConfig, UnbuildUserConfig, UserConfig as UserConfig$1, ViteUserConfig, WebpackUserConfig } from "./config.cjs";
3
3
  import { NonUndefined } from "@stryke/types/base";
4
4
  import { ResolvedPreviewOptions } from "vite";
5
5
  import { TypeDefinition } from "@stryke/types/configuration";
@@ -76,7 +76,7 @@ type ResolvedConfig<TUserConfig extends UserConfig$1 = UserConfig$1> = Omit<TUse
76
76
  *
77
77
  * @defaultValue "info"
78
78
  */
79
- logLevel: "error" | "warn" | "info" | "debug" | "trace" | null;
79
+ logLevel: LogLevel | null;
80
80
  };
81
81
  type ViteResolvedConfig = ResolvedConfig<ViteUserConfig>;
82
82
  type WebpackResolvedConfig = ResolvedConfig<WebpackUserConfig>;
@@ -1,5 +1,5 @@
1
1
  import { BuilderVariant } from "./build.mjs";
2
- import { ESBuildUserConfig, EnvironmentConfig, FarmUserConfig, InlineConfig, OutputConfig, RolldownUserConfig, RollupUserConfig, RspackUserConfig, TsdownUserConfig, TsupUserConfig, UnbuildUserConfig, UserConfig as UserConfig$1, ViteUserConfig, WebpackUserConfig } from "./config.mjs";
2
+ import { ESBuildUserConfig, EnvironmentConfig, FarmUserConfig, InlineConfig, LogLevel, OutputConfig, RolldownUserConfig, RollupUserConfig, RspackUserConfig, TsdownUserConfig, TsupUserConfig, UnbuildUserConfig, UserConfig as UserConfig$1, ViteUserConfig, WebpackUserConfig } from "./config.mjs";
3
3
  import { NonUndefined } from "@stryke/types/base";
4
4
  import { ResolvedPreviewOptions } from "vite";
5
5
  import { TypeDefinition } from "@stryke/types/configuration";
@@ -76,7 +76,7 @@ type ResolvedConfig<TUserConfig extends UserConfig$1 = UserConfig$1> = Omit<TUse
76
76
  *
77
77
  * @defaultValue "info"
78
78
  */
79
- logLevel: "error" | "warn" | "info" | "debug" | "trace" | null;
79
+ logLevel: LogLevel | null;
80
80
  };
81
81
  type ViteResolvedConfig = ResolvedConfig<ViteUserConfig>;
82
82
  type WebpackResolvedConfig = ResolvedConfig<WebpackUserConfig>;
@@ -1,6 +1,6 @@
1
- import { UserConfig } from "../packages/powerlines/src/types/config.mjs";
2
- import { ResolvedConfig } from "../packages/powerlines/src/types/resolved.mjs";
3
- import { PluginContext } from "../packages/powerlines/src/types/context.mjs";
1
+ import { UserConfig } from "../powerlines/src/types/config.mjs";
2
+ import { ResolvedConfig } from "../powerlines/src/types/resolved.mjs";
3
+ import { PluginContext } from "../powerlines/src/types/context.mjs";
4
4
  import { Config } from "@jest/types";
5
5
 
6
6
  //#region src/types/plugin.d.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@powerlines/plugin-jest",
3
- "version": "0.1.205",
3
+ "version": "0.1.207",
4
4
  "type": "module",
5
5
  "description": "A package containing the Jest testing plugin for Powerlines.",
6
6
  "repository": {
@@ -127,13 +127,13 @@
127
127
  "jest-config": "^30.2.0",
128
128
  "jest-resolve": "^30.2.0",
129
129
  "jest-util": "^30.2.0",
130
- "powerlines": "^0.37.71"
130
+ "powerlines": "^0.37.73"
131
131
  },
132
132
  "devDependencies": {
133
133
  "@jest/types": "^30.2.0",
134
- "@powerlines/plugin-plugin": "^0.12.149",
134
+ "@powerlines/plugin-plugin": "^0.12.151",
135
135
  "@types/jest": "^30.0.0"
136
136
  },
137
137
  "publishConfig": { "access": "public" },
138
- "gitHead": "6fd6de6c956acc53f73c34d8b19827d094e604af"
138
+ "gitHead": "df743ef7ebac849eb4ce90899884df4758b61172"
139
139
  }
@@ -1,16 +0,0 @@
1
-
2
- //#region ../../node_modules/.pnpm/@storm-software+config-tools@1.188.80_magicast@0.5.1/node_modules/@storm-software/config-tools/dist/chunk-POXTJ6GF.js
3
- var LogLevelLabel = {
4
- SILENT: "silent",
5
- FATAL: "fatal",
6
- ERROR: "error",
7
- WARN: "warn",
8
- SUCCESS: "success",
9
- INFO: "info",
10
- DEBUG: "debug",
11
- TRACE: "trace",
12
- ALL: "all"
13
- };
14
-
15
- //#endregion
16
- exports.LogLevelLabel = LogLevelLabel;
@@ -1,15 +0,0 @@
1
- //#region ../../node_modules/.pnpm/@storm-software+config-tools@1.188.80_magicast@0.5.1/node_modules/@storm-software/config-tools/dist/chunk-POXTJ6GF.js
2
- var LogLevelLabel = {
3
- SILENT: "silent",
4
- FATAL: "fatal",
5
- ERROR: "error",
6
- WARN: "warn",
7
- SUCCESS: "success",
8
- INFO: "info",
9
- DEBUG: "debug",
10
- TRACE: "trace",
11
- ALL: "all"
12
- };
13
-
14
- //#endregion
15
- export { LogLevelLabel };