Socket
Socket
Sign inDemoInstall

mlly

Package Overview
Dependencies
Maintainers
1
Versions
76
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mlly - npm Package Compare versions

Comparing version 1.5.0 to 1.6.0

6

dist/index.d.ts

@@ -18,3 +18,3 @@ interface ResolveOptions {

name: string;
subpath: string;
subpath: string | undefined;
};

@@ -54,2 +54,3 @@ /** Reverse engineer a subpath export if possible */

type: "declaration" | "named" | "default" | "star";
declarationType?: "let" | "var" | "const" | "enum" | "const enum" | "class" | "function" | "async function";
code: string;

@@ -135,2 +136,3 @@ start: number;

declare function fileURLToPath(id: string | URL): string;
declare function pathToFileURL(id: string | URL): string;
declare function sanitizeURIComponent(name?: string, replacement?: string): string;

@@ -144,2 +146,2 @@ declare function sanitizeFilePath(filePath?: string): string;

export { type CommonjsContext, DYNAMIC_IMPORT_RE, type DeclarationExport, type DefaultExport, type DetectSyntaxOptions, type DynamicImport, type ESMExport, type ESMImport, ESM_STATIC_IMPORT_RE, EXPORT_DECAL_RE, EXPORT_DECAL_TYPE_RE, type EvaluateOptions, type NamedExport, type ParsedStaticImport, type ResolveOptions, type StaticImport, type TypeImport, type ValidNodeImportOptions, createCommonJS, createResolve, detectSyntax, evalModule, fileURLToPath, findDynamicImports, findExportNames, findExports, findStaticImports, findTypeExports, findTypeImports, getProtocol, hasCJSSyntax, hasESMSyntax, interopDefault, isNodeBuiltin, isValidNodeImport, loadModule, loadURL, lookupNodeModuleSubpath, normalizeid, parseNodeModulePath, parseStaticImport, parseTypeImport, resolve, resolveImports, resolveModuleExportNames, resolvePath, resolvePathSync, resolveSync, sanitizeFilePath, sanitizeURIComponent, toDataURL, transformModule };
export { type CommonjsContext, DYNAMIC_IMPORT_RE, type DeclarationExport, type DefaultExport, type DetectSyntaxOptions, type DynamicImport, type ESMExport, type ESMImport, ESM_STATIC_IMPORT_RE, EXPORT_DECAL_RE, EXPORT_DECAL_TYPE_RE, type EvaluateOptions, type NamedExport, type ParsedStaticImport, type ResolveOptions, type StaticImport, type TypeImport, type ValidNodeImportOptions, createCommonJS, createResolve, detectSyntax, evalModule, fileURLToPath, findDynamicImports, findExportNames, findExports, findStaticImports, findTypeExports, findTypeImports, getProtocol, hasCJSSyntax, hasESMSyntax, interopDefault, isNodeBuiltin, isValidNodeImport, loadModule, loadURL, lookupNodeModuleSubpath, normalizeid, parseNodeModulePath, parseStaticImport, parseTypeImport, pathToFileURL, resolve, resolveImports, resolveModuleExportNames, resolvePath, resolvePathSync, resolveSync, sanitizeFilePath, sanitizeURIComponent, toDataURL, transformModule };
{
"name": "mlly",
"version": "1.5.0",
"version": "1.6.0",
"description": "Missing ECMAScript module utils for Node.js",

@@ -26,3 +26,4 @@ "repository": "unjs/mlly",

"release": "pnpm test && pnpm build && changelogen --release && npm publish && git push --follow-tags",
"test": "pnpm lint && vitest run"
"test": "pnpm lint && pnpm test:types && vitest run",
"test:types": "tsc --noEmit"
},

@@ -36,4 +37,4 @@ "dependencies": {

"devDependencies": {
"@types/node": "^20.11.0",
"@vitest/coverage-v8": "^1.1.3",
"@types/node": "^20.11.16",
"@vitest/coverage-v8": "^1.2.2",
"changelogen": "^0.5.5",

@@ -44,8 +45,9 @@ "eslint": "^8.56.0",

"jiti": "^1.21.0",
"prettier": "^3.1.1",
"prettier": "^3.2.4",
"std-env": "^3.7.0",
"typescript": "^5.3.3",
"unbuild": "^2.0.0",
"vitest": "^1.1.3"
"vitest": "^1.2.2"
},
"packageManager": "pnpm@8.14.0"
"packageManager": "pnpm@8.15.1"
}

@@ -427,2 +427,16 @@ # mlly

### `pathToFileURL`
Similar to [url.pathToFileURL](https://nodejs.org/api/url.html#urlpathtofileurlpath) but also handles `URL` input and returns a **string** with `file://` protocol.
```js
import { pathToFileURL } from "mlly";
// /foo/bar.js
console.log(pathToFileURL("foo/bar.js"));
// C:/path
console.log(pathToFileURL("C:\\path"));
```
### `normalizeid`

@@ -429,0 +443,0 @@

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

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc