@forsakringskassan/vite-lib-config 5.1.5 → 5.1.7
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 +5 -1
- package/dist/api-extractor.mjs +4 -3
- package/dist/vite.config.cjs +9 -6
- package/dist/vite.config.mjs +9 -6
- package/package.json +8 -2
package/README.md
CHANGED
|
@@ -138,7 +138,11 @@ When running in dev mode an optional filename (or part of filename) can be given
|
|
|
138
138
|
vite -- MyAwesomeExample
|
|
139
139
|
```
|
|
140
140
|
|
|
141
|
-
would search for
|
|
141
|
+
would search for `.vue` files matching the given pattern (fuzzy) in these folders:
|
|
142
|
+
|
|
143
|
+
- `**/docs`
|
|
144
|
+
- `**/examples`
|
|
145
|
+
- `**/test`
|
|
142
146
|
|
|
143
147
|
### Appending Plugins
|
|
144
148
|
|
package/dist/api-extractor.mjs
CHANGED
|
@@ -1605,15 +1605,16 @@ var require_range = __commonJS({
|
|
|
1605
1605
|
};
|
|
1606
1606
|
var replaceTilde = (comp, options) => {
|
|
1607
1607
|
const r = options.loose ? re2[t.TILDELOOSE] : re2[t.TILDE];
|
|
1608
|
+
const z = options.includePrerelease ? "-0" : "";
|
|
1608
1609
|
return comp.replace(r, (_2, M2, m, p, pr) => {
|
|
1609
1610
|
debug("tilde", comp, _2, M2, m, p, pr);
|
|
1610
1611
|
let ret;
|
|
1611
1612
|
if (isX(M2)) {
|
|
1612
1613
|
ret = "";
|
|
1613
1614
|
} else if (isX(m)) {
|
|
1614
|
-
ret = `>=${M2}.0.0 <${+M2 + 1}.0.0-0`;
|
|
1615
|
+
ret = `>=${M2}.0.0${z} <${+M2 + 1}.0.0-0`;
|
|
1615
1616
|
} else if (isX(p)) {
|
|
1616
|
-
ret = `>=${M2}.${m}.0 <${M2}.${+m + 1}.0-0`;
|
|
1617
|
+
ret = `>=${M2}.${m}.0${z} <${M2}.${+m + 1}.0-0`;
|
|
1617
1618
|
} else if (pr) {
|
|
1618
1619
|
debug("replaceTilde pr", pr);
|
|
1619
1620
|
ret = `>=${M2}.${m}.${p}-${pr} <${M2}.${+m + 1}.0-0`;
|
|
@@ -5839,7 +5840,7 @@ ${indent}`);
|
|
|
5839
5840
|
// src/utils/extract-augmentations.ts
|
|
5840
5841
|
function extractAugmentations(content) {
|
|
5841
5842
|
const matches = content.matchAll(
|
|
5842
|
-
/^declare (?:module\s*"([^"]+)"|global)\s
|
|
5843
|
+
/^declare (?:module\s*"([^"]+)"|global)\s*\{([\s\S]+?)^\}/gm
|
|
5843
5844
|
);
|
|
5844
5845
|
return Array.from(matches).map((it2) => {
|
|
5845
5846
|
const [withDeclaration, name = "", withoutDeclaration] = it2;
|
package/dist/vite.config.cjs
CHANGED
|
@@ -3796,15 +3796,16 @@ var require_range = __commonJS({
|
|
|
3796
3796
|
};
|
|
3797
3797
|
var replaceTilde = (comp, options) => {
|
|
3798
3798
|
const r = options.loose ? re2[t.TILDELOOSE] : re2[t.TILDE];
|
|
3799
|
+
const z = options.includePrerelease ? "-0" : "";
|
|
3799
3800
|
return comp.replace(r, (_2, M2, m, p, pr) => {
|
|
3800
3801
|
debug2("tilde", comp, _2, M2, m, p, pr);
|
|
3801
3802
|
let ret;
|
|
3802
3803
|
if (isX(M2)) {
|
|
3803
3804
|
ret = "";
|
|
3804
3805
|
} else if (isX(m)) {
|
|
3805
|
-
ret = `>=${M2}.0.0 <${+M2 + 1}.0.0-0`;
|
|
3806
|
+
ret = `>=${M2}.0.0${z} <${+M2 + 1}.0.0-0`;
|
|
3806
3807
|
} else if (isX(p)) {
|
|
3807
|
-
ret = `>=${M2}.${m}.0 <${M2}.${+m + 1}.0-0`;
|
|
3808
|
+
ret = `>=${M2}.${m}.0${z} <${M2}.${+m + 1}.0-0`;
|
|
3808
3809
|
} else if (pr) {
|
|
3809
3810
|
debug2("replaceTilde pr", pr);
|
|
3810
3811
|
ret = `>=${M2}.${m}.${p}-${pr} <${M2}.${+m + 1}.0-0`;
|
|
@@ -10856,7 +10857,7 @@ function isMatched(name, patterns) {
|
|
|
10856
10857
|
|
|
10857
10858
|
// src/plugins/babel-plugin.ts
|
|
10858
10859
|
var babel = __toESM(require("@babel/core"));
|
|
10859
|
-
var filter = /\.(js|ts|vue)$/;
|
|
10860
|
+
var filter = /\.(?:js|ts|vue)$/;
|
|
10860
10861
|
function babelPlugin() {
|
|
10861
10862
|
return {
|
|
10862
10863
|
name: "fk:babel",
|
|
@@ -10981,8 +10982,7 @@ function indexHtmlPlugin() {
|
|
|
10981
10982
|
async handler() {
|
|
10982
10983
|
const content = await import_promises2.default.readFile(templateFile, "utf8");
|
|
10983
10984
|
return content.replaceAll(
|
|
10984
|
-
|
|
10985
|
-
/{{([^}]+)}}/g,
|
|
10985
|
+
/\{\{([^}]+)\}\}/g,
|
|
10986
10986
|
(match, key) => {
|
|
10987
10987
|
return templateData[key.trim()] ?? match;
|
|
10988
10988
|
}
|
|
@@ -11226,7 +11226,10 @@ async function findEntrypoint(pattern) {
|
|
|
11226
11226
|
return defaultEntrypoint;
|
|
11227
11227
|
}
|
|
11228
11228
|
const uf = new import_ufuzzy.default({ intraIns: Infinity });
|
|
11229
|
-
const files = await Ze("
|
|
11229
|
+
const files = await Ze("**/{examples,docs,tests}/**/*.vue", {
|
|
11230
|
+
posix: true,
|
|
11231
|
+
nodir: true
|
|
11232
|
+
});
|
|
11230
11233
|
const idxs = uf.filter(files, pattern);
|
|
11231
11234
|
if (!idxs || idxs.length === 0) {
|
|
11232
11235
|
throw new Error(`No files matching "${pattern}"`);
|
package/dist/vite.config.mjs
CHANGED
|
@@ -3794,15 +3794,16 @@ var require_range = __commonJS({
|
|
|
3794
3794
|
};
|
|
3795
3795
|
var replaceTilde = (comp, options) => {
|
|
3796
3796
|
const r = options.loose ? re2[t.TILDELOOSE] : re2[t.TILDE];
|
|
3797
|
+
const z = options.includePrerelease ? "-0" : "";
|
|
3797
3798
|
return comp.replace(r, (_2, M2, m, p, pr) => {
|
|
3798
3799
|
debug2("tilde", comp, _2, M2, m, p, pr);
|
|
3799
3800
|
let ret;
|
|
3800
3801
|
if (isX(M2)) {
|
|
3801
3802
|
ret = "";
|
|
3802
3803
|
} else if (isX(m)) {
|
|
3803
|
-
ret = `>=${M2}.0.0 <${+M2 + 1}.0.0-0`;
|
|
3804
|
+
ret = `>=${M2}.0.0${z} <${+M2 + 1}.0.0-0`;
|
|
3804
3805
|
} else if (isX(p)) {
|
|
3805
|
-
ret = `>=${M2}.${m}.0 <${M2}.${+m + 1}.0-0`;
|
|
3806
|
+
ret = `>=${M2}.${m}.0${z} <${M2}.${+m + 1}.0-0`;
|
|
3806
3807
|
} else if (pr) {
|
|
3807
3808
|
debug2("replaceTilde pr", pr);
|
|
3808
3809
|
ret = `>=${M2}.${m}.${p}-${pr} <${M2}.${+m + 1}.0-0`;
|
|
@@ -10848,7 +10849,7 @@ function isMatched(name, patterns) {
|
|
|
10848
10849
|
|
|
10849
10850
|
// src/plugins/babel-plugin.ts
|
|
10850
10851
|
import * as babel from "@babel/core";
|
|
10851
|
-
var filter = /\.(js|ts|vue)$/;
|
|
10852
|
+
var filter = /\.(?:js|ts|vue)$/;
|
|
10852
10853
|
function babelPlugin() {
|
|
10853
10854
|
return {
|
|
10854
10855
|
name: "fk:babel",
|
|
@@ -10973,8 +10974,7 @@ function indexHtmlPlugin() {
|
|
|
10973
10974
|
async handler() {
|
|
10974
10975
|
const content = await fs4.readFile(templateFile, "utf8");
|
|
10975
10976
|
return content.replaceAll(
|
|
10976
|
-
|
|
10977
|
-
/{{([^}]+)}}/g,
|
|
10977
|
+
/\{\{([^}]+)\}\}/g,
|
|
10978
10978
|
(match, key) => {
|
|
10979
10979
|
return templateData[key.trim()] ?? match;
|
|
10980
10980
|
}
|
|
@@ -11220,7 +11220,10 @@ async function findEntrypoint(pattern) {
|
|
|
11220
11220
|
return defaultEntrypoint;
|
|
11221
11221
|
}
|
|
11222
11222
|
const uf = new import_ufuzzy.default({ intraIns: Infinity });
|
|
11223
|
-
const files = await Ze("
|
|
11223
|
+
const files = await Ze("**/{examples,docs,tests}/**/*.vue", {
|
|
11224
|
+
posix: true,
|
|
11225
|
+
nodir: true
|
|
11226
|
+
});
|
|
11224
11227
|
const idxs = uf.filter(files, pattern);
|
|
11225
11228
|
if (!idxs || idxs.length === 0) {
|
|
11226
11229
|
throw new Error(`No files matching "${pattern}"`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@forsakringskassan/vite-lib-config",
|
|
3
|
-
"version": "5.1.
|
|
3
|
+
"version": "5.1.7",
|
|
4
4
|
"description": "Försäkringskassan toolchain to build libraries with Vite",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"vite"
|
|
@@ -38,8 +38,8 @@
|
|
|
38
38
|
"types": "./dist/index.d.ts",
|
|
39
39
|
"bin": {
|
|
40
40
|
"fk-api-extractor": "bin/api-extractor.mjs",
|
|
41
|
-
"fk-build-vue-lib": "bin/build-vue-lib.mjs",
|
|
42
41
|
"fk-build-selectors": "bin/build-selectors.mjs",
|
|
42
|
+
"fk-build-vue-lib": "bin/build-vue-lib.mjs",
|
|
43
43
|
"fk-write-config": "bin/write-config.mjs"
|
|
44
44
|
},
|
|
45
45
|
"files": [
|
|
@@ -67,5 +67,11 @@
|
|
|
67
67
|
"engines": {
|
|
68
68
|
"node": "^22.12.0 || >= 24",
|
|
69
69
|
"npm": ">= 11.0.0"
|
|
70
|
+
},
|
|
71
|
+
"allowScripts": {
|
|
72
|
+
"core-js": false,
|
|
73
|
+
"esbuild": true,
|
|
74
|
+
"fsevents": false,
|
|
75
|
+
"unrs-resolver": true
|
|
70
76
|
}
|
|
71
77
|
}
|