Skip to content

Commit e34b365

Browse files
committed
upgraded dependencies
there were a couple of issues with the previous release, now fixed: * Rollup's CommonJS plugin broke compatibility with certain libraries * Rollup's Babel plugin now prompts us to make an explicit choice on how to deal with its helpers on the latter, I'm somewhat uncomfortable prescribing that choice for everyone, but for now it seems better than going down the route of making our abstractions more leaky - doing so would require a concrete scenario that helps us better understand what faucet's options are here
1 parent d5cdd1c commit e34b365

File tree

9 files changed

+47
-20
lines changed

9 files changed

+47
-20
lines changed

CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,21 @@ faucet-pipeline-js version history
22
==================================
33

44

5+
v2.1.5
6+
------
7+
8+
_2020-05-22_
9+
10+
notable changes for end users:
11+
12+
* fixed a compatibility issues with CommonJS modules
13+
* silenced a warning when transpiling ESNext
14+
15+
no significant changes for developers
16+
17+
(skipping v2.1.4 due to a technical glitch in the release process)
18+
19+
520
v2.1.3
621
------
722

lib/bundle/babel.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
let { loadExtension } = require("faucet-pipeline-core/lib/util");
44

55
module.exports = function generateTranspiler({ esnext, jsx, exclude }, { browsers }) {
6-
let settings = {};
6+
let settings = {
7+
babelHelpers: "bundled"
8+
};
79
let plugins = [];
810
let extensions = [];
911

lib/bundle/config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
let generateTranspiler = require("./babel");
55
let { loadExtension, abort, repr } = require("faucet-pipeline-core/lib/util");
66
let commonjs = require("@rollup/plugin-commonjs");
7-
let nodeResolve = require("@rollup/plugin-node-resolve");
7+
let { nodeResolve } = require("@rollup/plugin-node-resolve");
88

99
let MODULE_FORMATS = { // maps faucet identifiers to Rollup identifiers
1010
esm: true,

package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "faucet-pipeline-js",
3-
"version": "2.1.3",
3+
"version": "2.1.5",
44
"description": "JavaScript module bundling for faucet-pipeline",
55
"author": "FND",
66
"contributors": [
@@ -27,20 +27,20 @@
2727
},
2828
"dependencies": {
2929
"faucet-pipeline-core": "^1.4.0",
30-
"rollup": "^2.10.2",
30+
"rollup": "^2.10.7",
3131
"rollup-plugin-cleanup": "~3.1.1",
32-
"@rollup/plugin-commonjs": "~11.1.0",
33-
"@rollup/plugin-node-resolve": "~7.1.3"
32+
"@rollup/plugin-commonjs": "~12.0.0",
33+
"@rollup/plugin-node-resolve": "~8.0.0"
3434
},
3535
"devDependencies": {
3636
"eslint-config-fnd-jsx": "^1.8.0",
3737
"faucet-pipeline-esnext": "file:pkg/faucet-pipeline-esnext",
38+
"faucet-pipeline-jsmin": "file:pkg/faucet-pipeline-jsmin",
3839
"faucet-pipeline-jsx": "file:pkg/faucet-pipeline-jsx",
3940
"faucet-pipeline-typescript": "file:pkg/faucet-pipeline-typescript",
40-
"faucet-pipeline-jsmin": "file:pkg/faucet-pipeline-jsmin",
4141
"json-diff": "^0.5.4",
4242
"mocha": "^7.1.2",
4343
"npm-run-all": "^4.1.5",
44-
"release-util-fnd": "^2.0.0"
44+
"release-util-fnd": "^2.0.1"
4545
}
4646
}

pkg/faucet-pipeline-esnext/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "faucet-pipeline-esnext",
3-
"version": "2.1.3",
3+
"version": "2.1.5",
44
"description": "ES6 and beyond for faucet-pipeline",
55
"author": "FND",
66
"license": "Apache-2.0",
@@ -15,7 +15,7 @@
1515
"dependencies": {
1616
"@babel/core": "~7.9.6",
1717
"@babel/preset-env": "~7.9.6",
18-
"@rollup/plugin-babel": "~5.0.0",
19-
"faucet-pipeline-js": "2.1.3"
18+
"@rollup/plugin-babel": "~5.0.2",
19+
"faucet-pipeline-js": "2.1.5"
2020
}
2121
}

pkg/faucet-pipeline-jsmin/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "faucet-pipeline-jsmin",
3-
"version": "2.1.3",
3+
"version": "2.1.5",
44
"description": "JavaScript minification for faucet-pipeline",
55
"author": "FND",
66
"license": "Apache-2.0",

pkg/faucet-pipeline-jsx/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "faucet-pipeline-jsx",
3-
"version": "2.1.3",
3+
"version": "2.1.5",
44
"description": "JSX for faucet-pipeline",
55
"author": "FND",
66
"license": "Apache-2.0",
@@ -14,6 +14,6 @@
1414
},
1515
"dependencies": {
1616
"@babel/plugin-transform-react-jsx": "~7.9.4",
17-
"faucet-pipeline-esnext": "2.1.3"
17+
"faucet-pipeline-esnext": "2.1.5"
1818
}
1919
}

pkg/faucet-pipeline-typescript/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "faucet-pipeline-typescript",
3-
"version": "2.1.3",
3+
"version": "2.1.5",
44
"description": "TypeScript for faucet-pipeline",
55
"author": "FND",
66
"contributors": [
@@ -16,8 +16,8 @@
1616
"url": "https://github.com/faucet-pipeline/faucet-pipeline-js/issues"
1717
},
1818
"dependencies": {
19-
"@rollup/plugin-typescript": "~4.1.1",
20-
"faucet-pipeline-js": "2.1.3",
21-
"typescript": "~3.9.2"
19+
"@rollup/plugin-typescript": "~4.1.2",
20+
"faucet-pipeline-js": "2.1.5",
21+
"typescript": "~3.9.3"
2222
}
2323
}

test/unit/test_bundling.js

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,18 @@ console.log("[\\u2026] ".concat(util)); // eslint-disable-line no-console
9393
filepath: path.resolve(FIXTURES_DIR, "./dist/bundle.js"),
9494
/* eslint-disable max-len */
9595
content: makeBundle(`
96-
function createCommonjsModule(fn, module) {
97-
return module = { exports: {} }, fn(module, module.exports), module.exports;
96+
function createCommonjsModule(fn, basedir, module) {
97+
return module = {
98+
path: basedir,
99+
exports: {},
100+
require: function (path, base) {
101+
return commonjsRequire(path, (base === undefined || base === null) ? module.path : base);
102+
}
103+
}, fn(module, module.exports), module.exports;
104+
}
105+
106+
function commonjsRequire () {
107+
throw new Error('Dynamic requires are not currently supported by @rollup/plugin-commonjs');
98108
}
99109
100110
var dist = createCommonjsModule(function (module) {

0 commit comments

Comments
 (0)