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

react-ui-codemod

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-ui-codemod - npm Package Compare versions

Comparing version 1.3.0-beta.1 to 1.3.0-beta.2

34

creevey/testsToFiles.ts

@@ -86,5 +86,15 @@ /* eslint-disable import/no-default-export */

if (p.key.name === 'tests') {
// console.log(j(p));
testsIndex = i;
kindTests = propertiesToStringsObj(api, p.value.properties, collection);
if (p.value.type === 'Identifier') {
const variableName = p.value.name;
kindTests = {
[variableName]: variableName,
};
processVariable(api, collection, variableName);
} else if (p.value.type === 'ObjectExpression') {
kindTests = propertiesToStringsObj(api, p.value.properties, collection);
} else {
console.log(kind + ': TESTS IS SOMETHING UNKNOWN: ', p.value.type);
}
}

@@ -258,5 +268,7 @@ });

const file = prettier.format(mainTemplate(kind, stories, vars).replace(/as HTMLElement/g, ''), {
parser: 'typescript',
});
const file =
prettier.format(
mainTemplate(kind, stories, vars).replace(/as HTMLElement/g, ''),
{ parser: 'typescript' }
);

@@ -269,3 +281,3 @@ const dir = path.join(path.dirname(filePath), '../__creevey__/');

writeFileSync(path.join(dir + kind + '.creevey.js'), file);
writeFileSync(path.join(dir + kind.split('/').pop() + '.creevey.ts'), file);
};

@@ -298,14 +310,4 @@

// const testsToStr = (stories: Stories): string => {
// return Object.keys(stories)
// .map((s) => {
// return `${s}: [${Object.keys(stories[s].tests).join(', ')}]`;
// })
// .join(', ');
// };
// console.dir(stories);
console.log(`Creating ${kind}.creevey.ts`);
createTestFile(file.path, kind, stories, vars);
// console.log(vars);

@@ -312,0 +314,0 @@ return result.toSource();

{
"name": "react-ui-codemod",
"version": "1.3.0-beta.1",
"version": "1.3.0-beta.2",
"main": "index.js",

@@ -5,0 +5,0 @@ "license": "MIT",

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