unplugin-relay 0.1.1 → 0.1.2

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Patryk Wałach
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -9,7 +9,6 @@
9
9
  npm i unplugin-relay
10
10
  ```
11
11
 
12
-
13
12
  <details>
14
13
  <summary>Vite</summary><br>
15
14
 
@@ -20,11 +19,13 @@ import relayConfig from "./relay.config.json" with { type: "json" };
20
19
  import path from "path";
21
20
 
22
21
  export default defineConfig({
23
- plugins: [relay({
24
- language: relayConfig.language,
25
- eagerEsModules: relayConfig.eagerEsModules,
26
- artifactDirectory: path.resolve(relayConfig.artifactDirectory),
27
- })],
22
+ plugins: [
23
+ relay({
24
+ language: relayConfig.language,
25
+ eagerEsModules: relayConfig.eagerEsModules,
26
+ artifactDirectory: path.resolve(relayConfig.artifactDirectory),
27
+ }),
28
+ ],
28
29
  });
29
30
  ```
30
31
 
@@ -42,11 +43,13 @@ import relayConfig from "./relay.config.json" with { type: "json" };
42
43
  import path from "path";
43
44
 
44
45
  export default {
45
- plugins: [relay({
46
- language: relayConfig.language,
47
- eagerEsModules: relayConfig.eagerEsModules,
48
- artifactDirectory: path.resolve(relayConfig.artifactDirectory),
49
- })],
46
+ plugins: [
47
+ relay({
48
+ language: relayConfig.language,
49
+ eagerEsModules: relayConfig.eagerEsModules,
50
+ artifactDirectory: path.resolve(relayConfig.artifactDirectory),
51
+ }),
52
+ ],
50
53
  };
51
54
  ```
52
55
 
@@ -62,11 +65,13 @@ import relayConfig from "./relay.config.json" with { type: "json" };
62
65
  import path from "path";
63
66
 
64
67
  export default {
65
- plugins: [relay({
66
- language: relayConfig.language,
67
- eagerEsModules: relayConfig.eagerEsModules,
68
- artifactDirectory: path.resolve(relayConfig.artifactDirectory),
69
- })],
68
+ plugins: [
69
+ relay({
70
+ language: relayConfig.language,
71
+ eagerEsModules: relayConfig.eagerEsModules,
72
+ artifactDirectory: path.resolve(relayConfig.artifactDirectory),
73
+ }),
74
+ ],
70
75
  };
71
76
  ```
72
77
 
@@ -79,11 +84,13 @@ export default {
79
84
  // webpack.config.js
80
85
  module.exports = {
81
86
  /* ... */
82
- plugins: [require("unplugin-relay/webpack")({
83
- language: relayConfig.language,
84
- eagerEsModules: relayConfig.eagerEsModules,
85
- artifactDirectory: path.resolve(relayConfig.artifactDirectory),
86
- })],
87
+ plugins: [
88
+ require("unplugin-relay/webpack")({
89
+ language: relayConfig.language,
90
+ eagerEsModules: relayConfig.eagerEsModules,
91
+ artifactDirectory: path.resolve(relayConfig.artifactDirectory),
92
+ }),
93
+ ],
87
94
  };
88
95
  ```
89
96
 
@@ -94,12 +101,20 @@ module.exports = {
94
101
 
95
102
  ```ts
96
103
  // nuxt.config.js
104
+ import relayConfig from "./relay.config.json" with { type: "json" };
105
+ import path from "path";
106
+
97
107
  export default defineNuxtConfig({
98
- modules: [["unplugin-relay/nuxt", {
99
- language: relayConfig.language,
100
- eagerEsModules: relayConfig.eagerEsModules,
101
- artifactDirectory: path.resolve(relayConfig.artifactDirectory),
102
- }]],
108
+ modules: [
109
+ [
110
+ "unplugin-relay/nuxt",
111
+ {
112
+ language: relayConfig.language,
113
+ eagerEsModules: relayConfig.eagerEsModules,
114
+ artifactDirectory: path.resolve(relayConfig.artifactDirectory),
115
+ },
116
+ ],
117
+ ],
103
118
  });
104
119
  ```
105
120
 
@@ -112,13 +127,18 @@ export default defineNuxtConfig({
112
127
 
113
128
  ```ts
114
129
  // vue.config.js
130
+ const relayConfig = require("./relay.config.json");
131
+ const path = require("path");
132
+
115
133
  module.exports = {
116
134
  configureWebpack: {
117
- plugins: [require("unplugin-relay/webpack")({
118
- language: relayConfig.language,
119
- eagerEsModules: relayConfig.eagerEsModules,
120
- artifactDirectory: path.resolve(relayConfig.artifactDirectory),
121
- })],
135
+ plugins: [
136
+ require("unplugin-relay/webpack")({
137
+ language: relayConfig.language,
138
+ eagerEsModules: relayConfig.eagerEsModules,
139
+ artifactDirectory: path.resolve(relayConfig.artifactDirectory),
140
+ }),
141
+ ],
122
142
  },
123
143
  };
124
144
  ```
@@ -136,7 +156,13 @@ import relayConfig from "./relay.config.json" with { type: "json" };
136
156
  import path from "path";
137
157
 
138
158
  build({
139
- plugins: [relay()],
159
+ plugins: [
160
+ relay({
161
+ language: relayConfig.language,
162
+ eagerEsModules: relayConfig.eagerEsModules,
163
+ artifactDirectory: path.resolve(relayConfig.artifactDirectory),
164
+ }),
165
+ ],
140
166
  });
141
167
  ```
142
168
 
@@ -1,4 +1,4 @@
1
1
  //#region src/esbuild.d.ts
2
- declare const _default: (options?: unknown) => import("esbuild").Plugin;
2
+ declare const _default: (options?: import("oxc-transform-relay").TransformOptions | undefined) => import("esbuild").Plugin;
3
3
  //#endregion
4
4
  export { _default as default };
package/dist/farm.d.mts CHANGED
@@ -1,4 +1,4 @@
1
1
  //#region src/farm.d.ts
2
- declare const _default: (options?: unknown) => import("@farmfe/core").JsPlugin;
2
+ declare const _default: (options?: import("oxc-transform-relay").TransformOptions | undefined) => import("@farmfe/core").JsPlugin;
3
3
  //#endregion
4
4
  export { _default as default };
package/dist/index.d.mts CHANGED
@@ -2,6 +2,6 @@ import { Options } from "./types.mjs";
2
2
  import { UnpluginFactory } from "unplugin";
3
3
  //#region src/index.d.ts
4
4
  declare const unpluginFactory: UnpluginFactory<Options | undefined>;
5
- declare const unplugin: import("unplugin").UnpluginInstance<any, boolean>;
5
+ declare const unplugin: import("unplugin").UnpluginInstance<Options | undefined, boolean>;
6
6
  //#endregion
7
7
  export { unplugin as default, unplugin, unpluginFactory };
@@ -1,4 +1,4 @@
1
1
  //#region src/rolldown.d.ts
2
- declare const _default: (options?: unknown) => any;
2
+ declare const _default: (options?: import("oxc-transform-relay").TransformOptions | undefined) => any;
3
3
  //#endregion
4
4
  export { _default as default };
package/dist/rollup.d.mts CHANGED
@@ -1,4 +1,4 @@
1
1
  //#region src/rollup.d.ts
2
- declare const _default: (options?: unknown) => import("rollup").Plugin<any>[] | import("rollup").Plugin<any>;
2
+ declare const _default: (options?: import("oxc-transform-relay").TransformOptions | undefined) => import("rollup").Plugin<any>[] | import("rollup").Plugin<any>;
3
3
  //#endregion
4
4
  export { _default as default };
package/dist/rspack.d.mts CHANGED
@@ -1,4 +1,4 @@
1
1
  //#region src/rspack.d.ts
2
- declare const _default: (options?: unknown) => RspackPluginInstance;
2
+ declare const _default: (options?: import("oxc-transform-relay").TransformOptions | undefined) => RspackPluginInstance;
3
3
  //#endregion
4
4
  export { _default as default };
package/dist/vite.d.mts CHANGED
@@ -1,4 +1,4 @@
1
1
  //#region src/vite.d.ts
2
- declare const _default: (options?: unknown) => import("vite").Plugin<any>[] | import("vite").Plugin<any>;
2
+ declare const _default: (options?: import("oxc-transform-relay").TransformOptions | undefined) => import("vite").Plugin<any>[] | import("vite").Plugin<any>;
3
3
  //#endregion
4
4
  export { _default as default };
@@ -1,4 +1,4 @@
1
1
  //#region src/webpack.d.ts
2
- declare const _default: (options?: unknown) => import("webpack").WebpackPluginInstance;
2
+ declare const _default: (options?: import("oxc-transform-relay").TransformOptions | undefined) => import("webpack").WebpackPluginInstance;
3
3
  //#endregion
4
4
  export { _default as default };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "unplugin-relay",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "A plugin for relay",
5
5
  "keywords": [
6
6
  "astro",
@@ -67,12 +67,12 @@
67
67
  "access": "public"
68
68
  },
69
69
  "dependencies": {
70
- "oxc-transform-relay": "^0.147.0",
70
+ "oxc-transform-relay": "^0.148.0",
71
71
  "unplugin": "^3.3.0"
72
72
  },
73
73
  "devDependencies": {
74
74
  "@types/node": "26.2.0",
75
- "bumpp": "12.2.1",
75
+ "bumpp": "12.3.0",
76
76
  "pkg-pr-new": "0.0.88",
77
77
  "typescript": "7.0.2",
78
78
  "vite": "npm:@voidzero-dev/vite-plus-core@0.2.9",
@@ -80,10 +80,10 @@
80
80
  },
81
81
  "peerDependencies": {
82
82
  "@farmfe/core": ">=1",
83
- "@nuxt/kit": "^3",
84
- "@nuxt/schema": "^3",
83
+ "@nuxt/kit": "^3 || ^4.0.0",
84
+ "@nuxt/schema": "^3 || ^4.0.0",
85
85
  "esbuild": "*",
86
- "rollup": "^3",
86
+ "rollup": "^3 || ^4.0.0",
87
87
  "vite": ">=3",
88
88
  "webpack": "^4 || ^5"
89
89
  },