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.
This implements the changes discussed in #153. Feel free to accept or to use this PR as a starting point for your own work.
This adds support to import this package from ECMAScript Modules. The
changes are fairly broad since some non-compliant tooling and
experimental features were relied on.
"type": "module"
to top-level package.json. Remove nestedpackage.json generation. See:
https://nodejs.org/api/packages.html#dual-commonjses-module-packages
eslint configuration to enforce the practice. See:
https://nodejs.org/api/packages.html#extensions-in-subpaths
source-map-support
since this was now failing to load, andnodejs has supported
--enable-source-maps
since v12.ts-node
since this module has lousy module support[https://github.com/
ts-node
fails when ES Modules are in the dependency graph in Node.js 13+ TypeStrong/ts-node#935 andhttps://github.com/ESM support: soliciting feedback TypeStrong/ts-node#1007]. This was only used
for testing, so instead tests are run from the transpiled .js files
created by TypeScript. .npmignore has been updated to ignore these
files.
an experimental nodejs feature but ts-node was letting the imports
work against specification. These imports now require an import
assertion, which has been added. This required a TypeScript version
bump, and now the tests can only run under nodejs v18. The Travis-CI
configuration has been updated with this in mind. There are
workarounds to get this running under older versions of nodejs but I
don't think it's worth the engineering time.