Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Socket
Sign inDemoInstall

ipjs

Package Overview
Dependencies
Maintainers
1
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ipjs - npm Package Compare versions

Comparing version 4.0.0 to 5.0.0

test/fixtures/pkg-kitchensink/output-main/cjs/src/browser.js

2

package.json
{
"name": "ipjs",
"version": "4.0.0",
"version": "5.0.0",
"description": "Universal JavaScript build and packaging system",

@@ -5,0 +5,0 @@ "main": "src/build.js",

@@ -28,4 +28,7 @@ import packager from './package/index.js'

}
run.schema = { tests: false }
run.schema = {
tests: false,
main: false
}
export default run

@@ -21,3 +21,3 @@ import { promises as fs } from 'fs'

class Package {
constructor ({ cwd, hooks, tests }) {
constructor ({ cwd, hooks, tests, main }) {
this.cwd = cwd

@@ -29,2 +29,3 @@ this.hooks = hooks || {}

this.includeTests = tests
this.includeMain = main
}

@@ -186,3 +187,7 @@

delete json.type
json.main = `./${join('./cjs', json.main || './index.js')}`
if (this.includeMain) {
json.main = `./${join('./cjs', json.main || './index.js')}`
} else {
delete json.main
}
json.browser = {}

@@ -189,0 +194,0 @@ json.exports = {}

@@ -5,3 +5,2 @@ {

"description": "",
"main": "./cjs/src/index.js",
"scripts": {

@@ -8,0 +7,0 @@ "test": "echo \"Error: no test specified\" && exit 1"

@@ -5,3 +5,2 @@ {

"description": "",
"main": "./cjs/src/index.js",
"scripts": {

@@ -8,0 +7,0 @@ "test": "echo \"Error: no test specified\" && exit 1"

@@ -63,2 +63,11 @@ import build from '../src/build.js'

})
test('pkg-kitchensink w/ main', async test => {
const dist = pathToFileURL(await tempy.directory())
test.after(() => rmtree(fileURLToPath(dist)))
const opts = { cwd, dist, main: true }
await build(opts)
await verify(new URL('./output-main', url), dist)
await verify(dist, new URL('./output-main', url))
})
}
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