Skip to content

3.1.0#236

Open
moonglum wants to merge 7 commits into
mainfrom
3.0.3
Open

3.1.0#236
moonglum wants to merge 7 commits into
mainfrom
3.0.3

Conversation

@moonglum

@moonglum moonglum commented Mar 13, 2026

Copy link
Copy Markdown
Member

Re-opened PR for #233 as a lot of the changes already got released separately. I also merged in my proposed deprecation warnings.

  • Replaced Mocha with Node's built-in test runner
  • Remove npm-run-all
  • fixed nameless module designations (I can't remember anything about this)
  • Add deprecation warnings for things we want to drop in the next major version:
    • esnext: The days of ES5 are long gone, and nowadays Babel does transformations we would not recommend. So let's drop it.
    • jsx: There is basically only one JSX-based framework left that you could use without vite: Preact. It therefore makes little sense to support JSX for our project.
    • format: Why would you compile to anything but ESM? Let's drop it. It is the default right now, and I would be surprised if any project that is still alive would change it to something else.
    • exports: As this is not possible in ESM, we drop that as well.
    • mangling the source code: There is no reason to shorten variable names because compression exists. Reducing whitespace is a non-destructive option (modern browsers even have "format JS" as an option in the devtools), and makes a difference in file size even with compression, so we keep it.
  • updated internals for compatability with faucet v3
  • Inline determining the browserslist as we plan to drop it from core

Note: the JSX and esnext packages should both be marked as deprecated after the release

@moonglum

moonglum commented Mar 13, 2026

Copy link
Copy Markdown
Member Author

After removing the deprecated options, we have the following configuration options left:

  • source and target, obviously
  • externals to mark a module as external to the bundle
  • sourcemap: false to opt out a single bundle from the --sourcemaps CLI option. Any idea why we need that? 😕
  • compact: By default, -js does nothing when a user adds --compact. You need to opt-in. You can either set it to true to "comments, trim trailing spaces, compact empty lines, and normalize line endings" or minify to additionally reduce whitespace.
  • typescript: Currently does the whole typechecking-thing, but in the future should only strip types.

I think this will allow us to give esbuild another try for the next major version:

  • externals is supported
  • Removing whitespace is supported, but I don't think there is an option equivalent to true (see above).
  • Type Striping is supported

I would argue that there should only be two options for compact:

  • false: Do not compact in any way
  • true (default): Reduce whitespace and remove comments

We can do that, because we will no longer need faucet-pipeline-jsmin as removing whitespaces is built-in in esbuild.
Note that compact only has an effect if you run faucet with --compact


I demonstrated how it could like when we go with esbuild here:
#237

@moonglum moonglum mentioned this pull request Mar 13, 2026
as suggested by @moonglum: this appears to be unmaintained, but it's not
really worth the encumbrance anyway
@moonglum
moonglum force-pushed the 3.0.3 branch 3 times, most recently from 6d7d22a to 1f7df99 Compare March 13, 2026 15:16
Comment thread package.json
"dependencies": {
"@rollup/plugin-commonjs": "~29.0.1",
"@rollup/plugin-node-resolve": "~16.0.3",
"browserslist": "^4.28.1",

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that this doesn't add a dependency, but moves the transitive dependency here.

Comment thread test/unit/test_bundling.js Outdated
});

it("should take into account Browserslist while transpiling", () => {
it.skip("should take into account Browserslist while transpiling", () => {

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest removing both unit tests. They do no longer work, as we are no longer passing in the browsers. Both tests are already covered by the test test/cli/test_browserslist

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤔 That sounds like a breaking change then? In which case perhaps that should be relegated to v4 as well? (I'm not sure whether the commits' order is intentional: v3.0.3 appears before this change.)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope, that's not a breaking change. Only the way that the unit tests want to use it does not work anymore. But it is not relevant to end users.

@moonglum
moonglum marked this pull request as ready for review March 13, 2026 15:21

@FND FND left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Solid work, thank you! I just have a few observations and uncertainties.

Also, I have a vague feeling that commit attribution got lost over the years: Some of these commits are ancient and were moved across multiple branches / release attempts - and I think that for some of them, authorship was altered (e.g. a1b3706 sounds very FNDian). I don't care about attribution per se, but it might lead to confusion in the future - IOW you don't wanna be blamed for my ignorance, do you? Either way, it's not a big deal, mostly a curiosity.

Comment thread lib/bundle/config.js
Comment thread lib/bundle/config.js Outdated
Comment thread lib/bundle/config.js Outdated
Comment thread lib/bundle/config.js Outdated
Comment thread CHANGELOG.md
v3.0.3
------

_TBD_

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we deprecate stuff in this release, should we perhaps go with v3.1 instead?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed!

Comment thread test/unit/test_bundling.js Outdated
});

it("should take into account Browserslist while transpiling", () => {
it.skip("should take into account Browserslist while transpiling", () => {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤔 That sounds like a breaking change then? In which case perhaps that should be relegated to v4 as well? (I'm not sure whether the commits' order is intentional: v3.0.3 appears before this change.)

@moonglum moonglum changed the title 3.0.3 3.1.0 Apr 7, 2026
it appears this was never correct in the first place
@moonglum
moonglum force-pushed the 3.0.3 branch 4 times, most recently from 374ef31 to 0af71a2 Compare April 7, 2026 15:19
@moonglum
moonglum requested a review from FND April 17, 2026 14:24
Comment thread lib/bundle/config.js Outdated
Comment on lines +102 to +103
console.error("WARNING: `format` option is deprecated.\n" +
"faucet-pipeline-js will always compile to ESM in the future.");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For consistency:

Suggested change
console.error("WARNING: `format` option is deprecated.\n" +
"faucet-pipeline-js will always compile to ESM in the future.");
console.error("WARNING: `format` option is deprecated; " +
"faucet-pipeline-js will always compile to ESM in the future");

Comment thread lib/bundle/config.js Outdated
var options = { compress: false, mangle: false }; // eslint-disable-line no-var
break;
case "mangle":
console.error("WARNING: compact option `mangle` is deprecated; use `minify` instead");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The corresponding commit message (231e6d4) suggests minify was deprecated.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Resolved by rewriting the commit description, including our rationale: e0b6372

Comment thread CHANGELOG.md
v3.1.0
------

_TBD_

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion, probably incomplete:

Suggested change
_TBD_
_2026-0x-xx_
notable changes for end users:
* deprecated `esnext`, `jsx`, `exports` and `format` options as well as
`compact: mangle` setting
This functionality will be removed in v4 due to lack of user needs:
`esnext` and `format` should no longer be necessary, now that ESM is
well-established. JSX conversion typically requires framework-specific
tooling these days, which goes beyond faucet-pipeline's stated objectives.
`mangle` is deemed excessive and ultimately unhelpful.
* reduced number of dependencies
no significant changes for developers

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now included in d7e7a92.

Comment thread lib/index.js
Comment on lines 4 to +6
let { abort, repr } = require("faucet-pipeline-core/lib/util");
let path = require("path");
let browserslist = require("browserslist");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

third-party packages above stdlib:

Suggested change
let { abort, repr } = require("faucet-pipeline-core/lib/util");
let path = require("path");
let browserslist = require("browserslist");
let { abort, repr } = require("faucet-pipeline-core/lib/util");
let browserslist = require("browserslist");
let path = require("path");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done: 94a408b

moonglum and others added 4 commits May 1, 2026 10:57
this functionality will be removed in v4 due to lack of user needs:
* `esnext`, `format` and `exports` should no longer be necessary, now
  that ESM is well-established
* JSX conversion typically requires framework-specific tooling these
  days, which goes beyond faucet-pipeline's stated objectives
* `compact: mangle` was deemed excessive and ultimately unhelpful;
  `minify` should be perfectly sufficient

Co-authored-by: FND <fnd@localhost.localdomain>
note that we don't actually _need_ faucet-core v3 though because `await`
doesn't care whether there's a promise or not
this allows us to remove it from faucet-pipeline-core
@FND

FND commented May 1, 2026

Copy link
Copy Markdown
Contributor

I think this is ready to release now. At your convenience, can you double-check the change log (WRT both content and phrasing)?

@moonglum moonglum left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few observations.

Comment thread package.json
"dependencies": {
"@rollup/plugin-commonjs": "~29.0.1",
"@rollup/plugin-node-resolve": "~16.0.3",
"faucet-pipeline-core": "^2.0.0",

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would need to double check if with this version, faucet-pipeline-js is compatible with all planned changs for the 3.x branch. Additionally, I think 3.0.0 is the yanked version, so we are probably talking about 3.1.0 at this point? 🤔

https://github.com/faucet-pipeline/faucet-pipeline-core/pulls

Comment thread CHANGELOG.md
* deprecated `esnext`, `jsx`, `exports` and `format` options as well as
`compact: mangle` setting

This functionality will be removed in v4 due to lack of user needs:

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm a bit confused by the way you are presenting this. I suggest something more similar to:

  • exports and format should no longer be necessary now that ESM is well-established.
  • esnext should no longer be necessary as the "modern" JS syntax has been stable for quite some time and has great browser support.
  • jsx has evolved to require more integration with the frameworks. We therefore see it as out of scope for faucet-pipeline.
  • mangle was deemed excessive and ultimately unhelpful; minify should be used instead (offering only reduction of whitespace, not mangling of variable names)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants