Comparing version 5.0.0 to 5.0.1
{ | ||
"name": "ipjs", | ||
"version": "5.0.0", | ||
"version": "5.0.1", | ||
"description": "Universal JavaScript build and packaging system", | ||
@@ -5,0 +5,0 @@ "main": "src/build.js", |
@@ -193,2 +193,3 @@ import { promises as fs } from 'fs' | ||
const _join = (...args) => './' + join(...args) | ||
const esmBrowser = {} | ||
for (const [key, ex] of Object.entries(this.exports)) { | ||
@@ -203,2 +204,7 @@ const _import = this.relative(await ex.import) | ||
json.browser[key] = _join('cjs', _browser) | ||
if (_import !== _browser) { | ||
json.browser[_join('esm', _import)] = _join('esm', _browser) | ||
json.browser[_join('cjs', _import)] = _join('cjs', _browser) | ||
esmBrowser[_import] = _browser | ||
} | ||
} | ||
@@ -211,4 +217,7 @@ if (json.exports.import) { | ||
pending.push(writeFile(new URL(dist + '/package.json'), JSON.stringify(json, null, 2))) | ||
const typeModule = '{ "type" : "module" }' | ||
pending.push(writeFile(new URL(dist + '/esm/package.json'), typeModule)) | ||
const typeModule = { | ||
type: 'module', | ||
browser: esmBrowser | ||
} | ||
pending.push(writeFile(new URL(dist + '/esm/package.json'), JSON.stringify(typeModule, null, 2))) | ||
await Promise.all(pending) | ||
@@ -215,0 +224,0 @@ files = await files |
@@ -1,1 +0,6 @@ | ||
{ "type" : "module" } | ||
{ | ||
"type": "module", | ||
"browser": { | ||
"./src/index.js": "./src/browser.js" | ||
} | ||
} |
@@ -26,4 +26,6 @@ { | ||
".": "./cjs/src/browser.js", | ||
"./esm/src/index.js": "./esm/src/browser.js", | ||
"./cjs/src/index.js": "./cjs/src/browser.js", | ||
"./secondary": "./cjs/src/secondary.js" | ||
} | ||
} |
@@ -1,1 +0,6 @@ | ||
{ "type" : "module" } | ||
{ | ||
"type": "module", | ||
"browser": { | ||
"./src/index.js": "./src/browser.js" | ||
} | ||
} |
@@ -25,4 +25,6 @@ { | ||
".": "./cjs/src/browser.js", | ||
"./esm/src/index.js": "./esm/src/browser.js", | ||
"./cjs/src/index.js": "./cjs/src/browser.js", | ||
"./secondary": "./cjs/src/secondary.js" | ||
} | ||
} |
@@ -1,1 +0,6 @@ | ||
{ "type" : "module" } | ||
{ | ||
"type": "module", | ||
"browser": { | ||
"./src/index.js": "./src/browser.js" | ||
} | ||
} |
@@ -25,4 +25,6 @@ { | ||
".": "./cjs/src/browser.js", | ||
"./esm/src/index.js": "./esm/src/browser.js", | ||
"./cjs/src/index.js": "./cjs/src/browser.js", | ||
"./secondary": "./cjs/src/secondary.js" | ||
} | ||
} |
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
54219
1457