datalab-org / datalab

datalab is a place to store experimental data and the connections between them.
https://docs.datalab-org.io
MIT License
49 stars 17 forks source link

Explicitly don't use a polyfill for `vm` #996

Closed jdbocarsly closed 3 weeks ago

jdbocarsly commented 3 weeks ago

In our build, we are getting a warning about the fact that we don't have a polyfill for one of cypress's subdependencies, which uses the node.js vm function:

warning  in ./node_modules/asn1.js/lib/asn1/api.js

Module not found: Error: Can't resolve 'vm' in '/Users/josh/datalabvue/webapp/node_modules/asn1.js/lib/asn1'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
    - add a fallback 'resolve.fallback: { "vm": require.resolve("vm-browserify") }'
    - install 'vm-browserify'
If you don't want to include a polyfill, you can use an empty module like this:
    resolve.fallback: { "vm": false }

I don't believe we really need the polyfill since since we haven't had one in for a while and the tests don't seem broken, so this PR just makes that explicit in vue.config.js

codecov[bot] commented 3 weeks ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 68.38%. Comparing base (3230bb2) to head (140c9ab). Report is 1 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #996 +/- ## ======================================= Coverage 68.38% 68.38% ======================================= Files 62 62 Lines 3941 3941 ======================================= Hits 2695 2695 Misses 1246 1246 ```
cypress[bot] commented 3 weeks ago

datalab    Run #2738

Run Properties:  status check passed Passed #2738  •  git commit d1d8635289 ℹ️: Merge 140c9ab750e8b37af59c69647501f25fef043d80 into 3230bb23fa9c9805ab56608a1717...
Project datalab
Branch Review jdb/vm-polyfill-fix
Run status status check passed Passed #2738
Run duration 06m 13s
Commit git commit d1d8635289 ℹ️: Merge 140c9ab750e8b37af59c69647501f25fef043d80 into 3230bb23fa9c9805ab56608a1717...
Committer Josh Bocarsly
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 0
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 405
View all changes introduced in this branch ↗︎