@intlify/bundle-utils
Advanced tools
Comparing version 3.3.0 to 3.4.0
export declare type InstalledPackage = 'vue-i18n' | 'petite-vue-i18n'; | ||
export declare function checkInstallPackage(pkg: string, debug: Function): InstalledPackage; | ||
export declare function checkVueI18nBridgeInstallPackage(debug: Function): boolean; | ||
export declare function isInstalledVue2(debug: Function): boolean; | ||
export declare function isInstalledVue3(debug: Function): boolean; | ||
declare type VueI18nVersion = '8' | '9' | 'unknown' | ''; | ||
export declare function getVueI18nVersion(debug: Function): VueI18nVersion; | ||
export declare function loadModule(moduleName: string, debug: Function): any; | ||
export {}; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.loadModule = exports.isInstalledVue3 = exports.isInstalledVue2 = exports.checkVueI18nBridgeInstallPackage = exports.checkInstallPackage = void 0; | ||
exports.loadModule = exports.getVueI18nVersion = exports.checkVueI18nBridgeInstallPackage = exports.checkInstallPackage = void 0; | ||
// eslint-disable-next-line @typescript-eslint/ban-types | ||
@@ -44,12 +44,16 @@ function checkInstallPackage(pkg, debug) { | ||
exports.checkVueI18nBridgeInstallPackage = checkVueI18nBridgeInstallPackage; | ||
function isInstalledVue2(debug) { | ||
const vue = loadModule('vue', debug); | ||
return vue != null && vue.version != null && vue.version.startsWith('2.'); | ||
function getVueI18nVersion(debug) { | ||
const VueI18n = loadModule('vue-i18n', debug); | ||
if (VueI18n == null) { | ||
return ''; | ||
} | ||
if (VueI18n.version && VueI18n.version.startsWith('8.')) { | ||
return '8'; | ||
} | ||
if (VueI18n.VERSION && VueI18n.VERSION.startsWith('9.')) { | ||
return '9'; | ||
} | ||
return 'unknown'; | ||
} | ||
exports.isInstalledVue2 = isInstalledVue2; | ||
function isInstalledVue3(debug) { | ||
const vue = loadModule('vue', debug); | ||
return vue != null && vue.version != null && vue.version.startsWith('3.'); | ||
} | ||
exports.isInstalledVue3 = isInstalledVue3; | ||
exports.getVueI18nVersion = getVueI18nVersion; | ||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
@@ -56,0 +60,0 @@ function loadModule(moduleName, debug) { |
export { CodeGenOptions, CodeGenResult, DevEnv } from './codegen'; | ||
export { generate as generateJSON } from './json'; | ||
export { generate as generateYAML } from './yaml'; | ||
export { isInstalledVue2, isInstalledVue3, checkInstallPackage, checkVueI18nBridgeInstallPackage, InstalledPackage } from './deps'; | ||
export { getVueI18nVersion, checkInstallPackage, checkVueI18nBridgeInstallPackage, InstalledPackage } from './deps'; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.checkVueI18nBridgeInstallPackage = exports.checkInstallPackage = exports.isInstalledVue3 = exports.isInstalledVue2 = exports.generateYAML = exports.generateJSON = void 0; | ||
exports.checkVueI18nBridgeInstallPackage = exports.checkInstallPackage = exports.getVueI18nVersion = exports.generateYAML = exports.generateJSON = void 0; | ||
var json_1 = require("./json"); | ||
@@ -9,5 +9,4 @@ Object.defineProperty(exports, "generateJSON", { enumerable: true, get: function () { return json_1.generate; } }); | ||
var deps_1 = require("./deps"); | ||
Object.defineProperty(exports, "isInstalledVue2", { enumerable: true, get: function () { return deps_1.isInstalledVue2; } }); | ||
Object.defineProperty(exports, "isInstalledVue3", { enumerable: true, get: function () { return deps_1.isInstalledVue3; } }); | ||
Object.defineProperty(exports, "getVueI18nVersion", { enumerable: true, get: function () { return deps_1.getVueI18nVersion; } }); | ||
Object.defineProperty(exports, "checkInstallPackage", { enumerable: true, get: function () { return deps_1.checkInstallPackage; } }); | ||
Object.defineProperty(exports, "checkVueI18nBridgeInstallPackage", { enumerable: true, get: function () { return deps_1.checkVueI18nBridgeInstallPackage; } }); |
{ | ||
"name": "@intlify/bundle-utils", | ||
"description": "Bundle utilities for Intlify project", | ||
"version": "3.3.0", | ||
"version": "3.4.0", | ||
"author": { | ||
@@ -6,0 +6,0 @@ "name": "kazuya kawaguchi", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
945
42772