@intlify/bundle-utils 3.4.0 → 4.0.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/index.mjs +1 -0
- package/lib/codegen.d.ts +1 -1
- package/lib/deps.d.ts +2 -2
- package/package.json +15 -4
- package/lib/check.d.ts +0 -3
- package/lib/check.js +0 -43
- package/lib/errors.d.ts +0 -2
- package/lib/errors.js +0 -6
package/index.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './lib/index.js'
|
package/lib/codegen.d.ts
CHANGED
package/lib/deps.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type InstalledPackage = 'vue-i18n' | 'petite-vue-i18n';
|
|
2
2
|
export declare function checkInstallPackage(pkg: string, debug: Function): InstalledPackage;
|
|
3
3
|
export declare function checkVueI18nBridgeInstallPackage(debug: Function): boolean;
|
|
4
|
-
|
|
4
|
+
type VueI18nVersion = '8' | '9' | 'unknown' | '';
|
|
5
5
|
export declare function getVueI18nVersion(debug: Function): VueI18nVersion;
|
|
6
6
|
export declare function loadModule(moduleName: string, debug: Function): any;
|
|
7
7
|
export {};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@intlify/bundle-utils",
|
|
3
3
|
"description": "Bundle utilities for Intlify project",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "4.0.0",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "kazuya kawaguchi",
|
|
7
7
|
"email": "kawakazu80@gmail.com"
|
|
@@ -28,11 +28,23 @@
|
|
|
28
28
|
"node": ">= 12"
|
|
29
29
|
},
|
|
30
30
|
"files": [
|
|
31
|
-
"lib"
|
|
31
|
+
"lib",
|
|
32
|
+
"index.mjs"
|
|
32
33
|
],
|
|
33
34
|
"homepage": "https://github.com/intlify/bundle-tools/blob/main/packages/bundle-utils/README.md",
|
|
34
35
|
"license": "MIT",
|
|
35
36
|
"main": "lib/index.js",
|
|
37
|
+
"module": "./index.mjs",
|
|
38
|
+
"types": "lib/index.d.ts",
|
|
39
|
+
"exports": {
|
|
40
|
+
".": {
|
|
41
|
+
"import": "./index.mjs",
|
|
42
|
+
"require": "./lib/index.js",
|
|
43
|
+
"types": "./lib/index.d.ts"
|
|
44
|
+
},
|
|
45
|
+
"./lib/*": "./lib/*",
|
|
46
|
+
"./package.json": "./package.json"
|
|
47
|
+
},
|
|
36
48
|
"repository": {
|
|
37
49
|
"type": "git",
|
|
38
50
|
"url": "git+https://github.com/intlify/bundle-tools.git",
|
|
@@ -45,6 +57,5 @@
|
|
|
45
57
|
"watch": "tsc -p . --watch",
|
|
46
58
|
"changelog": "jiti ../../scripts/changelog.ts",
|
|
47
59
|
"release": "jiti ../../scripts/release.ts"
|
|
48
|
-
}
|
|
49
|
-
"types": "lib/index.d.ts"
|
|
60
|
+
}
|
|
50
61
|
}
|
package/lib/check.d.ts
DELETED
package/lib/check.js
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.checkVueI18nBridgeInstallPackage = exports.checkInstallPackage = void 0;
|
|
4
|
-
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
5
|
-
function checkInstallPackage(pkg, debug) {
|
|
6
|
-
let installedVueI18n = false;
|
|
7
|
-
try {
|
|
8
|
-
debug(`vue-i18n load path: ${require.resolve('vue-i18n')}`);
|
|
9
|
-
installedVueI18n = true;
|
|
10
|
-
}
|
|
11
|
-
catch (e) {
|
|
12
|
-
debug(`cannot find 'vue-i18n'`, e);
|
|
13
|
-
}
|
|
14
|
-
let installedPetiteVueI18n = false;
|
|
15
|
-
try {
|
|
16
|
-
debug(`petite-vue-i18n load path: ${require.resolve('petite-vue-i18n')}`);
|
|
17
|
-
installedPetiteVueI18n = true;
|
|
18
|
-
}
|
|
19
|
-
catch (e) {
|
|
20
|
-
debug(`cannot find 'petite-vue-i18n'`, e);
|
|
21
|
-
}
|
|
22
|
-
if (installedVueI18n) {
|
|
23
|
-
return 'vue-i18n';
|
|
24
|
-
}
|
|
25
|
-
if (installedPetiteVueI18n) {
|
|
26
|
-
return 'petite-vue-i18n';
|
|
27
|
-
}
|
|
28
|
-
throw new Error(`${pkg} requires 'vue-i18n' or 'petite-vue-i18n' to be present in the dependency tree.`);
|
|
29
|
-
}
|
|
30
|
-
exports.checkInstallPackage = checkInstallPackage;
|
|
31
|
-
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
32
|
-
function checkVueI18nBridgeInstallPackage(debug) {
|
|
33
|
-
let ret = false;
|
|
34
|
-
try {
|
|
35
|
-
debug(`vue-i18n-bridge load path: ${require.resolve('vue-i18n-bridge')}`);
|
|
36
|
-
ret = true;
|
|
37
|
-
}
|
|
38
|
-
catch (e) {
|
|
39
|
-
debug(`cannot find 'vue-i18n-bridge'`, e);
|
|
40
|
-
}
|
|
41
|
-
return ret;
|
|
42
|
-
}
|
|
43
|
-
exports.checkVueI18nBridgeInstallPackage = checkVueI18nBridgeInstallPackage;
|
package/lib/errors.d.ts
DELETED