Node doesn't support ESM, so we have to drop enzyme and prevent loading any frontend module.
There is much more to be cleaned up, but let wait for getting rid of the tests entirely.
Differential Revision: https://phabricator.services.mozilla.com/D239056
We need to add the @babel/plugin-syntax-import-attributes plugin to make sure
the outline panel and inline previews are working when using import attributes.
Differential Revision: https://phabricator.services.mozilla.com/D240122
We need to add the @babel/plugin-syntax-import-attributes plugin to make sure
the outline panel and inline previews are working when using import attributes.
Differential Revision: https://phabricator.services.mozilla.com/D240122
Update Jest-related dependencies to latest, while removing the unused jest-junit and jest-serializer-babel-ast dependencies. This involved updating the snapshots to match the new default format that Jest uses.
Differential Revision: https://phabricator.services.mozilla.com/D237509
This also adds prettier as an installed package for the devtools debugger code - some of the tests actually use it, and they were only passing because it was being side-installed by the builder using the ESLint node_modules bundles.
Differential Revision: https://phabricator.services.mozilla.com/D222956
Also remove devtools/client/debugger/src/utils/editor/source-editor.js which wasn't
used an look like a relic of ancient times.
Differential Revision: https://phabricator.services.mozilla.com/D198409
Also remove devtools/client/debugger/src/utils/editor/source-editor.js which wasn't
used an look like a relic of ancient times.
Differential Revision: https://phabricator.services.mozilla.com/D198409
The library is added in devtools/client/shared/vendor, like the other third-party
libraries we use in DevTools.
This was the latest file that justified the debugger-specific vendor machinery,
so we can clean that up now.
First, we can remove the vendor.js file.
With this, this means that bin/bundle.js now only bundles the workers, using rollup,
so we can remove webpack and its associated packages from package.json, as well
as the webpack.config.js.
Finally, we can stop handling debugger vendors in build-debugger.js
Differential Revision: https://phabricator.services.mozilla.com/D193916
This is not used anymore, so we can drop it.
This was the only vendored item that was contributing
to vendor.css, so we can delete the file, and cleanup
our webpack config.
Differential Revision: https://phabricator.services.mozilla.com/D193915
The library was only used to make the quick search panel
and the shortcut modal to show with a slide-in animation.
This can be replaced with a simple CSS animation instead.
I'm taking this as an opportunity to cleanup a few things
that were unecessary or not ideal in the CSS file.
Differential Revision: https://phabricator.services.mozilla.com/D192266
This is needed to handle the new Regexp `v` flag.
I'm taking this as an opportunity to fix a couple issue in the bundle script.
Differential Revision: https://phabricator.services.mozilla.com/D180675
This patch makes the SearchInput a connected component, This allows us cleanup
all the seperate actions and reducer logic and makes it easier to add new SearchInput
with modifers functionality.
Differential Revision: https://phabricator.services.mozilla.com/D171034
The associated plugin is added to the babel config (and different locations where
we're using babel parsing).
The existing class for the getSymbols jest test is modified to include a few of
the latest class syntax (public and private properties, static block, ...).
Differential Revision: https://phabricator.services.mozilla.com/D126771
In order to include the class statick block plugin, babel-core needs to be updated.
And as babel-core is updated, other packages relying on it also need to be updated.
One of them is jest, which requires a few changes in the test setting + a workaround
for CodeMirror test.
A few snapshots are updated as some methods changed their return values.
Finally, we're forcing the workerjs babel core dependency so it doesn't use a different
version. We should probably either update the dependency on jlast's repo, or directly
put the workerjs in tree, but we can do that on a dedicated bug.
Differential Revision: https://phabricator.services.mozilla.com/D126770
This fixes an issue we had with pretty printing scripts
containing private fields.
A test case is added in browser_dbg-pretty-print.js to
ensure it stays this way.
Differential Revision: https://phabricator.services.mozilla.com/D114816
Symbols are information on the structure of a given script (assignments, functions,
expressions, …)
This patch handles scripts using private fields and fixes a few things in the debugger:
- we get the full expression when hovering a private property access,
a prerequisite to get the value of a private propery in the variable tooltip
(which will be handled in Bug 1709567).
- private methods now show up in the outline view under their proper name, and
not `anonymous`. `simplifyDisplayName` was fixed as well to not strip the `#`
at the start of the method name.
Tests are added to ensure this works as expected.
A side-effect from modifying examples/simple1.js is that browser_dbg-outline-pretty.js
was broken since pretty-fast wasn't able to parse file with private fields syntax.
pretty-fast is updated to its latest version and the pretty-print worker is updated
so the test does not break anymore.
Depends on D114345
Differential Revision: https://phabricator.services.mozilla.com/D114459
Remove references to flow in build files.
This effectively stop stipping flow from debugger modules.
So any leftover would now start being kept in production file and do an error.
Differential Revision: https://phabricator.services.mozilla.com/D105330
This updates the pretty-fast module to bring the commits
that were done there the 3 last years (date of the last
version being published).
Differential Revision: https://phabricator.services.mozilla.com/D96176
I inlined the two existing functions that were modifying the base config directly
back into the base webpack config, and then removed everything that wasn't hit
or used by the bundling script.
Thanks to this work, we're able to remove a few files that were previously only
used in Launchpad, or that are simple enough to be inlined into the webpack config.
Since postcss wasn't used, we can also remove the postcss.config.js file, as
well as some libraries from package.json.
Differential Revision: https://phabricator.services.mozilla.com/D96018
This patch is simply inlining what was in devtools-launchpad directly into the
debugger's webpack config.
In order for the bundling script to still work, we had to add the dependencies
that were used in devtools-launchpad.
For some reason, this shifted a lot of modules in the generated files (but files
have the same size before and after, so I guess nothing changed).
Next patch in the serie will cleanup this webpack config.
Differential Revision: https://phabricator.services.mozilla.com/D96017
This changeset focuses on dependencies, but surprisingly, it has an impact on bundles.
Looks like one dependency uses another revision.
Differential Revision: https://phabricator.services.mozilla.com/D92736
This changeset focus on devDependencies, but a similar work can probably be done on dependencies.
Many dependencies are justifies solely because of jest.
In order to run flow, we only need flow, and we need very few things for bin/bundle.
For me, the three things to keep working are:
* flow
* jest
* bin/bundle to rebuild vendors, reps, worker modules
The debugger frontend itself (src/ folder) is built without involving yarn/package.json.
Differential Revision: https://phabricator.services.mozilla.com/D92735