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

haste-cli

Package Overview
Dependencies
Maintainers
2
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

haste-cli - npm Package Compare versions

Comparing version 0.1.13 to 0.1.15

yarn.lock

4

bin/haste.js

@@ -8,3 +8,3 @@ #!/usr/bin/env node

const get = require('lodash/get');
const { standardizePresetName } = require('../src/utils');
const { resolvePresetName } = require('../src/utils');

@@ -52,3 +52,3 @@ process.on('unhandledRejection', (err) => {

const presetPath = resolveFrom(context, standardizePresetName(presetName));
const presetPath = resolveFrom(context, resolvePresetName(presetName));
const run = haste(presetPath);

@@ -55,0 +55,0 @@ const preset = require(presetPath);

{
"name": "haste-cli",
"version": "0.1.13",
"version": "0.1.15",
"main": "index.js",

@@ -5,0 +5,0 @@ "author": "Ronen Amiel",

@@ -0,1 +1,3 @@

const path = require('path');
const HASTE_PRESET_PREFIX_REGEX = /^(?!@|[^/]+\/|haste-preset-)/;

@@ -7,1 +9,9 @@

};
module.exports.resolvePresetName = (name) => {
if (path.isAbsolute(name)) {
return name;
}
return module.exports.standardizePresetName(name);
};

@@ -37,2 +37,12 @@ const path = require('path');

it('should not normalize preset name if it is an absolute path', async () => {
const absolutePresetPath = require.resolve('./fixtures/basic/node_modules/haste-preset-basic');
const result = await execa(process.execPath, [HASTE_BIN, 'build', '--preset', absolutePresetPath], {
cwd: path.join(__dirname, './fixtures/cli-configured'),
});
expect(result.stdout).toMatch(/running build.../);
});
it('should throw if no "preset" was configured (via cli/config)', async () => {

@@ -39,0 +49,0 @@ expect.assertions(2);

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