@pedrolamas/plugin-vue2 2.4.2-beta.0 → 2.4.2-beta.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/README.md CHANGED
@@ -1,10 +1,5 @@
1
1
  # @pedrolamas/plugin-vue2 [![npm](https://img.shields.io/npm/v/@pedrolamas/plugin-vue2.svg)](https://npmjs.com/package/@pedrolamas/plugin-vue2)
2
2
 
3
- > [!CAUTION]
4
- > Vue 2 has reached EOL, and this project is no longer actively maintained.
5
-
6
- ---
7
-
8
3
  > Note: this plugin requires Vite 8 (`vite >= 8.0.0`) and only works with Vue@^2.7.0.
9
4
 
10
5
  ```js
package/dist/index.cjs CHANGED
@@ -14,9 +14,8 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
14
14
  const fs__default = /*#__PURE__*/_interopDefaultCompat(fs);
15
15
  const path__default = /*#__PURE__*/_interopDefaultCompat(path);
16
16
 
17
- //#region src/utils.ts
18
- //#endregion
19
- //#region src/filter/simple-filters.ts
17
+ // src/utils.ts
18
+ // src/filter/simple-filters.ts
20
19
  /**
21
20
  * Constructs a RegExp that matches the exact string specified.
22
21
  *
@@ -40,7 +39,7 @@ const path__default = /*#__PURE__*/_interopDefaultCompat(path);
40
39
  function exactRegex(str, flags) {
41
40
  return new RegExp(`^${escapeRegex(str)}$`, flags);
42
41
  }
43
- const escapeRegexRE = /[-/\\^$*+?.()|[\]{}]/g;
42
+ const escapeRegexRE = /[/\\^$*+?.()|[\]{}]/g;
44
43
  function escapeRegex(str) {
45
44
  return str.replace(escapeRegexRE, "\\$&");
46
45
  }
@@ -1185,7 +1184,7 @@ function vuePlugin(rawOptions = {}) {
1185
1184
  let options = {
1186
1185
  isProduction: process.env.NODE_ENV === "production",
1187
1186
  compiler: null,
1188
- // to be set in buildStart
1187
+ // to be set in configResolved
1189
1188
  ...rawOptions,
1190
1189
  include,
1191
1190
  exclude,
@@ -1215,8 +1214,10 @@ function vuePlugin(rawOptions = {}) {
1215
1214
  };
1216
1215
  },
1217
1216
  configResolved(config) {
1217
+ const { compiler, ...rest } = options;
1218
1218
  options = {
1219
- ...options,
1219
+ compiler: compiler ?? resolveCompiler(config.root),
1220
+ ...rest,
1220
1221
  root: config.root,
1221
1222
  isProduction: config.isProduction,
1222
1223
  sourceMap: config.command === "build" ? !!config.build.sourcemap : true,
package/dist/index.mjs CHANGED
@@ -4,9 +4,8 @@ import { createRequire } from 'node:module';
4
4
  import path from 'node:path';
5
5
  import { createHash } from 'node:crypto';
6
6
 
7
- //#region src/utils.ts
8
- //#endregion
9
- //#region src/filter/simple-filters.ts
7
+ // src/utils.ts
8
+ // src/filter/simple-filters.ts
10
9
  /**
11
10
  * Constructs a RegExp that matches the exact string specified.
12
11
  *
@@ -30,7 +29,7 @@ import { createHash } from 'node:crypto';
30
29
  function exactRegex(str, flags) {
31
30
  return new RegExp(`^${escapeRegex(str)}$`, flags);
32
31
  }
33
- const escapeRegexRE = /[-/\\^$*+?.()|[\]{}]/g;
32
+ const escapeRegexRE = /[/\\^$*+?.()|[\]{}]/g;
34
33
  function escapeRegex(str) {
35
34
  return str.replace(escapeRegexRE, "\\$&");
36
35
  }
@@ -1175,7 +1174,7 @@ function vuePlugin(rawOptions = {}) {
1175
1174
  let options = {
1176
1175
  isProduction: process.env.NODE_ENV === "production",
1177
1176
  compiler: null,
1178
- // to be set in buildStart
1177
+ // to be set in configResolved
1179
1178
  ...rawOptions,
1180
1179
  include,
1181
1180
  exclude,
@@ -1205,8 +1204,10 @@ function vuePlugin(rawOptions = {}) {
1205
1204
  };
1206
1205
  },
1207
1206
  configResolved(config) {
1207
+ const { compiler, ...rest } = options;
1208
1208
  options = {
1209
- ...options,
1209
+ compiler: compiler ?? resolveCompiler(config.root),
1210
+ ...rest,
1210
1211
  root: config.root,
1211
1212
  isProduction: config.isProduction,
1212
1213
  sourceMap: config.command === "build" ? !!config.build.sourcemap : true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pedrolamas/plugin-vue2",
3
- "version": "2.4.2-beta.0",
3
+ "version": "2.4.2-beta.1",
4
4
  "description": "Vite 8 plugin for Vue 2.7 single-file components support",
5
5
  "license": "MIT",
6
6
  "author": "Pedro Lamas",
@@ -34,27 +34,27 @@
34
34
  "vue": "^2.7.0-0"
35
35
  },
36
36
  "devDependencies": {
37
- "@rolldown/pluginutils": "^1.0.1",
37
+ "@rolldown/pluginutils": "^1.1.1",
38
38
  "@types/fs-extra": "^11.0.4",
39
39
  "conventional-changelog-cli": "^2.2.2",
40
40
  "debug": "^4.4.3",
41
41
  "enquirer": "^2.4.1",
42
42
  "esno": "^4.8.0",
43
43
  "execa": "^9.6.1",
44
- "fs-extra": "^11.4.0",
44
+ "fs-extra": "^11.4.1",
45
45
  "hash-sum": "^2.0.0",
46
46
  "minimist": "^1.2.8",
47
47
  "picocolors": "^1.1.1",
48
48
  "prettier": "^2.8.8",
49
49
  "puppeteer": "^24.39.1",
50
- "rollup": "^4.62.4",
51
- "semver": "^7.8.5",
50
+ "rollup": "^4.68.8",
51
+ "semver": "^7.8.6",
52
52
  "slash": "^5.1.0",
53
53
  "source-map": "^0.7.6",
54
54
  "typescript": "^5.9.3",
55
55
  "unbuild": "^3.6.1",
56
- "vite": "^8.2.1",
57
- "vitest": "^4.1.10",
56
+ "vite": "^8.3.8",
57
+ "vitest": "^5.1.1",
58
58
  "vue": "^2.7.16"
59
59
  },
60
60
  "scripts": {