@granite-js/plugin-core 0.1.23-next.14 → 0.1.23-next.17

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/CHANGELOG.md CHANGED
@@ -1,5 +1,29 @@
1
1
  # @granite-js/plugin-core
2
2
 
3
+ ## 0.1.23-next.17
4
+
5
+ ### Patch Changes
6
+
7
+ - fix
8
+ - Updated dependencies
9
+ - @granite-js/utils@0.1.23-next.17
10
+
11
+ ## 0.1.23-next.16
12
+
13
+ ### Patch Changes
14
+
15
+ - update
16
+ - Updated dependencies
17
+ - @granite-js/utils@0.1.23-next.16
18
+
19
+ ## 0.1.23-next.15
20
+
21
+ ### Patch Changes
22
+
23
+ - fix
24
+ - Updated dependencies
25
+ - @granite-js/utils@0.1.23-next.15
26
+
3
27
  ## 0.1.23-next.14
4
28
 
5
29
  ### Patch Changes
package/dist/index.cjs CHANGED
@@ -260,7 +260,8 @@ async function mergeConfig(base, ...configs) {
260
260
  swc: mergeSwc(resolvedAcc?.swc, resolvedCurr?.swc),
261
261
  devServer: mergeDevServer(resolvedAcc?.devServer, resolvedCurr?.devServer),
262
262
  metro: mergeMetro(resolvedAcc?.metro, resolvedCurr?.metro),
263
- extra: mergeExtra(resolvedAcc?.extra, resolvedCurr?.extra)
263
+ extra: mergeExtra(resolvedAcc?.extra, resolvedCurr?.extra),
264
+ reactNativePath: resolvedCurr.reactNativePath ?? resolvedAcc.reactNativePath
264
265
  };
265
266
  }, resolveDynamicConfig(base));
266
267
  }
@@ -397,7 +398,8 @@ const pluginConfigSchema = zod.object({
397
398
  build: zod.custom().optional(),
398
399
  devServer: zod.custom().optional(),
399
400
  metro: zod.custom().optional(),
400
- plugins: zod.custom()
401
+ plugins: zod.custom(),
402
+ reactNativePath: zod.string().optional()
401
403
  });
402
404
 
403
405
  //#endregion
@@ -427,6 +429,7 @@ const pluginConfigSchema = zod.object({
427
429
  * @param config.metro - Configure Metro bundler settings
428
430
  * @param config.devServer - Configure Mpack dev server settings
429
431
  * @param config.plugins - Granite plugins to enhance functionality
432
+ * @param config.reactNativePath - Path to `react-native` directory (defaults to project's `react-native` package path)
430
433
  * @returns The processed configuration
431
434
  *
432
435
  * @example
@@ -486,7 +489,8 @@ const defineConfig = async (config) => {
486
489
  parsedConfig,
487
490
  globalsScriptConfig,
488
491
  ...configs
489
- ].filter(es_toolkit.isNotNil)
492
+ ].filter(es_toolkit.isNotNil),
493
+ reactNativePath: parsed.reactNativePath
490
494
  };
491
495
  };
492
496
 
package/dist/index.d.cts CHANGED
@@ -74,6 +74,10 @@ interface BuildConfig {
74
74
  * ```
75
75
  */
76
76
  extra?: any;
77
+ /**
78
+ * Path to `react-native` package path
79
+ */
80
+ reactNativePath?: string;
77
81
  }
78
82
  interface ResolverConfig {
79
83
  /**
@@ -607,6 +611,7 @@ declare const pluginConfigSchema: z.ZodObject<{
607
611
  devServer: z.ZodOptional<z.ZodCustom<DevServerConfig, DevServerConfig>>;
608
612
  metro: z.ZodOptional<z.ZodCustom<AdditionalMetroConfig & MetroDevServerConfig, AdditionalMetroConfig & MetroDevServerConfig>>;
609
613
  plugins: z.ZodCustom<PluginInput, PluginInput>;
614
+ reactNativePath: z.ZodOptional<z.ZodString>;
610
615
  }, z.core.$strip>;
611
616
  type GraniteConfig = z.input<typeof pluginConfigSchema>;
612
617
  type ParsedGraniteConfig = z.output<typeof pluginConfigSchema>;
@@ -617,6 +622,7 @@ type CompleteGraniteConfig = {
617
622
  outdir: ParsedGraniteConfig['outdir'];
618
623
  pluginHooks: GranitePluginHooks;
619
624
  pluginConfigs: PluginConfig[];
625
+ reactNativePath?: string;
620
626
  };
621
627
  interface GranitePluginHooks {
622
628
  devServer: {
@@ -679,6 +685,7 @@ declare function resolveConfig(config: CompleteGraniteConfig): Promise<ResolvedP
679
685
  * @param config.metro - Configure Metro bundler settings
680
686
  * @param config.devServer - Configure Mpack dev server settings
681
687
  * @param config.plugins - Granite plugins to enhance functionality
688
+ * @param config.reactNativePath - Path to `react-native` directory (defaults to project's `react-native` package path)
682
689
  * @returns The processed configuration
683
690
  *
684
691
  * @example
package/dist/index.d.ts CHANGED
@@ -74,6 +74,10 @@ interface BuildConfig {
74
74
  * ```
75
75
  */
76
76
  extra?: any;
77
+ /**
78
+ * Path to `react-native` package path
79
+ */
80
+ reactNativePath?: string;
77
81
  }
78
82
  interface ResolverConfig {
79
83
  /**
@@ -607,6 +611,7 @@ declare const pluginConfigSchema: z.ZodObject<{
607
611
  devServer: z.ZodOptional<z.ZodCustom<DevServerConfig, DevServerConfig>>;
608
612
  metro: z.ZodOptional<z.ZodCustom<AdditionalMetroConfig & MetroDevServerConfig, AdditionalMetroConfig & MetroDevServerConfig>>;
609
613
  plugins: z.ZodCustom<PluginInput, PluginInput>;
614
+ reactNativePath: z.ZodOptional<z.ZodString>;
610
615
  }, z.core.$strip>;
611
616
  type GraniteConfig = z.input<typeof pluginConfigSchema>;
612
617
  type ParsedGraniteConfig = z.output<typeof pluginConfigSchema>;
@@ -617,6 +622,7 @@ type CompleteGraniteConfig = {
617
622
  outdir: ParsedGraniteConfig['outdir'];
618
623
  pluginHooks: GranitePluginHooks;
619
624
  pluginConfigs: PluginConfig[];
625
+ reactNativePath?: string;
620
626
  };
621
627
  interface GranitePluginHooks {
622
628
  devServer: {
@@ -679,6 +685,7 @@ declare function resolveConfig(config: CompleteGraniteConfig): Promise<ResolvedP
679
685
  * @param config.metro - Configure Metro bundler settings
680
686
  * @param config.devServer - Configure Mpack dev server settings
681
687
  * @param config.plugins - Granite plugins to enhance functionality
688
+ * @param config.reactNativePath - Path to `react-native` directory (defaults to project's `react-native` package path)
682
689
  * @returns The processed configuration
683
690
  *
684
691
  * @example
package/dist/index.js CHANGED
@@ -237,7 +237,8 @@ async function mergeConfig(base, ...configs) {
237
237
  swc: mergeSwc(resolvedAcc?.swc, resolvedCurr?.swc),
238
238
  devServer: mergeDevServer(resolvedAcc?.devServer, resolvedCurr?.devServer),
239
239
  metro: mergeMetro(resolvedAcc?.metro, resolvedCurr?.metro),
240
- extra: mergeExtra(resolvedAcc?.extra, resolvedCurr?.extra)
240
+ extra: mergeExtra(resolvedAcc?.extra, resolvedCurr?.extra),
241
+ reactNativePath: resolvedCurr.reactNativePath ?? resolvedAcc.reactNativePath
241
242
  };
242
243
  }, resolveDynamicConfig(base));
243
244
  }
@@ -374,7 +375,8 @@ const pluginConfigSchema = z.object({
374
375
  build: z.custom().optional(),
375
376
  devServer: z.custom().optional(),
376
377
  metro: z.custom().optional(),
377
- plugins: z.custom()
378
+ plugins: z.custom(),
379
+ reactNativePath: z.string().optional()
378
380
  });
379
381
 
380
382
  //#endregion
@@ -404,6 +406,7 @@ const pluginConfigSchema = z.object({
404
406
  * @param config.metro - Configure Metro bundler settings
405
407
  * @param config.devServer - Configure Mpack dev server settings
406
408
  * @param config.plugins - Granite plugins to enhance functionality
409
+ * @param config.reactNativePath - Path to `react-native` directory (defaults to project's `react-native` package path)
407
410
  * @returns The processed configuration
408
411
  *
409
412
  * @example
@@ -463,7 +466,8 @@ const defineConfig = async (config) => {
463
466
  parsedConfig,
464
467
  globalsScriptConfig,
465
468
  ...configs
466
- ].filter(isNotNil)
469
+ ].filter(isNotNil),
470
+ reactNativePath: parsed.reactNativePath
467
471
  };
468
472
  };
469
473
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@granite-js/plugin-core",
3
3
  "type": "module",
4
- "version": "0.1.23-next.14",
4
+ "version": "0.1.23-next.17",
5
5
  "description": "The core plugin module for Granite",
6
6
  "scripts": {
7
7
  "prepack": "yarn build",
@@ -35,7 +35,7 @@
35
35
  "vitest": "^3.0.9"
36
36
  },
37
37
  "dependencies": {
38
- "@granite-js/utils": "0.1.23-next.14",
38
+ "@granite-js/utils": "0.1.23-next.17",
39
39
  "@swc/core": "npm:1.5.24",
40
40
  "@types/babel__core": "^7",
41
41
  "@types/connect": "^3",