@gjsify/rolldown-plugin-pnp 0.4.43 → 0.5.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.
Files changed (2) hide show
  1. package/README.md +38 -0
  2. package/package.json +4 -4
package/README.md ADDED
@@ -0,0 +1,38 @@
1
+ # @gjsify/rolldown-plugin-pnp
2
+
3
+ Rolldown/Rollup/Vite plugin that resolves modules through a Yarn Plug'n'Play (`.pnp.cjs`) manifest, so gjsify builds work correctly inside Yarn PnP projects. Automatically no-ops when no PnP root is found.
4
+
5
+ Part of the [gjsify](https://github.com/gjsify/gjsify) project — Node.js and Web APIs for GJS (GNOME JavaScript).
6
+
7
+ ## Installation
8
+
9
+ ```bash
10
+ gjsify install @gjsify/rolldown-plugin-pnp
11
+ ```
12
+
13
+ ## Usage
14
+
15
+ ```typescript
16
+ import { defineConfig } from 'vite';
17
+ import { pnpPlugin } from '@gjsify/rolldown-plugin-pnp';
18
+
19
+ export default defineConfig({
20
+ plugins: [await pnpPlugin()],
21
+ });
22
+ ```
23
+
24
+ The plugin returns `null` when not running under Yarn PnP, so spreading it is safe in any environment:
25
+
26
+ ```typescript
27
+ import { rolldown } from 'rolldown';
28
+ import { pnpPlugin } from '@gjsify/rolldown-plugin-pnp';
29
+
30
+ const build = await rolldown({
31
+ input: 'src/index.ts',
32
+ plugins: [await pnpPlugin({ issuerUrl: import.meta.url })],
33
+ });
34
+ ```
35
+
36
+ ## License
37
+
38
+ MIT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gjsify/rolldown-plugin-pnp",
3
- "version": "0.4.43",
3
+ "version": "0.5.0",
4
4
  "description": "Yarn PnP resolver plugin for Rolldown / Rollup / Vite",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",
@@ -38,7 +38,7 @@
38
38
  ],
39
39
  "license": "MIT",
40
40
  "peerDependencies": {
41
- "rolldown": "^1.0.3"
41
+ "rolldown": "^1.1.0"
42
42
  },
43
43
  "peerDependenciesMeta": {
44
44
  "rolldown": {
@@ -46,8 +46,8 @@
46
46
  }
47
47
  },
48
48
  "devDependencies": {
49
- "@types/node": "^25.9.1",
50
- "rolldown": "^1.0.3",
49
+ "@types/node": "^25.9.2",
50
+ "rolldown": "^1.1.0",
51
51
  "typescript": "^6.0.3"
52
52
  }
53
53
  }