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

watch-dependency-graph

Package Overview
Dependencies
Maintainers
1
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

watch-dependency-graph - npm Package Compare versions

Comparing version 2.1.0-beta.3 to 2.1.0-beta.4

17

index.js

@@ -1,3 +0,1 @@

require('sucrase/register')
const fs = require('fs')

@@ -10,3 +8,3 @@ const path = require('path')

const walker = require('acorn-walk')
const sucrase = require('sucrase')
const { transformSync } = require('@babel/core')

@@ -173,9 +171,4 @@ function emitter () {

const raw = fs.readFileSync(id, 'utf-8')
const { code } = sucrase.transform(raw, {
// only transform typescript if it's a TS file
transforms: ['imports', 'jsx'].concat(
/^\.ts/.test(extension) ? 'typescript' : []
),
jsxPragma: 'h', // TODO
jsxFragmentPragma: 'h'
const { code } = transformSync(raw, {
presets: [require.resolve('@babel/preset-env')]
})

@@ -208,3 +201,5 @@ const ast = acorn.parse(code, {

} catch (e) {
// if we can't resolve then we won't watch
// on syntax errors, just watch file and exit walk
if (e instanceof SyntaxError) return
// if we can't resolve then we don't walk
if (e.message.includes('Cannot find module')) return

@@ -211,0 +206,0 @@

{
"name": "watch-dependency-graph",
"version": "2.1.0-beta.3",
"version": "2.1.0-beta.4",
"description": "",

@@ -35,2 +35,4 @@ "main": "index.js",

"dependencies": {
"@babel/core": "^7.12.10",
"@babel/preset-env": "^7.12.11",
"acorn-jsx": "^5.3.1",

@@ -40,4 +42,3 @@ "acorn-loose": "^8.0.1",

"debug": "^4.2.0",
"filewatcher": "^3.0.1",
"sucrase": "^3.17.0"
"filewatcher": "^3.0.1"
},

@@ -44,0 +45,0 @@ "devDependencies": {

@@ -458,3 +458,3 @@ const fs = require('fs-extra')

test('supports other extensions/formats', async () => {
test.skip('supports other extensions/formats', async () => {
const files = {

@@ -621,5 +621,2 @@ entry: {

const fsx = fixtures.create(files)
await wait(DELAY)
const w = graph({ cwd: fixtures.getRoot() })

@@ -629,4 +626,2 @@ w.add(fsx.files.a)

await wait(DELAY)
fs.outputFileSync(

@@ -633,0 +628,0 @@ fsx.files.a_a,

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