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

autodrom

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

autodrom - npm Package Compare versions

Comparing version 0.7.0 to 0.8.0

lib/my-require.js

26

bin/autodrom.js

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

const watcher = chokidar.watch(program.args, {
ignored: /(^|[/\\])\../, // ignore dotfiles
persistent: true
});
if (opts.watch) {
const watcher = chokidar.watch(program.args, {
ignored: /(^|[/\\])\../, // ignore dotfiles
persistent: true
});
watcher.on('change', async (filename) => {

@@ -69,14 +68,7 @@ console.log(`File ${filename} changed`);

} else {
await setTimeout(100);
const watchedPaths = watcher.getWatched();
watcher.close();
const paths = Object.keys(watchedPaths);
for (const pathKey of paths) {
const points = watchedPaths[pathKey];
for (const point of points) {
const filename = path.resolve(pathKey, point);
if ((await stat(filename)).isFile()) {
console.log(filename);
await readModifyWrite(filename, opts, graphviz, 10);
}
const filenames = program.args.map(e => path.join(process.cwd(), e));
for (const filename of filenames) {
if ((await stat(filename)).isFile()) {
console.log(filename);
await readModifyWrite(filename, opts, graphviz, 10);
}

@@ -83,0 +75,0 @@ }

@@ -5,2 +5,3 @@ 'use strict';

const fsm = require('@wavedrom/fsm');
const myRequire = require('./my-require');

@@ -18,3 +19,3 @@ const extractSVG = (graphviz, cells) => {

};
const ret = [];

@@ -29,11 +30,7 @@ const $ = {};

try { /* eslint no-new-func: 1 */
res = new Function(`
'use strict';
return (function (lib) {
const {fsm, fin, range, $} = lib;
return (${cell.src});
})`)()({
res = new Function(`'use strict'; return (function (lib) { const {fsm, fin, range, require, $} = lib; return (${cell.src}); })`)()({
fsm: fsmSvg,
fin: undefined,
range: range,
require: myRequire,
$

@@ -40,0 +37,0 @@ });

@@ -6,2 +6,3 @@ 'use strict';

const extractSVG = require('./extract-svg.js');
const myRequire = require('./my-require.js');

@@ -11,2 +12,2 @@ exports.parse = parse;

exports.extractSVG = extractSVG;
exports.require = myRequire;

@@ -6,2 +6,3 @@ 'use strict';

const fsm = require('@wavedrom/fsm');
const myRequire = require('./my-require');

@@ -15,13 +16,8 @@ const update = (cells, filename) => {

try { /* eslint no-new-func: 1 */
res = new Function(`
'use strict';
return (function (lib) {
const {fsm, fin, range, $, require} = lib;
return (${cell.src});
})`)()({
res = new Function(`'use strict'; return (function (lib) { const {fsm, fin, range, $, require} = lib; return (${cell.src}); })`)()({
fsm: fsm.emit.verilog,
fin: undefined,
range,
$,
require: (pat) => require(path.join(path.dirname(filename), pat))
require: myRequire,
$
});

@@ -28,0 +24,0 @@ } catch (err) {

{
"name": "autodrom",
"version": "0.7.0",
"version": "0.8.0",
"description": "auto verilog from comments",

@@ -5,0 +5,0 @@ "author": "Aliaksei Chapyzhenka",

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