@rsbuild/plugin-toml 1.1.0 → 1.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.
Files changed (2) hide show
  1. package/dist/index.cjs +30 -44
  2. package/package.json +12 -12
package/dist/index.cjs CHANGED
@@ -1,21 +1,7 @@
1
1
  "use strict";
2
- var __webpack_modules__ = {
3
- toml: function(module) {
4
- module.exports = import("toml");
5
- }
6
- };
7
- var __webpack_module_cache__ = {};
8
- function __webpack_require__(moduleId) {
9
- var cachedModule = __webpack_module_cache__[moduleId];
10
- if (void 0 !== cachedModule) return cachedModule.exports;
11
- var module = __webpack_module_cache__[moduleId] = {
12
- exports: {}
13
- };
14
- __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
15
- return module.exports;
16
- }
2
+ var __webpack_require__ = {};
17
3
  (()=>{
18
- __webpack_require__.d = function(exports1, definition) {
4
+ __webpack_require__.d = (exports1, definition)=>{
19
5
  for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
20
6
  enumerable: true,
21
7
  get: definition[key]
@@ -23,12 +9,10 @@ function __webpack_require__(moduleId) {
23
9
  };
24
10
  })();
25
11
  (()=>{
26
- __webpack_require__.o = function(obj, prop) {
27
- return Object.prototype.hasOwnProperty.call(obj, prop);
28
- };
12
+ __webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
29
13
  })();
30
14
  (()=>{
31
- __webpack_require__.r = function(exports1) {
15
+ __webpack_require__.r = (exports1)=>{
32
16
  if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
33
17
  value: 'Module'
34
18
  });
@@ -38,30 +22,32 @@ function __webpack_require__(moduleId) {
38
22
  };
39
23
  })();
40
24
  var __webpack_exports__ = {};
41
- (()=>{
42
- __webpack_require__.r(__webpack_exports__);
43
- __webpack_require__.d(__webpack_exports__, {
44
- PLUGIN_TOML_NAME: ()=>PLUGIN_TOML_NAME,
45
- pluginToml: ()=>pluginToml
25
+ __webpack_require__.r(__webpack_exports__);
26
+ __webpack_require__.d(__webpack_exports__, {
27
+ PLUGIN_TOML_NAME: ()=>PLUGIN_TOML_NAME,
28
+ pluginToml: ()=>pluginToml
29
+ });
30
+ const PLUGIN_TOML_NAME = 'rsbuild:toml';
31
+ const pluginToml = (options = {})=>({
32
+ name: PLUGIN_TOML_NAME,
33
+ async setup (api) {
34
+ const { parse } = await import("toml");
35
+ const { esModule = true } = options;
36
+ api.transform({
37
+ test: /\.toml$/
38
+ }, ({ code })=>{
39
+ const parsed = parse(code);
40
+ const exportType = esModule ? 'export default' : 'module.exports =';
41
+ return `${exportType} ${JSON.stringify(parsed, void 0, '\t')};`;
42
+ });
43
+ }
46
44
  });
47
- const PLUGIN_TOML_NAME = 'rsbuild:toml';
48
- const pluginToml = (options = {})=>({
49
- name: PLUGIN_TOML_NAME,
50
- async setup (api) {
51
- const { parse } = await Promise.resolve().then(__webpack_require__.bind(__webpack_require__, "toml"));
52
- const { esModule = true } = options;
53
- api.transform({
54
- test: /\.toml$/
55
- }, ({ code })=>{
56
- const parsed = parse(code);
57
- const exportType = esModule ? 'export default' : 'module.exports =';
58
- return `${exportType} ${JSON.stringify(parsed, void 0, '\t')};`;
59
- });
60
- }
61
- });
62
- })();
63
- var __webpack_export_target__ = exports;
64
- for(var __webpack_i__ in __webpack_exports__)__webpack_export_target__[__webpack_i__] = __webpack_exports__[__webpack_i__];
65
- if (__webpack_exports__.__esModule) Object.defineProperty(__webpack_export_target__, '__esModule', {
45
+ exports.PLUGIN_TOML_NAME = __webpack_exports__.PLUGIN_TOML_NAME;
46
+ exports.pluginToml = __webpack_exports__.pluginToml;
47
+ for(var __webpack_i__ in __webpack_exports__)if (-1 === [
48
+ "PLUGIN_TOML_NAME",
49
+ "pluginToml"
50
+ ].indexOf(__webpack_i__)) exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
51
+ Object.defineProperty(exports, '__esModule', {
66
52
  value: true
67
53
  });
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@rsbuild/plugin-toml",
3
- "version": "1.1.0",
4
- "repository": "https://github.com/rspack-contrib/rsbuild-plugin-toml",
3
+ "version": "1.1.2",
4
+ "repository": "https://github.com/rstackjs/rsbuild-plugin-toml",
5
5
  "license": "MIT",
6
6
  "type": "module",
7
7
  "exports": {
@@ -39,24 +39,24 @@
39
39
  },
40
40
  "devDependencies": {
41
41
  "@biomejs/biome": "^1.9.4",
42
- "@playwright/test": "^1.50.1",
43
- "@rsbuild/core": "1.2.14",
44
- "@rslib/core": "^0.5.2",
45
- "@types/node": "^22.13.8",
46
- "nano-staged": "^0.8.0",
47
- "playwright": "^1.50.1",
48
- "simple-git-hooks": "^2.11.1",
49
- "typescript": "^5.8.2"
42
+ "@playwright/test": "^1.57.0",
43
+ "@rsbuild/core": "1.6.10",
44
+ "@rslib/core": "^0.18.2",
45
+ "@types/node": "^24.10.1",
46
+ "nano-staged": "^0.9.0",
47
+ "playwright": "^1.57.0",
48
+ "simple-git-hooks": "^2.13.1",
49
+ "typescript": "^5.9.3"
50
50
  },
51
51
  "peerDependencies": {
52
- "@rsbuild/core": "1.x"
52
+ "@rsbuild/core": "^1.0.0 || ^2.0.0-0"
53
53
  },
54
54
  "peerDependenciesMeta": {
55
55
  "@rsbuild/core": {
56
56
  "optional": true
57
57
  }
58
58
  },
59
- "packageManager": "pnpm@10.5.2",
59
+ "packageManager": "pnpm@10.24.0",
60
60
  "publishConfig": {
61
61
  "access": "public",
62
62
  "registry": "https://registry.npmjs.org/"