Comparing version 0.5.16 to 0.5.17
@@ -9,13 +9,13 @@ interface ResolveOptions { | ||
*/ | ||
declare function resolveSync(id: string, opts?: ResolveOptions): string; | ||
declare function resolve(id: string, opts?: ResolveOptions): Promise<string>; | ||
declare function resolveSync(id: string, options?: ResolveOptions): string; | ||
declare function resolve(id: string, options?: ResolveOptions): Promise<string>; | ||
/** | ||
* @deprecated please use `resolvePath` instead of `resolvePathSync` | ||
*/ | ||
declare function resolvePathSync(id: string, opts?: ResolveOptions): string; | ||
declare function resolvePath(id: string, opts?: ResolveOptions): Promise<any>; | ||
declare function createResolve(defaults?: ResolveOptions): (id: string, url?: ResolveOptions['url']) => Promise<string>; | ||
declare function resolvePathSync(id: string, options?: ResolveOptions): string; | ||
declare function resolvePath(id: string, options?: ResolveOptions): Promise<any>; | ||
declare function createResolve(defaults?: ResolveOptions): (id: string, url?: ResolveOptions["url"]) => Promise<string>; | ||
interface ESMImport { | ||
type: 'static' | 'dynamic'; | ||
type: "static" | "dynamic"; | ||
code: string; | ||
@@ -26,3 +26,3 @@ start: number; | ||
interface StaticImport extends ESMImport { | ||
type: 'static'; | ||
type: "static"; | ||
imports: string; | ||
@@ -39,8 +39,8 @@ specifier: string; | ||
interface DynamicImport extends ESMImport { | ||
type: 'dynamic'; | ||
type: "dynamic"; | ||
expression: string; | ||
} | ||
interface ESMExport { | ||
_type?: 'declaration' | 'named' | 'default' | 'star'; | ||
type: 'declaration' | 'named' | 'default' | 'star'; | ||
_type?: "declaration" | "named" | "default" | "star"; | ||
type: "declaration" | "named" | "default" | "star"; | ||
code: string; | ||
@@ -54,3 +54,3 @@ start: number; | ||
interface DeclarationExport extends ESMExport { | ||
type: 'declaration'; | ||
type: "declaration"; | ||
declaration: string; | ||
@@ -60,3 +60,3 @@ name: string; | ||
interface NamedExport extends ESMExport { | ||
type: 'named'; | ||
type: "named"; | ||
exports: string; | ||
@@ -67,3 +67,3 @@ names: string[]; | ||
interface DefaultExport extends ESMExport { | ||
type: 'default'; | ||
type: "default"; | ||
} | ||
@@ -78,3 +78,3 @@ declare const ESM_STATIC_IMPORT_RE: RegExp; | ||
declare function findExportNames(code: string): string[]; | ||
declare function resolveModuleExportNames(id: string, opts?: ResolveOptions): Promise<string[]>; | ||
declare function resolveModuleExportNames(id: string, options?: ResolveOptions): Promise<string[]>; | ||
@@ -92,6 +92,6 @@ interface CommonjsContext { | ||
} | ||
declare function loadModule(id: string, opts?: EvaluateOptions): Promise<any>; | ||
declare function evalModule(code: string, opts?: EvaluateOptions): Promise<any>; | ||
declare function transformModule(code: string, opts?: EvaluateOptions): Promise<string>; | ||
declare function resolveImports(code: string, opts?: EvaluateOptions): Promise<string>; | ||
declare function loadModule(id: string, options?: EvaluateOptions): Promise<any>; | ||
declare function evalModule(code: string, options?: EvaluateOptions): Promise<any>; | ||
declare function transformModule(code: string, options?: EvaluateOptions): Promise<string>; | ||
declare function resolveImports(code: string, options?: EvaluateOptions): Promise<string>; | ||
@@ -118,3 +118,3 @@ declare function hasESMSyntax(code: string): boolean; | ||
} | ||
declare function isValidNodeImport(id: string, _opts?: ValidNodeImportOptions): Promise<boolean>; | ||
declare function isValidNodeImport(id: string, _options?: ValidNodeImportOptions): Promise<boolean>; | ||
@@ -128,4 +128,4 @@ declare function fileURLToPath(id: string): string; | ||
declare function isNodeBuiltin(id?: string): boolean; | ||
declare function getProtocol(id: string): string | null; | ||
declare function getProtocol(id: string): string | undefined; | ||
export { CommonjsContext, DYNAMIC_IMPORT_RE, DeclarationExport, DefaultExport, DynamicImport, ESMExport, ESMImport, ESM_STATIC_IMPORT_RE, EXPORT_DECAL_RE, EvaluateOptions, NamedExport, ParsedStaticImport, ResolveOptions, StaticImport, ValidNodeImportOptions, createCommonJS, createResolve, detectSyntax, evalModule, fileURLToPath, findDynamicImports, findExportNames, findExports, findStaticImports, getProtocol, hasCJSSyntax, hasESMSyntax, interopDefault, isNodeBuiltin, isValidNodeImport, loadModule, loadURL, normalizeid, parseStaticImport, resolve, resolveImports, resolveModuleExportNames, resolvePath, resolvePathSync, resolveSync, sanitizeFilePath, sanitizeURIComponent, toDataURL, transformModule }; |
{ | ||
"name": "mlly", | ||
"version": "0.5.16", | ||
"version": "0.5.17", | ||
"description": "Missing ECMAScript module utils for Node.js", | ||
@@ -20,24 +20,24 @@ "repository": "unjs/mlly", | ||
"dependencies": { | ||
"acorn": "^8.8.0", | ||
"pathe": "^0.3.8", | ||
"pkg-types": "^0.3.5", | ||
"ufo": "^0.8.5" | ||
"acorn": "^8.8.1", | ||
"pathe": "^1.0.0", | ||
"pkg-types": "^1.0.0", | ||
"ufo": "^1.0.0" | ||
}, | ||
"devDependencies": { | ||
"@nuxtjs/eslint-config-typescript": "latest", | ||
"@types/node": "latest", | ||
"@vitest/coverage-c8": "^0.23.4", | ||
"c8": "latest", | ||
"eslint": "latest", | ||
"jiti": "latest", | ||
"standard-version": "latest", | ||
"typescript": "^4.8.3", | ||
"unbuild": "latest", | ||
"vitest": "latest" | ||
"@types/node": "^18.11.9", | ||
"@vitest/coverage-c8": "^0.25.2", | ||
"c8": "^7.12.0", | ||
"eslint": "^8.27.0", | ||
"eslint-config-unjs": "^0.0.2", | ||
"jiti": "^1.16.0", | ||
"standard-version": "^9.5.0", | ||
"typescript": "^4.8.4", | ||
"unbuild": "^0.9.4", | ||
"vitest": "^0.25.2" | ||
}, | ||
"packageManager": "pnpm@7.12.1", | ||
"packageManager": "pnpm@7.14.1", | ||
"scripts": { | ||
"build": "unbuild", | ||
"dev": "vitest", | ||
"lint": "eslint --ext .ts src", | ||
"lint": "eslint --ext .ts src test", | ||
"release": "pnpm test && pnpm build && standard-version && pnpm publish && git push --follow-tags", | ||
@@ -44,0 +44,0 @@ "test": "pnpm lint && vitest run" |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
106400
2844
+ Addedconfbox@0.1.7(transitive)
+ Addedmlly@1.7.1(transitive)
+ Addedpathe@1.1.2(transitive)
+ Addedpkg-types@1.2.0(transitive)
+ Addedufo@1.5.4(transitive)
- Removedjsonc-parser@3.3.1(transitive)
- Removedpathe@0.3.9(transitive)
- Removedpkg-types@0.3.6(transitive)
- Removedufo@0.8.6(transitive)
Updatedacorn@^8.8.1
Updatedpathe@^1.0.0
Updatedpkg-types@^1.0.0
Updatedufo@^1.0.0