@ripple-ts/vite-plugin 0.3.17 → 0.3.18

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,12 @@
1
1
  # @ripple-ts/vite-plugin
2
2
 
3
+ ## 0.3.18
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies []:
8
+ - @ripple-ts/adapter@0.3.18
9
+
3
10
  ## 0.3.17
4
11
 
5
12
  ### Patch Changes
@@ -39,8 +46,8 @@
39
46
  ### Patch Changes
40
47
 
41
48
  - [`6e11177`](https://github.com/Ripple-TS/ripple/commit/6e111778cae4e7d9876e51e293520f0859eb5890)
42
- Thanks [@trueadm](https://github.com/trueadm)! - Add `.rsrx` support across
43
- Ripple tooling and rename the repository's tracked `.ripple` modules to `.rsrx`.
49
+ Thanks [@trueadm](https://github.com/trueadm)! - Add `.tsrx` support across
50
+ Ripple tooling and rename the repository's tracked `.tsrx` modules to `.tsrx`.
44
51
  - Updated dependencies []:
45
52
  - @ripple-ts/adapter@0.3.13
46
53
 
@@ -52,8 +59,7 @@
52
59
  [`cdd31ba`](https://github.com/Ripple-TS/ripple/commit/cdd31ba4c07ce504b01d56533e19a6ba37879f5a)
53
60
  Thanks [@trueadm](https://github.com/trueadm)! - Add first-phase `.tsrx` support
54
61
  across the core Ripple tooling so Vite, Rollup, TypeScript, the language server,
55
- Prettier, ESLint, and editor integrations accept both `.ripple` and `.tsrx`
56
- files.
62
+ Prettier, ESLint, and editor integrations accept both `.tsrx` and `.tsrx` files.
57
63
 
58
64
  - Updated dependencies []:
59
65
  - @ripple-ts/adapter@0.3.12
@@ -108,7 +114,7 @@
108
114
  hash-scoped class names, making all styling disappear until a full dev server
109
115
  restart.
110
116
 
111
- The fix eagerly re-compiles the `.ripple` file in the `hotUpdate` hook to update
117
+ The fix eagerly re-compiles the `.tsrx` file in the `hotUpdate` hook to update
112
118
  the CSS cache, then invalidates and includes the virtual CSS module in the HMR
113
119
  update so the browser receives fresh CSS in sync with the re-rendered component.
114
120
 
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "Vite plugin for Ripple",
4
4
  "license": "MIT",
5
5
  "author": "Dominic Gannaway",
6
- "version": "0.3.17",
6
+ "version": "0.3.18",
7
7
  "type": "module",
8
8
  "module": "src/index.js",
9
9
  "main": "src/index.js",
@@ -32,14 +32,14 @@
32
32
  "url": "https://github.com/Ripple-TS/ripple/issues"
33
33
  },
34
34
  "dependencies": {
35
- "@tsrx/ripple": "0.0.5",
36
- "@ripple-ts/adapter": "0.3.17"
35
+ "@ripple-ts/adapter": "0.3.18",
36
+ "@tsrx/ripple": "0.0.5"
37
37
  },
38
38
  "devDependencies": {
39
39
  "@types/node": "^24.3.0",
40
- "type-fest": "^5.4.4",
40
+ "type-fest": "^5.6.0",
41
41
  "vite": "^8.0.0",
42
- "ripple": "0.3.17"
42
+ "ripple": "0.3.18"
43
43
  },
44
44
  "publishConfig": {
45
45
  "access": "public"
package/src/index.js CHANGED
@@ -40,8 +40,8 @@ const VIRTUAL_HYDRATE_ID = 'virtual:ripple-hydrate';
40
40
  const RESOLVED_VIRTUAL_HYDRATE_ID = '\0virtual:ripple-hydrate';
41
41
  const VIRTUAL_COMPAT_ID = 'virtual:ripple-compat';
42
42
  const RESOLVED_VIRTUAL_COMPAT_ID = '\0virtual:ripple-compat';
43
- const RIPPLE_EXTENSIONS = ['.ripple', '.rsrx', '.tsrx'];
44
- const RIPPLE_EXTENSION_PATTERN = /\.(?:ripple|rsrx|tsrx)$/;
43
+ const RIPPLE_EXTENSIONS = ['.tsrx'];
44
+ const RIPPLE_EXTENSION_PATTERN = /\.tsrx$/;
45
45
 
46
46
  /**
47
47
  * @param {string} file_name
@@ -171,7 +171,7 @@ function createVirtualImportId(filename, root, type) {
171
171
  ? filename.slice(VITE_FS_PREFIX.length) // remove /@fs/ from /@fs/C:/...
172
172
  : filename.slice(VITE_FS_PREFIX.length - 1); // remove /@fs from /@fs/home/user
173
173
  }
174
- // return same virtual id format as vite-plugin-vue eg ...App.ripple?ripple&type=style&lang.css
174
+ // return same virtual id format as vite-plugin-vue eg ...App.tsrx?ripple&type=style&lang.css
175
175
  return `${filename}?${parts.join('&')}`;
176
176
  }
177
177
 
@@ -398,7 +398,7 @@ export function ripple(inlineOptions = {}) {
398
398
  let renderRouteEntries = [];
399
399
  /** @type {ResolvedRippleConfig | null} Cached config from buildStart (reused in closeBundle) */
400
400
  let loadedRippleConfig = null;
401
- /** @type {Set<string>} File paths (relative to root) of .ripple modules with #server blocks */
401
+ /** @type {Set<string>} File paths (relative to root) of .tsrx modules with #server blocks */
402
402
  const serverBlockModules = new Set();
403
403
 
404
404
  /**
@@ -941,7 +941,7 @@ export function ripple(inlineOptions = {}) {
941
941
 
942
942
  // Do NOT add ripple() here — the user's vite.config.ts (loaded automatically
943
943
  // from `root`) already includes it. Adding another instance causes double
944
- // compilation of .ripple files.
944
+ // compilation of .tsrx files.
945
945
  const { build: viteBuild } = await import('vite');
946
946
  try {
947
947
  await viteBuild({
@@ -203,7 +203,7 @@ export async function loadRippleConfig(projectRoot, options = {}) {
203
203
 
204
204
  // Otherwise spin up a temporary Vite server (build / preview).
205
205
  // The temp server only transpiles ripple.config.ts (plain TypeScript) —
206
- // no .ripple compilation plugin is needed.
206
+ // no .tsrx compilation plugin is needed.
207
207
  const { createServer } = await import('vite');
208
208
 
209
209
  const tempVite = await createServer({
@@ -213,7 +213,7 @@ export async function loadRippleConfig(projectRoot, options = {}) {
213
213
  server: { middlewareMode: true },
214
214
  // We don't need to load the ripple plugin for now
215
215
  // but if we start using references to components in router.routes
216
- // then we'll need to add the plugin here to handle the .ripple imports.
216
+ // then we'll need to add the plugin here to handle the .tsrx imports.
217
217
  // But this will cause a circular references warning
218
218
  // that we should resolve when we implement references to components.
219
219
  // plugins: [ripple({ excludeRippleExternalModules: true })],
@@ -33,7 +33,7 @@ export { resolveRippleConfig } from '../load-config.js';
33
33
  RenderResult,
34
34
  HandlerOptions,
35
35
  ClientAssetEntry,
36
- } from '@ripple-ts/vite-plugin/production';
36
+ } from '../../types/production.d.ts';
37
37
  */
38
38
 
39
39
  /**
@@ -21,7 +21,7 @@
21
21
  * @property {Route[]} routes - Route definitions from ripple.config.ts
22
22
  * @property {string} rippleConfigPath - Absolute path to ripple.config.ts (for importing middlewares/adapter)
23
23
  * @property {string} htmlTemplatePath - Path to the processed index.html template
24
- * @property {string[]} [rpcModulePaths] - Paths (relative to root) of .ripple modules with #server blocks
24
+ * @property {string[]} [rpcModulePaths] - Paths (relative to root) of .tsrx modules with #server blocks
25
25
  * @property {Record<string, ClientAssetEntry>} [clientAssetMap] - Map of route entry paths to built JS/CSS asset paths
26
26
  */
27
27
 
@@ -0,0 +1,5 @@
1
+ {
2
+ "extends": "./tsconfig.json",
3
+ "include": ["./src/**/*"],
4
+ "exclude": ["dist", "node_modules"]
5
+ }