watch-dependency-graph
Advanced tools
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, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
30372
7
1097
+ Added@babel/core@^7.12.10
+ Added@babel/preset-env@^7.12.11
+ Added@ampproject/remapping@2.3.0(transitive)
+ Added@babel/code-frame@7.26.2(transitive)
+ Added@babel/compat-data@7.26.3(transitive)
+ Added@babel/core@7.26.0(transitive)
+ Added@babel/generator@7.26.3(transitive)
+ Added@babel/helper-annotate-as-pure@7.25.9(transitive)
+ Added@babel/helper-compilation-targets@7.25.9(transitive)
+ Added@babel/helper-create-class-features-plugin@7.25.9(transitive)
+ Added@babel/helper-create-regexp-features-plugin@7.26.3(transitive)
+ Added@babel/helper-define-polyfill-provider@0.6.3(transitive)
+ Added@babel/helper-member-expression-to-functions@7.25.9(transitive)
+ Added@babel/helper-module-imports@7.25.9(transitive)
+ Added@babel/helper-module-transforms@7.26.0(transitive)
+ Added@babel/helper-optimise-call-expression@7.25.9(transitive)
+ Added@babel/helper-plugin-utils@7.25.9(transitive)
+ Added@babel/helper-remap-async-to-generator@7.25.9(transitive)
+ Added@babel/helper-replace-supers@7.25.9(transitive)
+ Added@babel/helper-skip-transparent-expression-wrappers@7.25.9(transitive)
+ Added@babel/helper-string-parser@7.25.9(transitive)
+ Added@babel/helper-validator-identifier@7.25.9(transitive)
+ Added@babel/helper-validator-option@7.25.9(transitive)
+ Added@babel/helper-wrap-function@7.25.9(transitive)
+ Added@babel/helpers@7.26.0(transitive)
+ Added@babel/parser@7.26.3(transitive)
+ Added@babel/plugin-bugfix-firefox-class-in-computed-class-key@7.25.9(transitive)
+ Added@babel/plugin-bugfix-safari-class-field-initializer-scope@7.25.9(transitive)
+ Added@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@7.25.9(transitive)
+ Added@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@7.25.9(transitive)
+ Added@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly@7.25.9(transitive)
+ Added@babel/plugin-proposal-private-property-in-object@7.21.0-placeholder-for-preset-env.2(transitive)
+ Added@babel/plugin-syntax-import-assertions@7.26.0(transitive)
+ Added@babel/plugin-syntax-import-attributes@7.26.0(transitive)
+ Added@babel/plugin-syntax-unicode-sets-regex@7.18.6(transitive)
+ Added@babel/plugin-transform-arrow-functions@7.25.9(transitive)
+ Added@babel/plugin-transform-async-generator-functions@7.25.9(transitive)
+ Added@babel/plugin-transform-async-to-generator@7.25.9(transitive)
+ Added@babel/plugin-transform-block-scoped-functions@7.25.9(transitive)
+ Added@babel/plugin-transform-block-scoping@7.25.9(transitive)
+ Added@babel/plugin-transform-class-properties@7.25.9(transitive)
+ Added@babel/plugin-transform-class-static-block@7.26.0(transitive)
+ Added@babel/plugin-transform-classes@7.25.9(transitive)
+ Added@babel/plugin-transform-computed-properties@7.25.9(transitive)
+ Added@babel/plugin-transform-destructuring@7.25.9(transitive)
+ Added@babel/plugin-transform-dotall-regex@7.25.9(transitive)
+ Added@babel/plugin-transform-duplicate-keys@7.25.9(transitive)
+ Added@babel/plugin-transform-duplicate-named-capturing-groups-regex@7.25.9(transitive)
+ Added@babel/plugin-transform-dynamic-import@7.25.9(transitive)
+ Added@babel/plugin-transform-exponentiation-operator@7.26.3(transitive)
+ Added@babel/plugin-transform-export-namespace-from@7.25.9(transitive)
+ Added@babel/plugin-transform-for-of@7.25.9(transitive)
+ Added@babel/plugin-transform-function-name@7.25.9(transitive)
+ Added@babel/plugin-transform-json-strings@7.25.9(transitive)
+ Added@babel/plugin-transform-literals@7.25.9(transitive)
+ Added@babel/plugin-transform-logical-assignment-operators@7.25.9(transitive)
+ Added@babel/plugin-transform-member-expression-literals@7.25.9(transitive)
+ Added@babel/plugin-transform-modules-amd@7.25.9(transitive)
+ Added@babel/plugin-transform-modules-commonjs@7.26.3(transitive)
+ Added@babel/plugin-transform-modules-systemjs@7.25.9(transitive)
+ Added@babel/plugin-transform-modules-umd@7.25.9(transitive)
+ Added@babel/plugin-transform-named-capturing-groups-regex@7.25.9(transitive)
+ Added@babel/plugin-transform-new-target@7.25.9(transitive)
+ Added@babel/plugin-transform-nullish-coalescing-operator@7.25.9(transitive)
+ Added@babel/plugin-transform-numeric-separator@7.25.9(transitive)
+ Added@babel/plugin-transform-object-rest-spread@7.25.9(transitive)
+ Added@babel/plugin-transform-object-super@7.25.9(transitive)
+ Added@babel/plugin-transform-optional-catch-binding@7.25.9(transitive)
+ Added@babel/plugin-transform-optional-chaining@7.25.9(transitive)
+ Added@babel/plugin-transform-parameters@7.25.9(transitive)
+ Added@babel/plugin-transform-private-methods@7.25.9(transitive)
+ Added@babel/plugin-transform-private-property-in-object@7.25.9(transitive)
+ Added@babel/plugin-transform-property-literals@7.25.9(transitive)
+ Added@babel/plugin-transform-regenerator@7.25.9(transitive)
+ Added@babel/plugin-transform-regexp-modifiers@7.26.0(transitive)
+ Added@babel/plugin-transform-reserved-words@7.25.9(transitive)
+ Added@babel/plugin-transform-shorthand-properties@7.25.9(transitive)
+ Added@babel/plugin-transform-spread@7.25.9(transitive)
+ Added@babel/plugin-transform-sticky-regex@7.25.9(transitive)
+ Added@babel/plugin-transform-template-literals@7.25.9(transitive)
+ Added@babel/plugin-transform-typeof-symbol@7.25.9(transitive)
+ Added@babel/plugin-transform-unicode-escapes@7.25.9(transitive)
+ Added@babel/plugin-transform-unicode-property-regex@7.25.9(transitive)
+ Added@babel/plugin-transform-unicode-regex@7.25.9(transitive)
+ Added@babel/plugin-transform-unicode-sets-regex@7.25.9(transitive)
+ Added@babel/preset-env@7.26.0(transitive)
+ Added@babel/preset-modules@0.1.6-no-external-plugins(transitive)
+ Added@babel/runtime@7.26.0(transitive)
+ Added@babel/template@7.25.9(transitive)
+ Added@babel/traverse@7.26.4(transitive)
+ Added@babel/types@7.26.3(transitive)
+ Addedbabel-plugin-polyfill-corejs2@0.4.12(transitive)
+ Addedbabel-plugin-polyfill-corejs3@0.10.6(transitive)
+ Addedbabel-plugin-polyfill-regenerator@0.6.3(transitive)
+ Addedbrowserslist@4.24.3(transitive)
+ Addedcaniuse-lite@1.0.30001689(transitive)
+ Addedconvert-source-map@2.0.0(transitive)
+ Addedcore-js-compat@3.39.0(transitive)
+ Addedelectron-to-chromium@1.5.74(transitive)
+ Addedescalade@3.2.0(transitive)
+ Addedesutils@2.0.3(transitive)
+ Addedfunction-bind@1.1.2(transitive)
+ Addedgensync@1.0.0-beta.2(transitive)
+ Addedglobals@11.12.0(transitive)
+ Addedhasown@2.0.2(transitive)
+ Addedis-core-module@2.16.0(transitive)
+ Addedjs-tokens@4.0.0(transitive)
+ Addedjsesc@3.0.23.1.0(transitive)
+ Addedjson5@2.2.3(transitive)
+ Addedlodash.debounce@4.0.8(transitive)
+ Addedlru-cache@5.1.1(transitive)
+ Addednode-releases@2.0.19(transitive)
+ Addedpath-parse@1.0.7(transitive)
+ Addedpicocolors@1.1.1(transitive)
+ Addedregenerate@1.4.2(transitive)
+ Addedregenerate-unicode-properties@10.2.0(transitive)
+ Addedregenerator-runtime@0.14.1(transitive)
+ Addedregenerator-transform@0.15.2(transitive)
+ Addedregexpu-core@6.2.0(transitive)
+ Addedregjsgen@0.8.0(transitive)
+ Addedregjsparser@0.12.0(transitive)
+ Addedresolve@1.22.9(transitive)
+ Addedsemver@6.3.1(transitive)
+ Addedsupports-preserve-symlinks-flag@1.0.0(transitive)
+ Addedunicode-canonical-property-names-ecmascript@2.0.1(transitive)
+ Addedunicode-match-property-ecmascript@2.0.0(transitive)
+ Addedunicode-match-property-value-ecmascript@2.2.0(transitive)
+ Addedunicode-property-aliases-ecmascript@2.1.0(transitive)
+ Addedupdate-browserslist-db@1.1.1(transitive)
+ Addedyallist@3.1.1(transitive)
- Removedsucrase@^3.17.0
- Removed@isaacs/cliui@8.0.2(transitive)
- Removed@pkgjs/parseargs@0.11.0(transitive)
- Removedansi-regex@5.0.16.1.0(transitive)
- Removedansi-styles@4.3.06.2.1(transitive)
- Removedany-promise@1.3.0(transitive)
- Removedbalanced-match@1.0.2(transitive)
- Removedbrace-expansion@2.0.1(transitive)
- Removedcolor-convert@2.0.1(transitive)
- Removedcolor-name@1.1.4(transitive)
- Removedcommander@4.1.1(transitive)
- Removedcross-spawn@7.0.6(transitive)
- Removedeastasianwidth@0.2.0(transitive)
- Removedemoji-regex@8.0.09.2.2(transitive)
- Removedforeground-child@3.3.0(transitive)
- Removedglob@10.4.5(transitive)
- Removedis-fullwidth-code-point@3.0.0(transitive)
- Removedisexe@2.0.0(transitive)
- Removedjackspeak@3.4.3(transitive)
- Removedlines-and-columns@1.2.4(transitive)
- Removedlru-cache@10.4.3(transitive)
- Removedminimatch@9.0.5(transitive)
- Removedminipass@7.1.2(transitive)
- Removedmz@2.7.0(transitive)
- Removedobject-assign@4.1.1(transitive)
- Removedpackage-json-from-dist@1.0.1(transitive)
- Removedpath-key@3.1.1(transitive)
- Removedpath-scurry@1.11.1(transitive)
- Removedpirates@4.0.6(transitive)
- Removedshebang-command@2.0.0(transitive)
- Removedshebang-regex@3.0.0(transitive)
- Removedsignal-exit@4.1.0(transitive)
- Removedstring-width@4.2.35.1.2(transitive)
- Removedstrip-ansi@6.0.17.1.0(transitive)
- Removedsucrase@3.35.0(transitive)
- Removedthenify@3.3.1(transitive)
- Removedthenify-all@1.6.0(transitive)
- Removedts-interface-checker@0.1.13(transitive)
- Removedwhich@2.0.2(transitive)
- Removedwrap-ansi@7.0.08.1.0(transitive)