-
Notifications
You must be signed in to change notification settings - Fork 384
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] convert to ES Module format #475
Closed
Closed
Changes from 9 commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
e46aa82
initial conversion of files to ES Module format
trusktr 2dc1db6
finish initial ESM format in source files, built ESM, CJS, and UMD ou…
trusktr 8e71261
Merge branch 'develop' into convert-to-esm
trusktr 20385ad
remove comment to hopefully trigger build
trusktr a6ca753
make sure to call grunt with Gruntfile.cjs
trusktr 17d73e5
switch to eslint, get lint and build passing (output not yet tested)
trusktr 31224af
get mocha tests passing
trusktr dcc10f5
set karma back to single run for CI
trusktr aee7a57
get base karma tests passing (the ones ran by `npm test`)
trusktr 1a7b720
remove comments from Gruntfile
trusktr fbd53bc
Merge branch 'develop' into convert-to-esm
trusktr 7db2591
run `npm test` before other tests
trusktr 180e1e7
install before testing
trusktr 675ca49
delete package-lock.json to fix the fsevents error on CI. Plus packag…
trusktr d3799a5
initial conversion of test/examples to ESM
trusktr 54c6316
add @babel/core that CI says was missing
trusktr ada3edf
Merge branch 'develop' into convert-to-esm
trusktr 17f9e7c
update npm version in CI
trusktr 793c940
delete package-lock.json again (restored on accident from last merge)
trusktr bdc7f68
install dependencies with --legacy-peer-deps, for now
trusktr 30fd409
update workersocket test code to ESM
trusktr 98edbfe
update eslint to 8.0.0-rc.0
trusktr 42d6590
use nvm in Dockerfile to set the latest npm version
trusktr bd5ed0c
install chromium-browser for CI
trusktr 42b3004
build before testing
trusktr 1d428a1
the --no-sandbox flag for Chrome is needed when running in CI
trusktr f3c43db
add comment about DOckerfile CHROME_BIN env var
trusktr c8dda47
run non-ROS tests before doing anything with ROS
trusktr ee2d985
make the repo friendly to npm install
trusktr 893751a
add a tet that ensures the code follows Node ESM spec
trusktr 2ce4ddc
ignore build output, libraries don't need lock files
trusktr 278f847
simpify .npmignore
trusktr File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
{ | ||
"env": { | ||
"browser": true, | ||
"es2021": true, | ||
"mocha": true | ||
}, | ||
"globals": { | ||
// TODO: These globals are namely for test files. We don't want to have these listed as globals for source files like currently. | ||
"require": true, | ||
"process": true, | ||
"module": true, | ||
"ROSLIB": true, | ||
"cborTypedArrayTagger": true, | ||
"CBOR": true, | ||
"EventEmitter2": true | ||
}, | ||
"parser": "@babel/eslint-parser", | ||
"parserOptions": { | ||
"sourceType": "module", | ||
"requireConfigFile": false | ||
}, | ||
"rules": { | ||
"semi": ["warn", "always"], | ||
"curly": "error", | ||
"eqeqeq": "error", | ||
"wrap-iife": ["error", "any"], | ||
"no-use-before-define": "off", | ||
"new-cap": "error", | ||
"no-caller": "error", | ||
"dot-notation": "off", | ||
"no-undef": "error", | ||
"no-cond-assign": "off", | ||
"no-eq-null": "off", | ||
"no-proto": "off", | ||
"no-console": "off", | ||
"no-unused-vars": "off", | ||
"strict": "off", | ||
"quotes": ["error", "single"], | ||
"linebreak-style": "error" | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I switched to Chrome because I was having issues getting the
importmap
polyfill working in Firefox:I decided to just get this all working natively first, then we can polyfill
importmap
in Firefox later if we still want to. But MS Edge is now built on Chromium, so at least the tests currently cover a large user base.