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

jsx-info

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jsx-info - npm Package Compare versions

Comparing version 3.0.0 to 3.0.1

fixtures/line-report/main.js

14

__tests__/api.test.ts

@@ -21,2 +21,16 @@ import * as path from "path";

test("analyze line-report directory", async () => {
const directory = path.resolve(__dirname, "../fixtures/line-report");
const analysis = await analyze({
directory,
relativePaths: true,
components: ["div"],
prop: "id",
});
expect(analysis).toMatchSnapshot({
directory: expect.any(String),
elapsedTime: expect.any(Number),
});
});
test("analyze basic directory", async () => {

@@ -23,0 +37,0 @@ const directory = path.resolve(__dirname, "../fixtures/basic");

4

CHANGELOG.md

@@ -0,1 +1,5 @@

# v3.0.1
- Fixes a bug where most props were ignored when searching by prop
# v3.0.0

@@ -2,0 +6,0 @@

2

dist/package.json
{
"name": "jsx-info",
"version": "3.0.0",
"version": "3.0.1",
"description": "displays a report of JSX component and prop usage",

@@ -5,0 +5,0 @@ "main": "dist/src/api.js",

@@ -0,0 +0,0 @@ import { ParserPlugin } from "@babel/parser";

@@ -114,14 +114,17 @@ "use strict";

if (wantPropKey && prop.propName !== wantPropKey) {
return;
continue;
}
if (!match(prop.propValue)) {
return;
continue;
}
reporter.addProp(componentName, prop.propName, {
propCode: prop.propCode,
startLoc: prop.startLoc,
endLoc: prop.endLoc,
prettyCode: formatPrettyCode(code, prop.startLoc.line, prop.endLoc.line),
filename: processFilename(filename),
});
if ((!wantPropKey || prop.propName === wantPropKey) &&
match(prop.propValue)) {
reporter.addProp(componentName, prop.propName, {
propCode: prop.propCode,
startLoc: prop.startLoc,
endLoc: prop.endLoc,
prettyCode: formatPrettyCode(code, prop.startLoc.line, prop.endLoc.line),
filename: processFilename(filename),
});
}
}

@@ -128,0 +131,0 @@ }

export declare function assertNever(value: never): never;

@@ -0,0 +0,0 @@ "use strict";

@@ -0,0 +0,0 @@ import { ParserPlugin } from "@babel/parser";

@@ -0,0 +0,0 @@ "use strict";

#!/usr/bin/env node
export {};

@@ -0,0 +0,0 @@ #!/usr/bin/env node

export declare function main(): Promise<void>;

@@ -0,0 +0,0 @@ "use strict";

@@ -0,0 +0,0 @@ import ora from "ora";

@@ -0,0 +0,0 @@ "use strict";

export declare function sleep(): Promise<void>;

@@ -0,0 +0,0 @@ "use strict";

{
"name": "jsx-info",
"version": "3.0.0",
"version": "3.0.1",
"description": "displays a report of JSX component and prop usage",

@@ -5,0 +5,0 @@ "main": "dist/src/api.js",

@@ -174,18 +174,23 @@ import { parse as babelParse, ParserPlugin } from "@babel/parser";

if (wantPropKey && prop.propName !== wantPropKey) {
return;
continue;
}
if (!match(prop.propValue)) {
return;
continue;
}
reporter.addProp(componentName, prop.propName, {
propCode: prop.propCode,
startLoc: prop.startLoc,
endLoc: prop.endLoc,
prettyCode: formatPrettyCode(
code,
prop.startLoc.line,
prop.endLoc.line
),
filename: processFilename(filename),
});
if (
(!wantPropKey || prop.propName === wantPropKey) &&
match(prop.propValue)
) {
reporter.addProp(componentName, prop.propName, {
propCode: prop.propCode,
startLoc: prop.startLoc,
endLoc: prop.endLoc,
prettyCode: formatPrettyCode(
code,
prop.startLoc.line,
prop.endLoc.line
),
filename: processFilename(filename),
});
}
}

@@ -192,0 +197,0 @@ }

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