@pitlane/dev 0.5.0 → 0.6.0
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 +41 -0
- package/README.md +12 -12
- package/dist/index.d.mts +3 -1
- package/dist/index.mjs +12 -11
- package/package.json +61 -63
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,46 @@
|
|
|
1
1
|
# @pitlane/dev
|
|
2
2
|
|
|
3
|
+
## 0.6.0
|
|
4
|
+
|
|
5
|
+
Target Remix `3.0.0-rc.1`.
|
|
6
|
+
|
|
7
|
+
- Raised the `remix` peer dependency to `^3.0.0-rc.1` (from
|
|
8
|
+
`^3.0.0-beta.10`). The plugin itself is unchanged: `remix()`, its
|
|
9
|
+
`prerender` option, and `@pitlane/dev/runtime` all behave as they did in
|
|
10
|
+
0.5.1.
|
|
11
|
+
- Now depends on `@pitlane/crawler@^0.2.0`, its Remix rc.1 release. The
|
|
12
|
+
manifest carries `workspace:^` and the release workflow packs with pnpm,
|
|
13
|
+
which rewrites it to the version the monorepo resolved. 0.5.1 shipped
|
|
14
|
+
`^0.1.0`, which `0.2.0` does not satisfy, so the crawler release only reaches
|
|
15
|
+
`remix({ prerender })` users through this bump.
|
|
16
|
+
- Two rc.1 breaking changes land in the app code this plugin's guides
|
|
17
|
+
document, not in the plugin. The documented `app/entry.browser.ts` reads the
|
|
18
|
+
frame-targeting attributes off a submit button, and rc.1 renamed all of them
|
|
19
|
+
into the `data-rmx-*` namespace, so `rmx-target`, `rmx-src`, and
|
|
20
|
+
`rmx-reset-scroll` become `data-rmx-target`, `data-rmx-src`, and
|
|
21
|
+
`data-rmx-reset-scroll`. Nothing raises an error when they are missed: rc.1's
|
|
22
|
+
runtime matches only the prefixed names, so a stale attribute is inert and
|
|
23
|
+
frame navigation silently falls back to a document load. `createAssetServer`
|
|
24
|
+
also replaced `fileMap` with directory-based `mounts`, which affects an app
|
|
25
|
+
that configures its own asset server rather than letting this plugin do it.
|
|
26
|
+
- Tested against Vite 8.1 (Rolldown), Vite+ 0.2 (`vp`), and
|
|
27
|
+
`remix@3.0.0-rc.1`, across the node, cloudflare, hmr, and prerender fixtures.
|
|
28
|
+
|
|
29
|
+
## 0.5.1
|
|
30
|
+
|
|
31
|
+
Fixes an unusable 0.5.0 on npm.
|
|
32
|
+
|
|
33
|
+
- 0.5.0 was published with `"@pitlane/crawler": "workspace:^"` in its
|
|
34
|
+
dependencies, so every install failed with `EUNSUPPORTEDPROTOCOL` on npm and
|
|
35
|
+
`ERR_PNPM_WORKSPACE_PKG_NOT_FOUND` on pnpm. The release workflow packed with
|
|
36
|
+
`npm publish`, which has no idea what pnpm's `workspace:` protocol means and
|
|
37
|
+
ships it verbatim. It now packs with pnpm, which rewrites the range to the
|
|
38
|
+
version it resolved to, and fails the job if any `workspace:` specifier
|
|
39
|
+
survives into the tarball. Nothing about the code changed; 0.5.0 is
|
|
40
|
+
deprecated and this is the same release with a manifest that installs.
|
|
41
|
+
- Latent until now: `@pitlane/crawler` is the first workspace dependency any
|
|
42
|
+
published Pitlane package has had.
|
|
43
|
+
|
|
3
44
|
## 0.5.0
|
|
4
45
|
|
|
5
46
|
Build-time prerendering.
|
package/README.md
CHANGED
|
@@ -12,7 +12,7 @@ npm install --save-dev @pitlane/dev
|
|
|
12
12
|
vp add -D @pitlane/dev
|
|
13
13
|
```
|
|
14
14
|
|
|
15
|
-
Requires `remix@^3.0.0-
|
|
15
|
+
Requires `remix@^3.0.0-rc.1` and `vite@>=7` as peers. Tested against **Vite 8.1** (Rolldown), **Vite+ 0.2** (`vp`), and `remix@3.0.0-rc.1` — the [templates](https://github.com/pitlane-tools/templates) are the continuously tested reference.
|
|
16
16
|
|
|
17
17
|
## Quick start
|
|
18
18
|
|
|
@@ -123,14 +123,14 @@ remix({
|
|
|
123
123
|
});
|
|
124
124
|
```
|
|
125
125
|
|
|
126
|
-
| Option | Type | Default | Purpose
|
|
127
|
-
| -------------------- | ---------------------------------- | --------------------- |
|
|
128
|
-
| `server` | `boolean` | `true` | Whether the app has a server. Pass `false` for [SPA mode](#spa-mode), which ignores every option below.
|
|
129
|
-
| `prerender` | `boolean \| string[] \| fn \| obj` | none | Render paths to static HTML at build time. See [Prerendering](#prerendering).
|
|
130
|
-
| `clientEntry` | `string \| false` | `"app/entry.browser"` | Client entry module. Pass `false` for fully server-rendered apps with no hydration.
|
|
131
|
-
| `serverEntry` | `string` | `"app/entry.server"` | Server entry module, built as `dist/ssr/index.js`.
|
|
132
|
-
| `serverEnvironments` | `string[]` | `["ssr"]` | Environment names the `clientEntry()` transform treats as "server".
|
|
133
|
-
| `serverHandler` | `boolean` | `true` | Serve dev requests through your server entry. Set `false` when `@cloudflare/vite-plugin
|
|
126
|
+
| Option | Type | Default | Purpose |
|
|
127
|
+
| -------------------- | ---------------------------------- | --------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
128
|
+
| `server` | `boolean` | `true` | Whether the app has a server. Pass `false` for [SPA mode](#spa-mode), which ignores every option below. |
|
|
129
|
+
| `prerender` | `boolean \| string[] \| fn \| obj` | none | Render paths to static HTML at build time. See [Prerendering](#prerendering). |
|
|
130
|
+
| `clientEntry` | `string \| false` | `"app/entry.browser"` | Client entry module. Pass `false` for fully server-rendered apps with no hydration. |
|
|
131
|
+
| `serverEntry` | `string` | `"app/entry.server"` | Server entry module, built as `dist/ssr/index.js`. |
|
|
132
|
+
| `serverEnvironments` | `string[]` | `["ssr"]` | Environment names the `clientEntry()` transform treats as "server". |
|
|
133
|
+
| `serverHandler` | `boolean` | `true` | Serve dev requests through your server entry. Set `false` when `@cloudflare/vite-plugin` or `nitro/vite` owns dev-time request handling. Netlify's plugin does not serve SSR, so keep the default there. |
|
|
134
134
|
|
|
135
135
|
## Prerendering
|
|
136
136
|
|
|
@@ -429,10 +429,10 @@ dist/
|
|
|
429
429
|
| ----------- | -------------- |
|
|
430
430
|
| `vite` | 8.1.5 |
|
|
431
431
|
| `vite-plus` | 0.2.6 |
|
|
432
|
-
| `remix` | 3.0.0-
|
|
433
|
-
| Node | 24 LTS,
|
|
432
|
+
| `remix` | 3.0.0-rc.1 |
|
|
433
|
+
| Node | 24 LTS, 26 |
|
|
434
434
|
|
|
435
|
-
Remix 3 is in
|
|
435
|
+
Remix 3 is in prerelease; each `@pitlane/dev` release records the exact prerelease it was verified against. Rolldown is not required — the transform runs identically on generic Vite and Vite+.
|
|
436
436
|
|
|
437
437
|
### Troubleshooting
|
|
438
438
|
|
package/dist/index.d.mts
CHANGED
|
@@ -94,7 +94,9 @@ interface RemixPluginOptions {
|
|
|
94
94
|
/**
|
|
95
95
|
* Serve dev-server requests through the server entry's fetch handler.
|
|
96
96
|
* Set to `false` when another plugin owns dev-time request handling —
|
|
97
|
-
*
|
|
97
|
+
* `@cloudflare/vite-plugin` (workerd) or `nitro/vite`. Keep the default
|
|
98
|
+
* with `@netlify/vite-plugin`, which emulates platform primitives around
|
|
99
|
+
* the dev server but leaves SSR to the app's fetch handler.
|
|
98
100
|
*
|
|
99
101
|
* Ignored when `server` is `false`, which has no fetch handler.
|
|
100
102
|
*
|
package/dist/index.mjs
CHANGED
|
@@ -635,8 +635,8 @@ const SERVER_UPDATE_SETTLE_MS = 50;
|
|
|
635
635
|
* preserving live component state.
|
|
636
636
|
*
|
|
637
637
|
* `ui-hmr` only recognizes named-function component forms, so arrow-form
|
|
638
|
-
* exports (`export
|
|
639
|
-
* `export
|
|
638
|
+
* exports (`export let Name = clientEntry(url, (handle) => …)` and
|
|
639
|
+
* `export let Name = (handle) => …`) are first normalized to named function
|
|
640
640
|
* expressions — the idiomatic Remix authoring style then hot-swaps without any
|
|
641
641
|
* source changes. The normalization is discarded when `ui-hmr` does not
|
|
642
642
|
* instrument the module, so non-component arrows are never rewritten.
|
|
@@ -724,11 +724,11 @@ function serverDataHmr(serverEnvironments) {
|
|
|
724
724
|
*
|
|
725
725
|
* Handles the two idiomatic Remix arrow forms:
|
|
726
726
|
*
|
|
727
|
-
* - `export
|
|
728
|
-
* - `export
|
|
727
|
+
* - `export let Name = clientEntry(url, (handle) => …)`
|
|
728
|
+
* - `export let Name = (handle) => () => <jsx/>`
|
|
729
729
|
*
|
|
730
|
-
* Both become `export
|
|
731
|
-
* / `export
|
|
730
|
+
* Both become `export let Name = clientEntry(url, function Name(handle) { … })`
|
|
731
|
+
* / `export let Name = function Name(handle) { … }`, which is behavior-
|
|
732
732
|
* identical for component setup functions (they never rely on a lexical `this`
|
|
733
733
|
* or `arguments`).
|
|
734
734
|
*/
|
|
@@ -825,7 +825,7 @@ function preview$1() {
|
|
|
825
825
|
//#region src/transform.ts
|
|
826
826
|
const CLIENT_ENTRY_PATTERN = /\bclientEntry\b/;
|
|
827
827
|
/**
|
|
828
|
-
* Rewrites `export
|
|
828
|
+
* Rewrites `export let Name = clientEntry(import.meta.url, …)` so the first
|
|
829
829
|
* argument resolves to a production asset URL carrying an `#ExportName`
|
|
830
830
|
* fragment.
|
|
831
831
|
*
|
|
@@ -866,10 +866,11 @@ function clientEntryTransform(serverEnvironments) {
|
|
|
866
866
|
};
|
|
867
867
|
}
|
|
868
868
|
/**
|
|
869
|
-
* Matches exactly `export
|
|
870
|
-
* top level, with at least two arguments.
|
|
871
|
-
*
|
|
872
|
-
*
|
|
869
|
+
* Matches exactly `export let Name = clientEntry(import.meta.url, …)` at the
|
|
870
|
+
* top level, with at least two arguments. Any declaration kind (`let`, `const`,
|
|
871
|
+
* `var`) qualifies; the export name is what matters. Default exports, aliased
|
|
872
|
+
* callees, and non-exported calls are intentionally ignored — the `#Name`
|
|
873
|
+
* fragment requires a named export.
|
|
873
874
|
*/
|
|
874
875
|
function findClientEntryCalls(program) {
|
|
875
876
|
let results = [];
|
package/package.json
CHANGED
|
@@ -1,67 +1,65 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
2
|
+
"name": "@pitlane/dev",
|
|
3
|
+
"version": "0.6.0",
|
|
4
|
+
"description": "remix() — the Remix 3 Vite plugin: build orchestration, clientEntry() hydration transform, dev server with component and server-data HMR, SPA mode, build-time prerendering, and preview for any Vite or Vite+ project.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"pitlane",
|
|
7
|
+
"remix",
|
|
8
|
+
"vite",
|
|
9
|
+
"vite-plugin"
|
|
10
|
+
],
|
|
11
|
+
"homepage": "https://pitlane.tools/package/dev/",
|
|
12
|
+
"bugs": {
|
|
13
|
+
"url": "https://github.com/pitlane-tools/pitlane/issues"
|
|
14
|
+
},
|
|
15
|
+
"license": "MIT",
|
|
16
|
+
"author": "Mark Malstrom <mark@malstrom.me>",
|
|
17
|
+
"repository": {
|
|
18
|
+
"type": "git",
|
|
19
|
+
"url": "git+https://github.com/pitlane-tools/pitlane.git",
|
|
20
|
+
"directory": "packages/dev"
|
|
21
|
+
},
|
|
22
|
+
"files": [
|
|
23
|
+
"dist",
|
|
24
|
+
"CHANGELOG.md"
|
|
25
|
+
],
|
|
26
|
+
"type": "module",
|
|
27
|
+
"types": "./dist/index.d.mts",
|
|
28
|
+
"exports": {
|
|
29
|
+
".": {
|
|
30
|
+
"types": "./dist/index.d.mts",
|
|
31
|
+
"import": "./dist/index.mjs"
|
|
14
32
|
},
|
|
15
|
-
"
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
"type": "git",
|
|
19
|
-
"url": "git+https://github.com/pitlane-tools/pitlane.git",
|
|
20
|
-
"directory": "packages/dev"
|
|
33
|
+
"./runtime": {
|
|
34
|
+
"types": "./dist/runtime.d.mts",
|
|
35
|
+
"import": "./dist/runtime.mjs"
|
|
21
36
|
},
|
|
22
|
-
"
|
|
23
|
-
|
|
24
|
-
"CHANGELOG.md"
|
|
25
|
-
],
|
|
26
|
-
"type": "module",
|
|
27
|
-
"types": "./dist/index.d.mts",
|
|
28
|
-
"exports": {
|
|
29
|
-
".": {
|
|
30
|
-
"types": "./dist/index.d.mts",
|
|
31
|
-
"import": "./dist/index.mjs"
|
|
32
|
-
},
|
|
33
|
-
"./runtime": {
|
|
34
|
-
"types": "./dist/runtime.d.mts",
|
|
35
|
-
"import": "./dist/runtime.mjs"
|
|
36
|
-
},
|
|
37
|
-
"./assets": {
|
|
38
|
-
"types": "./dist/assets.d.mts"
|
|
39
|
-
}
|
|
40
|
-
},
|
|
41
|
-
"scripts": {
|
|
42
|
-
"prepublishOnly": "vp run build"
|
|
43
|
-
},
|
|
44
|
-
"dependencies": {
|
|
45
|
-
"@hiogawa/vite-plugin-fullstack": "0.0.11",
|
|
46
|
-
"@pitlane/crawler": "workspace:^",
|
|
47
|
-
"magic-string": "^0.30.21",
|
|
48
|
-
"oxc-parser": "^0.141.0"
|
|
49
|
-
},
|
|
50
|
-
"devDependencies": {
|
|
51
|
-
"@cloudflare/vite-plugin": "^1.31.0",
|
|
52
|
-
"@types/node": "^25.5.0",
|
|
53
|
-
"playwright": "1.61.1",
|
|
54
|
-
"remix": "3.0.0-beta.10",
|
|
55
|
-
"typescript": "^7.0.2",
|
|
56
|
-
"vite": "^8.1.5",
|
|
57
|
-
"vite-plus": "^0.2.6",
|
|
58
|
-
"wrangler": "^4.114.0"
|
|
59
|
-
},
|
|
60
|
-
"peerDependencies": {
|
|
61
|
-
"remix": "^3.0.0-beta.10",
|
|
62
|
-
"vite": ">=7.0.0"
|
|
63
|
-
},
|
|
64
|
-
"engines": {
|
|
65
|
-
"node": "^20.19.0 || >=22.12.0"
|
|
37
|
+
"./assets": {
|
|
38
|
+
"types": "./dist/assets.d.mts"
|
|
66
39
|
}
|
|
67
|
-
}
|
|
40
|
+
},
|
|
41
|
+
"dependencies": {
|
|
42
|
+
"@hiogawa/vite-plugin-fullstack": "0.0.11",
|
|
43
|
+
"magic-string": "^0.30.21",
|
|
44
|
+
"oxc-parser": "^0.141.0",
|
|
45
|
+
"@pitlane/crawler": "^0.2.0"
|
|
46
|
+
},
|
|
47
|
+
"devDependencies": {
|
|
48
|
+
"@cloudflare/vite-plugin": "^1.31.0",
|
|
49
|
+
"@types/node": "^25.5.0",
|
|
50
|
+
"playwright": "1.61.1",
|
|
51
|
+
"remix": "3.0.0-rc.1",
|
|
52
|
+
"typescript": "^7.0.2",
|
|
53
|
+
"vite": "^8.1.5",
|
|
54
|
+
"vite-plus": "^0.2.6",
|
|
55
|
+
"wrangler": "^4.114.0"
|
|
56
|
+
},
|
|
57
|
+
"peerDependencies": {
|
|
58
|
+
"remix": "^3.0.0-rc.1",
|
|
59
|
+
"vite": ">=7.0.0"
|
|
60
|
+
},
|
|
61
|
+
"engines": {
|
|
62
|
+
"node": "^20.19.0 || >=22.12.0"
|
|
63
|
+
},
|
|
64
|
+
"scripts": {}
|
|
65
|
+
}
|