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 0.1.6 to 0.1.7

2

CHANGELOG.md

@@ -5,2 +5,4 @@ # Changelog

### [0.1.7](https://github.com/unjs/mlly/compare/v0.1.6...v0.1.7) (2021-07-23)
### [0.1.6](https://github.com/unjs/mlly/compare/v0.1.5...v0.1.6) (2021-07-23)

@@ -7,0 +9,0 @@

2

lib/index.d.ts

@@ -21,3 +21,3 @@ // CommonJS

export function resolvePathSync (id: string, opts: ResolveOptions) : string
export function createResolve (defaults: ResolveOptions) : (id: string, from: string | URL) => Promise<string>
export function createResolve (defaults: ResolveOptions) : (id: string, url: string | URL) => Promise<string>
export function resolveImports (code: string, opts: ResolveOptions) : Promise<string>

@@ -24,0 +24,0 @@

{
"name": "mlly",
"version": "0.1.6",
"version": "0.1.7",
"description": "Missing ECMAScript module utils for Node.js",

@@ -5,0 +5,0 @@ "repository": "unjs/mlly",

@@ -51,3 +51,3 @@ # 🤝 mlly

// file:///home/user/project/module.mjs
console.log(await resolve('./module.mjs', { from: import.meta.url }))
console.log(await resolve('./module.mjs', { url: import.meta.url }))
```

@@ -69,3 +69,3 @@

// //home/user/project/module.mjs
console.log(await resolvePath('./module.mjs', { from: import.meta.url }))
console.log(await resolvePath('./module.mjs', { url: import.meta.url }))
```

@@ -80,3 +80,3 @@

const _resolve = createResolve({ from: import.meta.url })
const _resolve = createResolve({ url: import.meta.url })

@@ -92,3 +92,3 @@ // file:///home/user/project/module.mjs

import.meta.resolve = createResolve({ from: import.meta.url })
import.meta.resolve = createResolve({ url: import.meta.url })
```

@@ -104,3 +104,3 @@

// import foo from 'file:///home/user/project/bar.mjs'
console.log(await resolveImports(`import foo from './bar.mjs'`, { from: import.meta.url }))
console.log(await resolveImports(`import foo from './bar.mjs'`, { url: import.meta.url }))
```

@@ -122,3 +122,3 @@

console.log(reverse('!emosewa si sj'))
`, { from: import.meta.url })
`, { url: import.meta.url })
```

@@ -138,3 +138,3 @@

await loadModule('./hello.mjs', { from: import.meta.url })
await loadModule('./hello.mjs', { url: import.meta.url })
```

@@ -191,3 +191,3 @@

const url = await resolve('./index.mjs', { from: import.meta.url })
const url = await resolve('./index.mjs', { url: import.meta.url })
console.log(await loadURL(url))

@@ -194,0 +194,0 @@ ```

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