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

speculate

Package Overview
Dependencies
Maintainers
2
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 1.4.0 to 1.5.0

test/fixtures/my-cool-api-with-node-version.json

5

lib/spec.js

@@ -24,2 +24,6 @@ var hogan = require('hogan.js');

function getNodeVersion(pkg) {
return _.get(pkg, 'spec.nodeVersion');
}
function getExecutableFiles(pkg) {

@@ -50,2 +54,3 @@ var name = pkg.name;

postInstallCommands: getPostInstallCommands(pkg),
nodeVersion: getNodeVersion(pkg),
version: pkg.version,

@@ -52,0 +57,0 @@ license: pkg.license,

2

package.json
{
"name": "speculate",
"version": "1.4.0",
"version": "1.5.0",
"description": "Automatically generates an RPM Spec file for your Node.js project",

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

@@ -116,3 +116,3 @@ # speculate

If for some reason you need to package your dev dependencies with your production code you can explicity tell speculate not to prune by adding the following to your package.json:
If for some reason you need to package your dev dependencies with your production code you can explicity tell speculate not to prune by adding the following to your `package.json`:

@@ -141,6 +141,17 @@ ```json

The spec file that speculate generates _isn't_ tied to a particular Node version. It simply requires the `nodejs` package. It's up to you to make the package available when you install the RPM using `yum`.
By default, the spec file that speculate generates _isn't_ tied to a particular Node version. It simply requires the `nodejs` package. It's up to you to make the package available when you install the RPM using `yum`.
We **strongly recommend** that you use the [Nodesource binary distributions](https://github.com/nodesource/distributions) to install a modern version of Node.js for both your RPM building environment and your target server. Follow the setup instructions for [Enterprise Linux](https://github.com/nodesource/distributions#rpm) and then run `yum install nodejs`.
If you're using multiple node repositories or a repository with multiple versions of node, you can specify an RPM version requirement with the `nodeVersion` property in your `package.json` file:
```json
{
"spec": {
"nodeVersion": "< 5.0.0"
}
}
```
The `nodeVersion` property must conform to the [RPM version syntax](http://www.rpm.org/max-rpm/s1-rpm-depend-manual-dependencies.html#S3-RPM-DEPEND-VERSION-REQUIREMENTS)
### Directory Structure

@@ -147,0 +158,0 @@

@@ -39,2 +39,10 @@ var createSpecFile = require('../lib/spec');

it('requires a particular node version when specified', function () {
var pkg = require('./fixtures/my-cool-api-with-node-version');
var expected = loadFixture('my-cool-api-with-node-version.spec');
var spec = createSpecFile(pkg);
assert.equal(spec, expected);
});
it('adds all of the required packages from the spec.requires property in package.json', function () {

@@ -41,0 +49,0 @@ var pkg = require('./fixtures/my-cool-api-with-requires');

Sorry, the diff of this file is not supported yet

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