@rozenite/vite-plugin 1.2.0 → 1.3.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/LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Szymon Chmal
4
+ Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ of this software and associated documentation files (the "Software"), to deal
6
+ in the Software without restriction, including without limitation the rights
7
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ copies of the Software, and to permit persons to whom the Software is
9
+ furnished to do so, subject to the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be included in all
12
+ copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
+ SOFTWARE.
package/dist/index.cjs CHANGED
@@ -17,7 +17,7 @@ const rozeniteServerPlugin = () => {
17
17
  name: "rozenite-server-plugin",
18
18
  config(config) {
19
19
  const projectRoot = config.root ?? process$1.cwd();
20
- config.build ?? (config.build = {});
20
+ config.build ??= {};
21
21
  config.build.lib = {
22
22
  entry: path.resolve(projectRoot, "metro.ts"),
23
23
  formats: ["es", "cjs"],
@@ -117,7 +117,6 @@ const rozeniteClientPlugin = () => {
117
117
  return {
118
118
  name: "rozenite-client-plugin",
119
119
  async config(config) {
120
- var _a;
121
120
  if (config.root) {
122
121
  projectRoot = config.root;
123
122
  }
@@ -125,11 +124,11 @@ const rozeniteClientPlugin = () => {
125
124
  path.resolve(projectRoot, "rozenite.config.ts")
126
125
  );
127
126
  const panels = getPanels();
128
- config.server ?? (config.server = {});
127
+ config.server ??= {};
129
128
  config.server.open = false;
130
129
  config.server.port = 8888;
131
- config.build ?? (config.build = {});
132
- (_a = config.build).rollupOptions ?? (_a.rollupOptions = {});
130
+ config.build ??= {};
131
+ config.build.rollupOptions ??= {};
133
132
  config.build.rollupOptions.input = {
134
133
  ...config.build.rollupOptions.input,
135
134
  ...Object.fromEntries(
@@ -212,7 +211,7 @@ const rozeniteClientPlugin = () => {
212
211
  if (!relativePath.startsWith(PANELS_DIR)) {
213
212
  return;
214
213
  }
215
- viteServer == null ? void 0 : viteServer.ws.send({
214
+ viteServer?.ws.send({
216
215
  type: "full-reload",
217
216
  path: "/"
218
217
  });
@@ -240,10 +239,9 @@ const rozeniteReactNativePlugin = () => {
240
239
  return {
241
240
  name: "rozenite-react-native-plugin",
242
241
  config(config) {
243
- var _a;
244
242
  const projectRoot = config.root ?? process.cwd();
245
- config.build ?? (config.build = {});
246
- (_a = config.build).rollupOptions ?? (_a.rollupOptions = {});
243
+ config.build ??= {};
244
+ config.build.rollupOptions ??= {};
247
245
  config.build.lib = {
248
246
  entry: path.resolve(projectRoot, "react-native.ts"),
249
247
  fileName: (format) => `react-native.${format === "es" ? "js" : "cjs"}`
package/dist/index.js CHANGED
@@ -14,7 +14,7 @@ const rozeniteServerPlugin = () => {
14
14
  name: "rozenite-server-plugin",
15
15
  config(config) {
16
16
  const projectRoot = config.root ?? process$1.cwd();
17
- config.build ?? (config.build = {});
17
+ config.build ??= {};
18
18
  config.build.lib = {
19
19
  entry: path.resolve(projectRoot, "metro.ts"),
20
20
  formats: ["es", "cjs"],
@@ -114,7 +114,6 @@ const rozeniteClientPlugin = () => {
114
114
  return {
115
115
  name: "rozenite-client-plugin",
116
116
  async config(config) {
117
- var _a;
118
117
  if (config.root) {
119
118
  projectRoot = config.root;
120
119
  }
@@ -122,11 +121,11 @@ const rozeniteClientPlugin = () => {
122
121
  path.resolve(projectRoot, "rozenite.config.ts")
123
122
  );
124
123
  const panels = getPanels();
125
- config.server ?? (config.server = {});
124
+ config.server ??= {};
126
125
  config.server.open = false;
127
126
  config.server.port = 8888;
128
- config.build ?? (config.build = {});
129
- (_a = config.build).rollupOptions ?? (_a.rollupOptions = {});
127
+ config.build ??= {};
128
+ config.build.rollupOptions ??= {};
130
129
  config.build.rollupOptions.input = {
131
130
  ...config.build.rollupOptions.input,
132
131
  ...Object.fromEntries(
@@ -209,7 +208,7 @@ const rozeniteClientPlugin = () => {
209
208
  if (!relativePath.startsWith(PANELS_DIR)) {
210
209
  return;
211
210
  }
212
- viteServer == null ? void 0 : viteServer.ws.send({
211
+ viteServer?.ws.send({
213
212
  type: "full-reload",
214
213
  path: "/"
215
214
  });
@@ -237,10 +236,9 @@ const rozeniteReactNativePlugin = () => {
237
236
  return {
238
237
  name: "rozenite-react-native-plugin",
239
238
  config(config) {
240
- var _a;
241
239
  const projectRoot = config.root ?? process.cwd();
242
- config.build ?? (config.build = {});
243
- (_a = config.build).rollupOptions ?? (_a.rollupOptions = {});
240
+ config.build ??= {};
241
+ config.build.rollupOptions ??= {};
244
242
  config.build.lib = {
245
243
  entry: path.resolve(projectRoot, "react-native.ts"),
246
244
  fileName: (format) => `react-native.${format === "es" ? "js" : "cjs"}`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rozenite/vite-plugin",
3
- "version": "1.2.0",
3
+ "version": "1.3.0",
4
4
  "description": "Vite plugin for developing React Native DevTools plugins with hot reload and development tools",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -42,12 +42,17 @@
42
42
  "vite-plugin-react-native-web": "^2.1.1"
43
43
  },
44
44
  "peerDependencies": {
45
- "vite": "^6.0.0"
45
+ "vite": "^7.3.1"
46
46
  },
47
47
  "devDependencies": {
48
48
  "@types/ejs": "^3.1.5"
49
49
  },
50
50
  "engines": {
51
51
  "node": ">=20"
52
+ },
53
+ "scripts": {
54
+ "build": "vite build",
55
+ "typecheck": "tsc -p tsconfig.lib.json --noEmit",
56
+ "lint": "eslint ."
52
57
  }
53
- }
58
+ }