@weapp-core/shared 1.0.3 → 1.0.5-alpha.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/dist/index.cjs +10 -5
- package/dist/index.d.cts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +6 -2
- package/package.json +13 -1
package/dist/index.cjs
CHANGED
|
@@ -33,9 +33,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
33
33
|
));
|
|
34
34
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
35
35
|
|
|
36
|
-
// ../../node_modules/.pnpm/tsup@8.3.
|
|
36
|
+
// ../../node_modules/.pnpm/tsup@8.3.5_@swc+core@1.10.4_jiti@2.4.2_postcss@8.4.49_tsx@4.19.2_typescript@5.7.2_yaml@2.6.1/node_modules/tsup/assets/cjs_shims.js
|
|
37
37
|
var init_cjs_shims = __esm({
|
|
38
|
-
"../../node_modules/.pnpm/tsup@8.3.
|
|
38
|
+
"../../node_modules/.pnpm/tsup@8.3.5_@swc+core@1.10.4_jiti@2.4.2_postcss@8.4.49_tsx@4.19.2_typescript@5.7.2_yaml@2.6.1/node_modules/tsup/assets/cjs_shims.js"() {
|
|
39
39
|
"use strict";
|
|
40
40
|
}
|
|
41
41
|
});
|
|
@@ -310,8 +310,8 @@ var require_set_value = __commonJS({
|
|
|
310
310
|
});
|
|
311
311
|
|
|
312
312
|
// src/index.ts
|
|
313
|
-
var
|
|
314
|
-
__export(
|
|
313
|
+
var index_exports = {};
|
|
314
|
+
__export(index_exports, {
|
|
315
315
|
addExtension: () => addExtension,
|
|
316
316
|
arrify: () => arrify,
|
|
317
317
|
defu: () => defu,
|
|
@@ -321,9 +321,10 @@ __export(src_exports, {
|
|
|
321
321
|
isObject: () => isObject,
|
|
322
322
|
objectHash: () => import_object_hash.default,
|
|
323
323
|
removeExtension: () => removeExtension,
|
|
324
|
+
removeExtensionDeep: () => removeExtensionDeep,
|
|
324
325
|
set: () => import_set_value.default
|
|
325
326
|
});
|
|
326
|
-
module.exports = __toCommonJS(
|
|
327
|
+
module.exports = __toCommonJS(index_exports);
|
|
327
328
|
init_cjs_shims();
|
|
328
329
|
var import_node_path = require("path");
|
|
329
330
|
|
|
@@ -406,6 +407,9 @@ function escapeStringRegexp(str) {
|
|
|
406
407
|
function removeExtension(file) {
|
|
407
408
|
return file.replace(/\.[^/.]+$/, "");
|
|
408
409
|
}
|
|
410
|
+
function removeExtensionDeep(file) {
|
|
411
|
+
return file.replace(/\.[^/.]+/g, "");
|
|
412
|
+
}
|
|
409
413
|
function addExtension(filename, ext = ".js") {
|
|
410
414
|
let result = `${filename}`;
|
|
411
415
|
if (!(0, import_node_path.extname)(filename)) {
|
|
@@ -436,6 +440,7 @@ function isObject(x) {
|
|
|
436
440
|
isObject,
|
|
437
441
|
objectHash,
|
|
438
442
|
removeExtension,
|
|
443
|
+
removeExtensionDeep,
|
|
439
444
|
set
|
|
440
445
|
});
|
|
441
446
|
/*! Bundled license information:
|
package/dist/index.d.cts
CHANGED
|
@@ -6,6 +6,7 @@ export { default as set } from 'set-value';
|
|
|
6
6
|
|
|
7
7
|
declare function escapeStringRegexp(str: string): string;
|
|
8
8
|
declare function removeExtension(file: string): string;
|
|
9
|
+
declare function removeExtensionDeep(file: string): string;
|
|
9
10
|
declare function addExtension(filename: string, ext?: string): string;
|
|
10
11
|
declare function arrify<T>(val: T): T | T[];
|
|
11
12
|
|
|
@@ -20,4 +21,4 @@ declare const defuOverrideArray: <Source extends {
|
|
|
20
21
|
} | (number | boolean | any[] | Record<never, any> | null | undefined)>>(source: Source, ...defaults: Defaults) => defu.Defu<Source, Defaults>;
|
|
21
22
|
declare function isObject(x: unknown): x is Record<string | symbol | number, unknown>;
|
|
22
23
|
|
|
23
|
-
export { addExtension, arrify, defuOverrideArray, escapeStringRegexp, isObject, removeExtension };
|
|
24
|
+
export { addExtension, arrify, defuOverrideArray, escapeStringRegexp, isObject, removeExtension, removeExtensionDeep };
|
package/dist/index.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ export { default as set } from 'set-value';
|
|
|
6
6
|
|
|
7
7
|
declare function escapeStringRegexp(str: string): string;
|
|
8
8
|
declare function removeExtension(file: string): string;
|
|
9
|
+
declare function removeExtensionDeep(file: string): string;
|
|
9
10
|
declare function addExtension(filename: string, ext?: string): string;
|
|
10
11
|
declare function arrify<T>(val: T): T | T[];
|
|
11
12
|
|
|
@@ -20,4 +21,4 @@ declare const defuOverrideArray: <Source extends {
|
|
|
20
21
|
} | (number | boolean | any[] | Record<never, any> | null | undefined)>>(source: Source, ...defaults: Defaults) => defu.Defu<Source, Defaults>;
|
|
21
22
|
declare function isObject(x: unknown): x is Record<string | symbol | number, unknown>;
|
|
22
23
|
|
|
23
|
-
export { addExtension, arrify, defuOverrideArray, escapeStringRegexp, isObject, removeExtension };
|
|
24
|
+
export { addExtension, arrify, defuOverrideArray, escapeStringRegexp, isObject, removeExtension, removeExtensionDeep };
|
package/dist/index.js
CHANGED
|
@@ -27,9 +27,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
27
27
|
mod
|
|
28
28
|
));
|
|
29
29
|
|
|
30
|
-
// ../../node_modules/.pnpm/tsup@8.3.
|
|
30
|
+
// ../../node_modules/.pnpm/tsup@8.3.5_@swc+core@1.10.4_jiti@2.4.2_postcss@8.4.49_tsx@4.19.2_typescript@5.7.2_yaml@2.6.1/node_modules/tsup/assets/esm_shims.js
|
|
31
31
|
var init_esm_shims = __esm({
|
|
32
|
-
"../../node_modules/.pnpm/tsup@8.3.
|
|
32
|
+
"../../node_modules/.pnpm/tsup@8.3.5_@swc+core@1.10.4_jiti@2.4.2_postcss@8.4.49_tsx@4.19.2_typescript@5.7.2_yaml@2.6.1/node_modules/tsup/assets/esm_shims.js"() {
|
|
33
33
|
"use strict";
|
|
34
34
|
}
|
|
35
35
|
});
|
|
@@ -386,6 +386,9 @@ function escapeStringRegexp(str) {
|
|
|
386
386
|
function removeExtension(file) {
|
|
387
387
|
return file.replace(/\.[^/.]+$/, "");
|
|
388
388
|
}
|
|
389
|
+
function removeExtensionDeep(file) {
|
|
390
|
+
return file.replace(/\.[^/.]+/g, "");
|
|
391
|
+
}
|
|
389
392
|
function addExtension(filename, ext = ".js") {
|
|
390
393
|
let result = `${filename}`;
|
|
391
394
|
if (!extname(filename)) {
|
|
@@ -417,6 +420,7 @@ export {
|
|
|
417
420
|
isObject,
|
|
418
421
|
objectHash,
|
|
419
422
|
removeExtension,
|
|
423
|
+
removeExtensionDeep,
|
|
420
424
|
export_set as set
|
|
421
425
|
};
|
|
422
426
|
/*! Bundled license information:
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@weapp-core/shared",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.5-alpha.0",
|
|
5
5
|
"description": "@weapp-core/shared",
|
|
6
6
|
"author": "ice breaker <1324318532@qq.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -15,6 +15,17 @@
|
|
|
15
15
|
},
|
|
16
16
|
"keywords": [],
|
|
17
17
|
"sideEffects": false,
|
|
18
|
+
"weapp-vite-dev": {
|
|
19
|
+
"exports": {
|
|
20
|
+
".": {
|
|
21
|
+
"types": "./src/index.ts",
|
|
22
|
+
"default": "./src/index.ts"
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"main": "./src/index.ts",
|
|
26
|
+
"module": "./src/index.ts",
|
|
27
|
+
"types": "./src/index.ts"
|
|
28
|
+
},
|
|
18
29
|
"exports": {
|
|
19
30
|
".": {
|
|
20
31
|
"types": "./dist/index.d.ts",
|
|
@@ -31,6 +42,7 @@
|
|
|
31
42
|
"dependencies": {
|
|
32
43
|
"object-hash": "^3.0.0"
|
|
33
44
|
},
|
|
45
|
+
"devDependencies": {},
|
|
34
46
|
"scripts": {
|
|
35
47
|
"dev": "tsup --watch --sourcemap",
|
|
36
48
|
"build": "tsup",
|