@granite-js/mpack 1.0.1 → 1.0.3

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,25 @@
1
1
  # @granite-js/mpack
2
2
 
3
+ ## 1.0.3
4
+
5
+ ### Patch Changes
6
+
7
+ - 7694332: chore: RN 0.84-rc.5 -> RN 0.84 bump up
8
+ - Updated dependencies [7694332]
9
+ - @granite-js/plugin-core@1.0.3
10
+ - @granite-js/utils@1.0.3
11
+
12
+ ## 1.0.2
13
+
14
+ ### Patch Changes
15
+
16
+ - d4beb3b: expose context to dynamic config plugin
17
+ - b325495: fix(react-native-svg): buffer deps
18
+ - Updated dependencies [d4beb3b]
19
+ - Updated dependencies [b325495]
20
+ - @granite-js/plugin-core@1.0.2
21
+ - @granite-js/utils@1.0.2
22
+
3
23
  ## 1.0.1
4
24
 
5
25
  ### Patch Changes
@@ -1,4 +1,4 @@
1
- import { CompleteGraniteConfig } from '@granite-js/plugin-core';
1
+ import { type CompleteGraniteConfig } from '@granite-js/plugin-core';
2
2
  interface RunServerArgs {
3
3
  config: CompleteGraniteConfig;
4
4
  host?: string;
@@ -48,7 +48,8 @@ async function EXPERIMENTAL__server({
48
48
  const driver = (0, import_plugin_core.createPluginHooksDriver)(config);
49
49
  await driver.devServer.pre({ host, port });
50
50
  const rootDir = config.cwd;
51
- const { metro: _, devServer, ...buildConfig } = await (0, import_plugin_core.resolveConfig)(config) ?? {};
51
+ const context = { command: "serve" };
52
+ const { metro: _, devServer, ...buildConfig } = await (0, import_plugin_core.resolveConfig)(config, context) ?? {};
52
53
  const server = new import_DevServer.DevServer({
53
54
  buildConfig: { entry: config.entryFile, ...buildConfig },
54
55
  middlewares: devServer?.middlewares ?? [],
@@ -1,4 +1,4 @@
1
- import { BuildResult, type CompleteGraniteConfig } from '@granite-js/plugin-core';
1
+ import { type BuildResult, type CompleteGraniteConfig } from '@granite-js/plugin-core';
2
2
  interface CommonMetroBuildOptions {
3
3
  outfile?: string;
4
4
  dev?: boolean;
@@ -67,7 +67,8 @@ async function buildAll(optionsList, { config, concurrency = 2 }) {
67
67
  return buildResults;
68
68
  }
69
69
  async function buildImpl(config, { platform, outfile, minify = false, dev = true }) {
70
- const resolvedConfig = await (0, import_plugin_core.resolveConfig)(config);
70
+ const context = { command: "build" };
71
+ const resolvedConfig = await (0, import_plugin_core.resolveConfig)(config, context);
71
72
  const metroConfig = await (0, import_getMetroConfig.getMetroConfig)({ rootPath: config.cwd }, resolvedConfig?.metro ?? {});
72
73
  const outfileName = outfile == null ? (0, import_getDefaultOutfileName.getDefaultOutfileName)(config.entryFile, platform) : outfile;
73
74
  const outfilePath = import_path.default.join(config.outdir, outfileName);
@@ -75,7 +75,8 @@ async function buildAll(optionsList, { config, plugins = [], concurrency = 2 })
75
75
  return buildResults;
76
76
  }
77
77
  async function buildImpl(config, plugins, { platform, outfile, cache = true, dev = true, metafile = false }) {
78
- const { metro: _metroConfig, devServer: _devServerConfig, ...buildConfig } = await (0, import_plugin_core.resolveConfig)(config);
78
+ const context = { command: "build" };
79
+ const { metro: _metroConfig, devServer: _devServerConfig, ...buildConfig } = await (0, import_plugin_core.resolveConfig)(config, context);
79
80
  const outfileName = outfile == null ? (0, import_getDefaultOutfileName.getDefaultOutfileName)(config.entryFile, platform) : outfile;
80
81
  const outfilePath = path.resolve(config.outdir, outfileName);
81
82
  const bundler = new import_bundler.Bundler({
@@ -59,7 +59,8 @@ async function runServer({
59
59
  const driver = (0, import_plugin_core.createPluginHooksDriver)(config);
60
60
  const terminal = new Terminal(process.stdout);
61
61
  const terminalReporter = new TerminalReporter(terminal);
62
- const resolvedConfig = await (0, import_plugin_core.resolveConfig)(config);
62
+ const context = { command: "serve" };
63
+ const resolvedConfig = await (0, import_plugin_core.resolveConfig)(config, context);
63
64
  const { middlewares = [], inspectorProxy, ...additionalMetroConfig } = resolvedConfig?.metro ?? {};
64
65
  const baseConfig = await (0, import_getMetroConfig.getMetroConfig)({ rootPath: config.cwd }, additionalMetroConfig);
65
66
  const metroConfig = mergeConfig(baseConfig, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@granite-js/mpack",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
4
4
  "description": "A bundler for Granite apps",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -92,14 +92,14 @@
92
92
  "@babel/traverse": "7.28.5",
93
93
  "@babel/types": "7.28.5",
94
94
  "@fastify/middie": "8.3.0",
95
- "@granite-js/plugin-core": "1.0.1",
96
- "@granite-js/utils": "1.0.1",
95
+ "@granite-js/plugin-core": "1.0.3",
96
+ "@granite-js/utils": "1.0.3",
97
97
  "@react-native-community/cli-plugin-metro": "11.3.7",
98
98
  "@react-native-community/cli-server-api": "11.3.7",
99
99
  "@react-native-community/cli-tools": "11.3.7",
100
- "@react-native/babel-plugin-codegen": "0.84.0-rc.5",
101
- "@react-native/babel-preset": "0.84.0-rc.5",
102
- "@react-native/dev-middleware": "0.84.0-rc.5",
100
+ "@react-native/babel-plugin-codegen": "0.84.0",
101
+ "@react-native/babel-preset": "0.84.0",
102
+ "@react-native/dev-middleware": "0.84.0",
103
103
  "@shopify/semaphore": "^3.1.0",
104
104
  "@swc/core": "1.15.8",
105
105
  "@swc/helpers": "0.5.17",