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.
Add JSON import assertions to import test files. JSON import has been
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.
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 nested package.json generation. See: https://nodejs.org/api/packages.html#dual-commonjses-module-packagessource-map-support
since this was now failing to load, and nodejs has supported--enable-source-maps
since v12.ts-node
since this module has lousy module support [https://github.com/TypeStrong/ts-node/issues/935 and https://github.com/TypeStrong/ts-node/issues/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.