New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@asset-pipe/common

Package Overview
Dependencies
Maintainers
4
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@asset-pipe/common - npm Package Compare versions

Comparing version 4.0.0-alpha.1 to 4.0.0-alpha.2

2

package.json
{
"name": "@asset-pipe/common",
"version": "4.0.0-alpha.1",
"version": "4.0.0-alpha.2",
"description": "",

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

@@ -26,4 +26,3 @@ {

"minLength": 7,
"pattern": "^https?://[a-zA-Z0-9-_./]+(:[0-9]+)?",
"default": ""
"pattern": "^https?://[a-zA-Z0-9-_./]+(:[0-9]+)?"
},

@@ -120,2 +119,10 @@ "js": {

"default": {}
},
"import-map": {
"type": "array",
"items": {
"type": "string",
"minLength": 7,
"pattern": "^https?://[a-zA-Z0-9-_./]+(:[0-9]+)?"
}
}

@@ -122,0 +129,0 @@ },

@@ -12,8 +12,8 @@ const { test } = require('tap');

input: './assets/scripts.js',
options: { async: true, defer: true },
options: { async: true, defer: true }
},
css: {
input: './assets/styles.css',
options: {},
},
options: {}
}
});

@@ -29,3 +29,3 @@ t.equal(result.error, false);

version: '',
server: '',
server: ''
});

@@ -43,3 +43,3 @@

version: '',
server: '',
server: ''
});

@@ -57,3 +57,3 @@

version: '1.0.0',
server: '',
server: ''
});

@@ -71,3 +71,3 @@

version: '1.0.0',
server: '',
server: ''
});

@@ -85,3 +85,3 @@

version: '1.0.0',
server: 'asdasdasdasd',
server: 'asdasdasdasd'
});

@@ -102,3 +102,3 @@

version: '1.0.0',
server: 'http://localhost:4001',
server: 'http://localhost:4001'
});

@@ -113,3 +113,3 @@

js: { input: '', options: {} },
css: { input: '', options: {} },
css: { input: '', options: {} }
});

@@ -129,4 +129,4 @@ t.end();

async: true,
defer: true,
},
defer: true
}
},

@@ -136,5 +136,5 @@ css: {

options: {
crossorigin: 'etc etc',
},
},
crossorigin: 'etc etc'
}
}
});

@@ -152,4 +152,4 @@

async: true,
defer: true,
},
defer: true
}
},

@@ -159,7 +159,105 @@ css: {

options: {
crossorigin: 'etc etc',
crossorigin: 'etc etc'
}
}
});
t.end();
});
test('import-map field invalid type', t => {
const result = assets({
organisation: 'my-org',
name: 'my-app',
version: '1.0.0',
server: 'http://localhost:4001',
'import-map': 'invalid'
});
t.equal(
result.error[0].message,
'should be array',
'invalid import map type errors'
);
t.end();
});
test('import-map field invalid array entry', t => {
const result = assets({
organisation: 'my-org',
name: 'my-app',
version: '1.0.0',
server: 'http://localhost:4001',
'import-map': ['invalid']
});
t.equal(
result.error[0].message,
'should match pattern "^https?://[a-zA-Z0-9-_./]+(:[0-9]+)?"',
'invalid import map array entry errors'
);
t.end();
});
test('import-map field valid', t => {
const result = assets({
organisation: 'my-org',
name: 'my-app',
version: '1.0.0',
server: 'http://localhost:4001',
'import-map': ['http://localhost:4001/finn/map/buzz/v1']
});
t.equal(result.error, false, 'no errors in result');
t.same(
result.value,
{
organisation: 'my-org',
name: 'my-app',
version: '1.0.0',
server: 'http://localhost:4001',
js: {
input: '',
options: {}
},
css: {
input: '',
options: {}
},
'import-map': ['http://localhost:4001/finn/map/buzz/v1']
},
'result.value matches output'
);
t.end();
});
test('import-map field valid empty array', t => {
const result = assets({
organisation: 'my-org',
name: 'my-app',
version: '1.0.0',
server: 'http://localhost:4001',
'import-map': []
});
t.equal(result.error, false, 'result does not return error');
t.same(
result.value,
{
organisation: 'my-org',
name: 'my-app',
version: '1.0.0',
server: 'http://localhost:4001',
js: {
input: '',
options: {}
},
css: {
input: '',
options: {}
},
'import-map': []
},
'result.value matches expected object'
);
t.end();
});
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