@powerlines/plugin-react 0.1.90 → 0.1.92

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.
@@ -1,4 +1,3 @@
1
- import "../../../powerlines/src/types/build.mjs";
2
1
  import "../../../powerlines/src/types/context.mjs";
3
2
  import "../../../powerlines/src/types/config.mjs";
4
3
  import "../../../powerlines/src/types/resolved.mjs";
@@ -1,5 +1,3 @@
1
- import "esbuild";
2
-
3
1
  //#region ../powerlines/src/types/build.d.ts
4
2
 
5
3
  type UnpluginBuildVariant = "rollup" | "webpack" | "rspack" | "vite" | "esbuild" | "farm" | "unloader" | "rolldown";
@@ -3,7 +3,6 @@ import { ParsedTypeScriptConfig } from "./tsconfig.cjs";
3
3
  import { InlineConfig, LogFn, UserConfig, WorkspaceConfig } from "./config.cjs";
4
4
  import { EnvironmentResolvedConfig, ResolvedConfig, ResolvedEntryTypeDefinition } from "./resolved.cjs";
5
5
  import { NonUndefined } from "@stryke/types/base";
6
- import { TypeDefinition } from "@stryke/types/configuration";
7
6
  import { EnvPaths } from "@stryke/env/get-env-paths";
8
7
  import { FetchRequestOptions } from "@stryke/http/fetch";
9
8
  import { PackageJson } from "@stryke/types/package-json";
@@ -61,6 +60,9 @@ interface TransformResult$1 {
61
60
  code: string;
62
61
  map: SourceMap | null;
63
62
  }
63
+ /**
64
+ * Options for initializing or updating the context with new configuration values
65
+ */
64
66
  interface InitContextOptions {
65
67
  /**
66
68
  * If false, the plugin will be loaded after all other plugins.
@@ -69,27 +71,28 @@ interface InitContextOptions {
69
71
  */
70
72
  isHighPriority: boolean;
71
73
  }
74
+ /**
75
+ * Options for fetch requests made via the context's {@link Context.fetch} method
76
+ */
72
77
  interface FetchOptions extends FetchRequestOptions {
73
78
  /**
74
79
  * An indicator specifying that the request should bypass any caching
75
80
  */
76
81
  skipCache?: boolean;
77
82
  }
83
+ /**
84
+ * Options for parsing code using [Oxc-Parser](https://github.com/oxc/oxc)
85
+ */
78
86
  interface ParseOptions extends ParserOptions {
79
87
  /**
80
88
  * When true this allows return statements to be outside functions to e.g. support parsing CommonJS code.
81
89
  */
82
90
  allowReturnOutsideFunction?: boolean;
83
91
  }
84
- interface EmitEntryOptions extends WriteOptions {
85
- /**
86
- * The export name of the type definition in the file being emitted
87
- *
88
- * @remarks
89
- * If no value is provided, we will attempt to infer the type definition from the module's `default` export.
90
- */
91
- name?: TypeDefinition["name"];
92
- }
92
+ /**
93
+ * Options for emitting entry virtual files
94
+ */
95
+ type EmitEntryOptions = WriteOptions & Omit<ResolvedEntryTypeDefinition, "file">;
93
96
  /**
94
97
  * The unresolved Powerlines context.
95
98
  *
@@ -5,7 +5,6 @@ import { ParsedTypeScriptConfig } from "./tsconfig.mjs";
5
5
  import { InlineConfig, LogFn, UserConfig, WorkspaceConfig } from "./config.mjs";
6
6
  import { EnvironmentResolvedConfig, ResolvedConfig, ResolvedEntryTypeDefinition } from "./resolved.mjs";
7
7
  import { NonUndefined } from "@stryke/types/base";
8
- import { TypeDefinition } from "@stryke/types/configuration";
9
8
  import { EnvPaths } from "@stryke/env/get-env-paths";
10
9
  import { FetchRequestOptions } from "@stryke/http/fetch";
11
10
  import { PackageJson } from "@stryke/types/package-json";
@@ -63,6 +62,9 @@ interface TransformResult$1 {
63
62
  code: string;
64
63
  map: SourceMap | null;
65
64
  }
65
+ /**
66
+ * Options for initializing or updating the context with new configuration values
67
+ */
66
68
  interface InitContextOptions {
67
69
  /**
68
70
  * If false, the plugin will be loaded after all other plugins.
@@ -71,27 +73,28 @@ interface InitContextOptions {
71
73
  */
72
74
  isHighPriority: boolean;
73
75
  }
76
+ /**
77
+ * Options for fetch requests made via the context's {@link Context.fetch} method
78
+ */
74
79
  interface FetchOptions extends FetchRequestOptions {
75
80
  /**
76
81
  * An indicator specifying that the request should bypass any caching
77
82
  */
78
83
  skipCache?: boolean;
79
84
  }
85
+ /**
86
+ * Options for parsing code using [Oxc-Parser](https://github.com/oxc/oxc)
87
+ */
80
88
  interface ParseOptions extends ParserOptions {
81
89
  /**
82
90
  * When true this allows return statements to be outside functions to e.g. support parsing CommonJS code.
83
91
  */
84
92
  allowReturnOutsideFunction?: boolean;
85
93
  }
86
- interface EmitEntryOptions extends WriteOptions {
87
- /**
88
- * The export name of the type definition in the file being emitted
89
- *
90
- * @remarks
91
- * If no value is provided, we will attempt to infer the type definition from the module's `default` export.
92
- */
93
- name?: TypeDefinition["name"];
94
- }
94
+ /**
95
+ * Options for emitting entry virtual files
96
+ */
97
+ type EmitEntryOptions = WriteOptions & Omit<ResolvedEntryTypeDefinition, "file">;
95
98
  /**
96
99
  * The unresolved Powerlines context.
97
100
  *
@@ -164,7 +164,7 @@ interface VirtualFileMetadata {
164
164
  /**
165
165
  * Additional metadata associated with the file.
166
166
  */
167
- properties: Record<string, string>;
167
+ properties: Record<string, string | undefined>;
168
168
  }
169
169
  interface VirtualFileData {
170
170
  /**
@@ -188,7 +188,7 @@ interface VirtualFileData {
188
188
  /**
189
189
  * Additional metadata associated with the file.
190
190
  */
191
- properties?: Record<string, string>;
191
+ properties?: Record<string, string | undefined>;
192
192
  }
193
193
  interface VirtualFile extends Required<VirtualFileData>, VirtualFileMetadata {
194
194
  /**
@@ -164,7 +164,7 @@ interface VirtualFileMetadata {
164
164
  /**
165
165
  * Additional metadata associated with the file.
166
166
  */
167
- properties: Record<string, string>;
167
+ properties: Record<string, string | undefined>;
168
168
  }
169
169
  interface VirtualFileData {
170
170
  /**
@@ -188,7 +188,7 @@ interface VirtualFileData {
188
188
  /**
189
189
  * Additional metadata associated with the file.
190
190
  */
191
- properties?: Record<string, string>;
191
+ properties?: Record<string, string | undefined>;
192
192
  }
193
193
  interface VirtualFile extends Required<VirtualFileData>, VirtualFileMetadata {
194
194
  /**
@@ -9,7 +9,7 @@ interface ResolvedEntryTypeDefinition extends TypeDefinition {
9
9
  /**
10
10
  * The user provided entry point in the source code
11
11
  */
12
- input: TypeDefinition;
12
+ input?: TypeDefinition;
13
13
  /**
14
14
  * An optional name to use in the package export during the build process
15
15
  */
@@ -1,4 +1,3 @@
1
- import "./build.mjs";
2
1
  import { BabelUserConfig, EnvironmentConfig, InlineConfig, OutputConfig, UserConfig } from "./config.mjs";
3
2
  import { NonUndefined } from "@stryke/types/base";
4
3
  import { AssetGlob } from "@stryke/types/file";
@@ -10,7 +9,7 @@ interface ResolvedEntryTypeDefinition extends TypeDefinition {
10
9
  /**
11
10
  * The user provided entry point in the source code
12
11
  */
13
- input: TypeDefinition;
12
+ input?: TypeDefinition;
14
13
  /**
15
14
  * An optional name to use in the package export during the build process
16
15
  */
@@ -1,4 +1,3 @@
1
- import "./build.mjs";
2
1
  import "./plugin.mjs";
3
2
  import "./context.mjs";
4
3
  import "./config.mjs";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@powerlines/plugin-react",
3
- "version": "0.1.90",
3
+ "version": "0.1.92",
4
4
  "type": "module",
5
5
  "description": "A package containing a Powerlines plugin for building a React application.",
6
6
  "repository": {
@@ -142,18 +142,18 @@
142
142
  "@stryke/fs": "^0.33.26",
143
143
  "@stryke/path": "^0.24.0",
144
144
  "babel-plugin-react-compiler": "^1.0.0",
145
- "@powerlines/alloy": "^0.11.99",
146
- "@powerlines/plugin-babel": "^0.12.99",
147
- "@powerlines/plugin-env": "^0.13.96",
148
- "@powerlines/plugin-plugin": "^0.12.42",
145
+ "@powerlines/alloy": "^0.11.101",
146
+ "@powerlines/plugin-babel": "^0.12.101",
147
+ "@powerlines/plugin-env": "^0.13.98",
148
+ "@powerlines/plugin-plugin": "^0.12.44",
149
149
  "@vitejs/plugin-react": "^5.1.2",
150
150
  "defu": "^6.1.4",
151
- "powerlines": "^0.34.8"
151
+ "powerlines": "^0.35.0"
152
152
  },
153
153
  "devDependencies": {
154
- "@powerlines/nx": "^0.11.21",
154
+ "@powerlines/nx": "^0.11.23",
155
155
  "@types/node": "^24.10.4"
156
156
  },
157
157
  "publishConfig": { "access": "public" },
158
- "gitHead": "a6b7abef7b6414df6df50419b53d0240033ae87a"
158
+ "gitHead": "b2222b4984e94db4850cdeda830206c8f1946395"
159
159
  }