-
Notifications
You must be signed in to change notification settings - Fork 34
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
📦 Packages & Makefile update #130
Comments
I'm moving towards esbuild and nom 7 because esbuild is faster and npm 7 includes workspaces and doesn't require extra utils (i.e. yarn). I'm also removing the Makefile dependencies. There's quite a bit of experimenting because the nom / node import/export system is rather challenging, from a package developer perspective. Based on some research I think I've decided I'd like to export both ESM and CommonJS, so I'm compiling "type": "module",
"exports": {
"import": "./dist/index.js",
"require": "./dist/index.js"
}, The entry point is Failure: compiling individual filesI had attempted to compile individual (i.e. not-bundled) files into src := $(shell find src -name *.js)
dist/index.mjs: $(src) $(peer_src)
npx esbuild \
--platform=neutral \
--log-level=$(log-level) \
--banner:js="$(banner)" \
--sourcemap=external \
--outdir=dist/ \
$(src) However this would require some wholesale import file renaming because the extensions need to be explicitly |
Complication: CommonJS + ESMTo keep things simple, at least initially, I'm going to only compile ESM. Since TKO is in (very) low usage, we can aim for future users, and worry about CommonJS when there's demand. In addition to working well with tree-shaking and hopefully modern versions of all the widely used bundlers, it should also work with Deno. In the future I'd like to revise the exports to be default exports, so we don't need |
ExportsI'm going to rely on the |
Package Priorities
|
Microtasks asideNoting the |
There are a number of housekeeping issues that need some attention:
leana
is used and whether it's still needed in light of support inyarn
and/ornom@7
workspacesesbuild
in place ofrollup
We also need to bump the version number to something sane, which my be an "official" number e.g.
4.0.0
, even though that would give the impression that there's more "official" stability to the build than is actually warranted.There are also a number of "bald" packages (e.g. those not in the
@tko
organization) that need to be marked by npm as deprecated e.g.The text was updated successfully, but these errors were encountered: