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

smartclient-eval

Package Overview
Dependencies
Maintainers
1
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

smartclient-eval - npm Package Compare versions

Comparing version 0.9.19 to 0.9.20

2

Const.js

@@ -296,3 +296,3 @@ /*

static get REACT_SOURCE_PATTERN() {
return "^[^#~]+\\.[A-Za-z]+$";
return "^(?=[^#~]).*?([A-Za-z]+)\\.js$";
}

@@ -299,0 +299,0 @@

@@ -37,3 +37,3 @@ {

},
"version": "0.9.19"
"version": "0.9.20"
}

@@ -770,4 +770,2 @@ #!/usr/bin/env node

} else {
fs.outputFileSync(reactLoaderPath.replace(".js", ".d.ts"),
"declare module '" + Const.MODULE_NAME + "/react'");
Update._createReactLoader(branch, reactLoaderPath, reactWrapperPath);

@@ -857,2 +855,4 @@ console.log("Installed SmartClient React support and import script.");

static _createReactLoader(branch, loaderPath, wrappersDir) {
const typescriptPath = loaderPath.replace(".js", ".d.ts");
// if not an internal project, install wrapper files under React app source dir

@@ -877,2 +877,3 @@ if (!path.resolve(wrappersDir).match(/isomorphic\/react\/[^\/]+\/isomorphic/)) {

// build the React module definition out into the file index.js
let exportStatements = [

@@ -887,4 +888,25 @@ "if (window.isc) window.isc.react = true;\n"

});
fs.outputFileSync(loaderPath, exportStatements.join( EOL ) + EOL);
fs.outputFileSync(loaderPath, exportStatements.join( EOL ));
// build the React module typescript out into the file index.d.ts
exportStatements = [
"// typescript declarations for module " + Const.MODULE_NAME + "\n"
];
files.forEach( filePath => {
let tsMatch = filePath.match(Const.REACT_SOURCE_PATTERN);
if (tsMatch) {
let className = tsMatch[1];
filePath = Update._canonicalizePath(filePath).replace(/\.js$/, "");
exportStatements.push(
`export { ${className} } from "${wrappersDir}/${filePath}";`);
}
});
exportStatements.push(
"\n// to disable typescript for SmartClient, remove all the exports above",
"declare module '" + Const.MODULE_NAME + "/react'");
fs.outputFileSync(typescriptPath, exportStatements.join( EOL ) + EOL);
}

@@ -891,0 +913,0 @@

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