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

speculate

Package Overview
Dependencies
Maintainers
51
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

speculate - npm Package Compare versions

Comparing version 4.0.1 to 5.0.0

6

lib/files.js

@@ -6,7 +6,7 @@ 'use strict';

module.exports = {
serviceFileName: function (pkg) {
return `${pkg.name}.service`;
serviceFileName: function (name) {
return `${name}.service`;
},
serviceFile: function (root, pkg) {
return path.resolve(root, this.serviceFileName(pkg));
return path.resolve(root, this.serviceFileName(pkg.name));
},

@@ -13,0 +13,0 @@ specsDirectory: function (root) {

@@ -43,5 +43,5 @@ 'use strict';

function getArchiveWhitelist(pkg) {
function getArchiveWhitelist(pkg, customName) {
return {
service: files.serviceFileName(pkg),
service: files.serviceFileName(customName || pkg.name),
main: pkg.main,

@@ -63,3 +63,3 @@ files: pkg.files

const specFile = generateSpecFile(specsDirectory, customPackage, release);
const archiveWhitelist = getArchiveWhitelist(pkg);
const archiveWhitelist = getArchiveWhitelist(pkg, customName);

@@ -66,0 +66,0 @@ await archiver.compress(root, sourcesArchive, archiveWhitelist);

{
"name": "speculate",
"version": "4.0.1",
"version": "5.0.0",
"description": "Automatically generates an RPM Spec file for your Node.js project",

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

@@ -115,3 +115,3 @@ 'use strict';

main: 'index.js',
service: 'my-cool-api.service'
service: 'penguin.service'
}

@@ -139,2 +139,20 @@ );

it('creates the service file with a custom name if specified and "files" defined', async () => {
await generate('/path/to/project', pkgWithWhitelist, null, 'penguin');
sandbox.assert.calledWith(
archiver.compress,
'/path/to/project',
'/path/to/project/SOURCES/penguin.tar.gz',
{
main: 'server.js',
files: [
'lib',
'routes',
'index.js'
],
service: 'penguin.service'
}
);
});
it('creates the service file with a custom name if specified', async () => {

@@ -141,0 +159,0 @@ await generate('/path/to/project', pkg, 1, 'penguin');

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