@octanejs/vite-plugin 0.1.48 → 0.1.50

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@octanejs/vite-plugin",
3
- "version": "0.1.48",
3
+ "version": "0.1.50",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "engines": {
@@ -47,17 +47,17 @@
47
47
  },
48
48
  "dependencies": {
49
49
  "@ripple-ts/adapter": "^0.3.125",
50
- "@octanejs/app-core": "0.0.44"
50
+ "@octanejs/app-core": "0.0.46"
51
51
  },
52
52
  "peerDependencies": {
53
53
  "vite": "^8.0.16",
54
- "octane": "0.1.48"
54
+ "octane": "0.1.50"
55
55
  },
56
56
  "devDependencies": {
57
57
  "@types/node": "^24.13.3",
58
58
  "playwright": "^1.61.1",
59
59
  "type-fest": "^5.8.0",
60
60
  "vite": "^8.1.5",
61
- "octane": "0.1.48"
61
+ "octane": "0.1.50"
62
62
  }
63
63
  }
package/src/index.js CHANGED
@@ -221,7 +221,7 @@ function collect_hydrate_module_paths(config) {
221
221
  * it). An explicit `profile` (true or false) always takes precedence over
222
222
  * `devtools`.
223
223
  *
224
- * @param {{ hmr?: boolean, profile?: boolean, devtools?: boolean, strong?: boolean, exclude?: string[], requireDirective?: boolean, renderers?: import('@octanejs/app-core').ExperimentalRendererConfigOptions, cssModuleConstants?: import('octane/compiler/vite').OctaneVitePluginOptions['cssModuleConstants'] }} [inlineOptions]
224
+ * @param {{ hmr?: boolean, profile?: boolean, devtools?: boolean, strong?: boolean, nativeReads?: boolean, exclude?: string[], requireDirective?: boolean, renderers?: import('@octanejs/app-core').ExperimentalRendererConfigOptions, cssModuleConstants?: import('octane/compiler/vite').OctaneVitePluginOptions['cssModuleConstants'] }} [inlineOptions]
225
225
  * @returns {Plugin[]}
226
226
  */
227
227
  export function octane(inlineOptions = {}) {
@@ -881,6 +881,7 @@ export function octane(inlineOptions = {}) {
881
881
  * hmr?: boolean,
882
882
  * profile?: boolean | 'auto',
883
883
  * strong?: boolean,
884
+ * nativeReads?: boolean,
884
885
  * exclude?: string[],
885
886
  * requireDirective?: boolean,
886
887
  * renderers?: import('@octanejs/app-core').ExperimentalRendererConfigOptions,
@@ -894,6 +895,8 @@ export function octane(inlineOptions = {}) {
894
895
  if (inlineOptions.profile !== undefined) compilerOptions.profile = inlineOptions.profile;
895
896
  else if (inlineOptions.devtools === true) compilerOptions.profile = 'auto';
896
897
  if (inlineOptions.strong !== undefined) compilerOptions.strong = inlineOptions.strong;
898
+ if (inlineOptions.nativeReads !== undefined)
899
+ compilerOptions.nativeReads = inlineOptions.nativeReads;
897
900
  if (inlineOptions.exclude !== undefined) compilerOptions.exclude = inlineOptions.exclude;
898
901
  if (inlineOptions.requireDirective !== undefined) {
899
902
  compilerOptions.requireDirective = inlineOptions.requireDirective;
@@ -909,7 +912,11 @@ export function octane(inlineOptions = {}) {
909
912
  const projectRoot = userConfig.root ? path.resolve(userConfig.root) : process.cwd();
910
913
  // Both inline compiler options override app config independently. Preserve
911
914
  // the synchronous path when neither needs to read octane.config.ts.
912
- if (inlineOptions.renderers !== undefined && inlineOptions.strong !== undefined) {
915
+ if (
916
+ inlineOptions.renderers !== undefined &&
917
+ inlineOptions.strong !== undefined &&
918
+ inlineOptions.nativeReads !== undefined
919
+ ) {
913
920
  compilerConfigWatchFiles.clear();
914
921
  return compilerConfigHook.call(this, userConfig, env);
915
922
  }
@@ -918,6 +925,7 @@ export function octane(inlineOptions = {}) {
918
925
  if (!octaneConfigExists(projectRoot)) {
919
926
  if (inlineOptions.renderers === undefined) delete compilerOptions.renderers;
920
927
  if (inlineOptions.strong === undefined) delete compilerOptions.strong;
928
+ if (inlineOptions.nativeReads === undefined) delete compilerOptions.nativeReads;
921
929
  compilerConfigWatchFiles.clear();
922
930
  // A new app config can introduce Strong mode or renderer rules.
923
931
  compilerConfigWatchFiles.add(path.resolve(configPath));
@@ -932,6 +940,9 @@ export function octane(inlineOptions = {}) {
932
940
  if (inlineOptions.strong === undefined) {
933
941
  compilerOptions.strong = config.config.compiler.strong;
934
942
  }
943
+ if (inlineOptions.nativeReads === undefined) {
944
+ compilerOptions.nativeReads = config.config.compiler.nativeReads;
945
+ }
935
946
  compilerConfigWatchFiles.clear();
936
947
  for (const file of [...config.dependencies, ...config.missingDependencies]) {
937
948
  compilerConfigWatchFiles.add(path.resolve(file));
package/types/index.d.ts CHANGED
@@ -17,6 +17,8 @@ export interface OctanePluginOptions {
17
17
  profile?: boolean;
18
18
  /** Assert Strong mode's pure immutable-snapshot render contract for app code. */
19
19
  strong?: boolean;
20
+ /** Experimental native signal reads in DOM client/server render scopes. */
21
+ nativeReads?: boolean;
20
22
  /**
21
23
  * Path fragments the compiler's plain `.ts`/`.js` hook-slotting pass must
22
24
  * skip. Prefer package manifest `octane.hookSlots.manual` declarations.