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

react-native-storybook-loader

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-storybook-loader - npm Package Compare versions

Comparing version 1.7.0 to 1.8.0

2

package.json
{
"name": "react-native-storybook-loader",
"version": "1.7.0",
"version": "1.8.0",
"repository": "https://github.com/elderfo/react-native-storybook-loader.git",

@@ -5,0 +5,0 @@ "bugs": "https://github.com/elderfo/react-native-storybook-loader/issues",

@@ -26,14 +26,8 @@ const logger = require('./logger');

if (storyFiles.length > 0) {
const sortedFiles = sortFiles(storyFiles);
writeFile(sortedFiles, outputFileConfig.outputFile);
logger.info(
`Compiled story loader for ${storyFiles.length} files:\n`,
` ${storyFiles.join('\n ')}`
);
} else {
logger.warn(
'No files were found matching the specified pattern. Story loader was not written.'
);
}
const sortedFiles = sortFiles(storyFiles);
writeFile(sortedFiles, outputFileConfig.outputFile);
logger.info(
`Compiled story loader for ${storyFiles.length} files:\n`,
` ${storyFiles.join('\n ')}`
);
});

@@ -40,0 +34,0 @@ };

@@ -27,3 +27,3 @@ const faker = require('faker');

const secondFiles = generateArray(faker.system.fileName);
const thirdFiles = generateArray(faker.system.fileName);
const noFiles = [];

@@ -33,3 +33,3 @@ storyFinder.loadStories

.mockImplementationOnce(() => secondFiles)
.mockImplementationOnce(() => thirdFiles);
.mockImplementationOnce(() => noFiles);

@@ -53,5 +53,5 @@ writeOutStoryLoader(config);

expect(writer.writeFile).toHaveBeenCalledWith(
thirdFiles.concat().sort(),
noFiles.concat().sort(),
config.outputFiles[1].outputFile
);
});

@@ -23,3 +23,3 @@ const mock = require('mock-fs');

test('writeFile should perform expected work', () => {
test('writeFile generate story loader', () => {
const files = [

@@ -38,1 +38,10 @@ path.resolve(__dirname, '../file1.js'),

});
test('writeFile should generate dummy story loader if no stories were found', () => {
const files = [];
writeFile(files, outputPath, moduleDir);
const contents = fs.readFileSync(outputPath, encoding);
expect(contents).toMatchSnapshot();
});

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