@unpackjs/plugin-react 3.0.1 → 3.1.1

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/dist/index.cjs CHANGED
@@ -31,8 +31,6 @@ let core_namespaceObject = require("@unpackjs/core"), external_node_fs_namespace
31
31
  var external_node_fs_default = __webpack_require__.n(external_node_fs_namespaceObject);
32
32
  let external_node_http_namespaceObject = require("node:http");
33
33
  var external_node_http_default = __webpack_require__.n(external_node_http_namespaceObject);
34
- let external_launch_editor_namespaceObject = require("launch-editor");
35
- var external_launch_editor_default = __webpack_require__.n(external_launch_editor_namespaceObject);
36
34
  let createServer = ()=>new Promise((resolve)=>{
37
35
  let server = external_node_http_default().createServer((req, res)=>{
38
36
  let params = new URLSearchParams(req.url.slice(1)), file = decodeURIComponent(params.get('file')), line = Number(params.get('line')), column = Number(params.get('column'));
@@ -41,7 +39,7 @@ let createServer = ()=>new Promise((resolve)=>{
41
39
  'Access-Control-Allow-Methods': '*',
42
40
  'Access-Control-Allow-Headers': '*',
43
41
  'Access-Control-Allow-Private-Network': 'true'
44
- }), res.end('ok'), external_launch_editor_default()(`${file}:${line}:${column}`);
42
+ }), res.end('ok'), (0, core_namespaceObject.launchEditor)(`${file}:${line}:${column}`);
45
43
  });
46
44
  (0, core_namespaceObject.getPort)().then((port)=>{
47
45
  server.listen(port, ()=>{
@@ -198,7 +196,7 @@ ${renderer}
198
196
  }
199
197
  },
200
198
  env: {
201
- targets: core_namespaceObject.DEFAULT_BROWSERSLIST
199
+ targets: (0, core_namespaceObject.esVersionToBrowserslist)(unpackConfig.build.target)
202
200
  }
203
201
  });
204
202
  return mergeConfig(config, {
package/dist/index.js CHANGED
@@ -4,10 +4,9 @@ import { fileURLToPath as __webpack_fileURLToPath__ } from "node:url";
4
4
  import { dirname as __webpack_dirname__ } from "node:path";
5
5
  import node_path from "node:path";
6
6
  import plugin_react_refresh from "@rspack/plugin-react-refresh";
7
- import { DEFAULT_BROWSERSLIST, TEMPLATE_CONTENT, TEMP_DIR, colors, getPathInJs, getPort, isDev, isDevServer, isFunction, isPlainObject, logger, mergeConfig as core_mergeConfig, removeDir, restartCleaners, rspack } from "@unpackjs/core";
7
+ import { TEMPLATE_CONTENT, TEMP_DIR, colors, esVersionToBrowserslist, getPathInJs, getPort, isDev, isDevServer, isFunction, isPlainObject, launchEditor, logger, mergeConfig as core_mergeConfig, removeDir, restartCleaners, rspack } from "@unpackjs/core";
8
8
  import node_fs from "node:fs";
9
9
  import node_http from "node:http";
10
- import launch_editor from "launch-editor";
11
10
  var click_to_component_dirname = __webpack_dirname__(__webpack_fileURLToPath__(import.meta.url));
12
11
  let applyClickToComponentConfig = async ({ config, unpackConfig })=>{
13
12
  let { port } = await new Promise((resolve)=>{
@@ -18,7 +17,7 @@ let applyClickToComponentConfig = async ({ config, unpackConfig })=>{
18
17
  'Access-Control-Allow-Methods': '*',
19
18
  'Access-Control-Allow-Headers': '*',
20
19
  'Access-Control-Allow-Private-Network': 'true'
21
- }), res.end('ok'), launch_editor(`${file}:${line}:${column}`);
20
+ }), res.end('ok'), launchEditor(`${file}:${line}:${column}`);
22
21
  });
23
22
  getPort().then((port)=>{
24
23
  server.listen(port, ()=>{
@@ -174,7 +173,7 @@ ${renderer}
174
173
  }
175
174
  },
176
175
  env: {
177
- targets: DEFAULT_BROWSERSLIST
176
+ targets: esVersionToBrowserslist(unpackConfig.build.target)
178
177
  }
179
178
  });
180
179
  return mergeConfig(config, {
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/click-to-component/index.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,KAAK,oBAAoB,EAKzB,KAAK,YAAY,EAClB,MAAM,gBAAgB,CAAA;AA6BvB,eAAO,MAAM,2BAA2B,GAAU,2BAG/C;IACD,MAAM,EAAE,oBAAoB,CAAA;IAC5B,YAAY,EAAE,YAAY,CAAA;CAC3B,KAAG,OAAO,CAAC,oBAAoB,CA+B/B,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/click-to-component/index.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,KAAK,oBAAoB,EAMzB,KAAK,YAAY,EAClB,MAAM,gBAAgB,CAAA;AA4BvB,eAAO,MAAM,2BAA2B,GAAU,2BAG/C;IACD,MAAM,EAAE,oBAAoB,CAAA;IAC5B,YAAY,EAAE,YAAY,CAAA;CAC3B,KAAG,OAAO,CAAC,oBAAoB,CA+B/B,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAA4C,KAAK,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAK5F,eAAO,MAAM,WAAW,iBAAiB,CAAA;AAEzC,MAAM,MAAM,kBAAkB,GAAG;IAC/B,gBAAgB,CAAC,EAAE,OAAO,CAAA;CAC3B,CAAA;AACD,eAAO,MAAM,WAAW,GAAI,UAAS,kBAAuB,KAAG,YA0F9D,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAA+C,KAAK,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAK/F,eAAO,MAAM,WAAW,iBAAiB,CAAA;AAEzC,MAAM,MAAM,kBAAkB,GAAG;IAC/B,gBAAgB,CAAC,EAAE,OAAO,CAAA;CAC3B,CAAA;AACD,eAAO,MAAM,WAAW,GAAI,UAAS,kBAAuB,KAAG,YA0F9D,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unpackjs/plugin-react",
3
- "version": "3.0.1",
3
+ "version": "3.1.1",
4
4
  "description": "React plugin for Unpack",
5
5
  "type": "module",
6
6
  "exports": {
@@ -27,11 +27,10 @@
27
27
  "@rspack/plugin-react-refresh": "1.4.3",
28
28
  "@svgr/webpack": "8.1.0",
29
29
  "@swc/helpers": "0.5.17",
30
- "launch-editor": "2.10.0",
31
30
  "react-refresh": "0.17.0"
32
31
  },
33
32
  "devDependencies": {
34
- "@unpackjs/core": "3.1.1"
33
+ "@unpackjs/core": "3.2.2"
35
34
  },
36
35
  "peerDependencies": {
37
36
  "@unpackjs/core": "3.x"