🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

pear-pack

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pear-pack - npm Package Compare versions

Comparing version
1.1.0
to
1.1.1
+4
-4
index.js

@@ -11,3 +11,3 @@ 'use strict'

entry = '/boot.js',
target,
hosts,
builtins,

@@ -21,3 +21,3 @@ imports,

resolve,
target,
hosts,
builtins,

@@ -53,3 +53,3 @@ imports

let extensions
let conditions = opts.target.map((host) => [...conds, ...host.split('-')])
let conditions = opts.hosts.map((host) => [...conds, ...host.split('-')])

@@ -63,3 +63,3 @@ if (entry.type & lex.constants.ADDON) {

conditions,
hosts: opts.target,
hosts: opts.hosts,
linked: false,

@@ -66,0 +66,0 @@ ...opts

{
"name": "pear-pack",
"version": "1.1.0",
"version": "1.1.1",
"description": "",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -13,3 +13,3 @@ const test = require('brittle')

const result = await pearPack(drive, {
target: ['linux-x64']
hosts: ['linux-x64']
})

@@ -36,3 +36,3 @@

const result = await pearPack(drive, {
target: ['linux-x64']
hosts: ['linux-x64']
})

@@ -59,3 +59,3 @@

const result = await pearPack(drive, {
target: ['linux-x64']
hosts: ['linux-x64']
})

@@ -67,3 +67,3 @@

t.ok(
bundleStr.includes('".":"/../prebuilds/linux-x64/') &&
bundleStr.includes('".":"/prebuilds/linux-x64/') &&
bundleStr.includes('.node'),

@@ -80,3 +80,3 @@ 'bundle should include reference to native addon'

const result = await pearPack(drive, {
target: ['linux-x64']
hosts: ['linux-x64']
})

@@ -88,3 +88,3 @@

t.ok(
bundleStr.includes('".":"/../prebuilds/linux-x64/') &&
bundleStr.includes('".":"/prebuilds/linux-x64/') &&
bundleStr.includes('.bare'),

@@ -101,3 +101,3 @@ 'bundle should include reference to native addon'

const result = await pearPack(drive, {
target: ['linux-x64']
hosts: ['linux-x64']
})

@@ -121,3 +121,3 @@

entry: '/main.js',
target: ['linux-x64']
hosts: ['linux-x64']
})

@@ -144,3 +144,3 @@

await t.exception(
pearPack(drive, { entry: '/nonexistent.js', target: ['linux-x64'] }),
pearPack(drive, { entry: '/nonexistent.js', hosts: ['linux-x64'] }),
/nonexistent\.js/,

@@ -155,3 +155,3 @@ 'should throw error for missing entry file'

await t.exception(
pearPack(drive, { target: ['linux-x64'] }),
pearPack(drive, { hosts: ['linux-x64'] }),
/boot\.js/,

@@ -162,11 +162,11 @@ 'should throw error for missing entry file in empty directory'

test('multiple targets', async (t) => {
test('multiple hostss', async (t) => {
const drive = new Localdrive(path.join(dir, '/simple-require'))
const result = await pearPack(drive, {
target: ['darwin-x64', 'linux-x64', 'win32-x64']
hosts: ['darwin-x64', 'linux-x64', 'win32-x64']
})
t.ok(Buffer.isBuffer(result.bundle), 'should handle multiple targets')
t.ok(result.bundle.length > 0, 'multi-target bundle should have content')
t.ok(Buffer.isBuffer(result.bundle), 'should handle multiple hostss')
t.ok(result.bundle.length > 0, 'multi-hosts bundle should have content')

@@ -179,3 +179,3 @@ t.is(result.prebuilds.size, 0, 'should have no prebuilds')

const result = await pearPack(drive, {
target: ['linux-x64']
hosts: ['linux-x64']
})

@@ -193,3 +193,3 @@

const result = await pearPack(drive, {
target: ['linux-x64']
hosts: ['linux-x64']
})

@@ -196,0 +196,0 @@