Skip to content

Commit

Permalink
[CLEANUP] Update ember-cli, broccoli plugins, and babel.
Browse files Browse the repository at this point in the history
Broccoli plugins and execa updated to minimize duplication and
not to fully upgrade.

Add all peer deps
  • Loading branch information
krisselden committed Feb 21, 2020
1 parent 15abe4a commit 494a95c
Show file tree
Hide file tree
Showing 15 changed files with 2,557 additions and 2,878 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ branches:

language: node_js
node_js:
- 8
- 10

cache: yarn

Expand Down
2 changes: 1 addition & 1 deletion build/broccoli/build-packages.js
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ function transpileCommonJS(pkgName, esVersion, tree) {
},
},
],
'transform-es2015-modules-commonjs',
'@babel/plugin-transform-modules-commonjs',
],
sourceMaps: 'inline',
};
Expand Down
2 changes: 1 addition & 1 deletion build/broccoli/build-tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ function transpileNodeTestsToCommonJS(jsTree) {

return babel(testTree, {
sourceMaps: 'inline',
plugins: ['transform-es2015-modules-commonjs'],
plugins: ['@babel/plugin-transform-modules-commonjs'],
});
}

Expand Down
15 changes: 10 additions & 5 deletions build/broccoli/strip-glimmer-utilities.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,24 +52,29 @@ function stripFlags(glimmerUtils) {
},
},
]);

glimmerUtils.push([
nuke,
{
source: '@glimmer/debug',
delegate: removeLogging,
},
'nuke-debug-logging',
]);
glimmerUtils.push([nuke, { source: '@glimmer/debug' }, 'nuke-debug']);
glimmerUtils.push([nuke, { source: '@glimmer/vm/lib/-debug-strip' }, 'nuke-vm-debug-strip']);
glimmerUtils.push([
nuke,
{ source: '@glimmer/runtime/lib/compiled/opcodes/-debug-strip' },
'nuke-opcodes-debug-strip',
]);
glimmerUtils.push([nuke, { source: '@glimmer/debug' }]);
glimmerUtils.push([nuke, { source: '@glimmer/vm/lib/-debug-strip' }]);
glimmerUtils.push([nuke, { source: '@glimmer/runtime/lib/compiled/opcodes/-debug-strip' }]);
glimmerUtils.push([nuke, { source: './-debug-strip' }]);
glimmerUtils.push([nuke, { source: './-debug-strip' }, 'nuke-debug-strip']);
glimmerUtils.push([
nuke,
{
source: '@glimmer/vm',
delegate: removeMetaData,
},
'nuke-vm-metadata',
]);
}

Expand Down
25 changes: 14 additions & 11 deletions build/broccoli/transpile-to-es5.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,7 @@ const PRODUCTION = process.env.EMBER_ENV === 'production';
* Transpiles a tree of ES2015+ JavaScript files to ES5 with Babel.
*/
module.exports = function transpileToES5(inputNode, modules = false) {
let plugins = [
// Required for tests to pass in IE <=10, which rely on inheritance of
// static class methods. This doesn't work in IE 10 and below so we
// statically copy properties off __proto__ at class definition time.
'transform-proto-to-assign',
];
let plugins = [];

if (!PRODUCTION) {
// Compile out @glimmer/env for tests
Expand All @@ -33,24 +28,32 @@ module.exports = function transpileToES5(inputNode, modules = false) {
]);
}

return babel(inputNode, {
const options = {
annotation: 'Babel - ES5',
sourceMaps: 'inline',
moduleIds: true,
presets: [
[
'env',
'@babel/preset-env',
{
loose: true,
modules,
exclude: [
// Transforms all `typeof` checks to account for Symbol, which we don't
// rely on, so can safely skip.
'transform-es2015-typeof-symbol',
'@babel/plugin-transform-typeof-symbol',
],
},
],
],
plugins,
});
};

if (modules === 'amd') {
const ensurePosix = require('ensure-posix-path');
const path = require('path');
options.moduleIds = true;
options.getModuleId = modulePath => ensurePosix(path.relative(process.cwd(), modulePath));
}

return babel(inputNode, options);
};
64 changes: 34 additions & 30 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,32 +3,34 @@
"version": "0.47.9",
"private": true,
"description": "Glimmer compiles Handlebars templates into document fragments rather than string buffers",
"license": "MIT",
"author": "Tilde, Inc.",
"repository": {
"type": "git",
"url": "https://github.com/glimmerjs/glimmer-vm.git"
},
"license": "MIT",
"author": "Tilde, Inc.",
"workspaces": [
"packages/*/*"
],
"scripts": {
"browserstack:connect": "ember browserstack:connect",
"browserstack:disconnect": "ember browserstack:disconnect",
"browserstack:results": "ember browserstack:results",
"build": "ember build --env production --suppress-sizes",
"build:flags": "RETAIN_FLAGS=true ember build --env production --suppress-sizes",
"build:typecheck": "tsc -p tsconfig.json --noEmit --pretty false",
"changelog": "lerna-changelog",
"browserstack:connect": "ember browserstack:connect",
"browserstack:disconnect": "ember browserstack:disconnect",
"browserstack:results": "ember browserstack:results",
"eslint": "eslint . --cache --ext .js,.ts",
"link:local": "node bin/yarn-link-local",
"problems": "tsc -p tsconfig.json --noEmit --pretty false",
"start": "ember serve --port=7357",
"test": "ember test",
"test:browserstack": "ember test --test-port=7774 --host 127.0.0.1 --config-file=testem-browserstack.js",
"test:node": "node bin/run-qunit.js",
"test:types": "node bin/run-types-tests.js",
"test:smoke": "SMOKE_TESTS=true ember test",
"eslint": "eslint . --cache --ext .js,.ts",
"eslint:fix": "eslint . --cache --ext .js,.ts --fix",
"problems": "tsc -p tsconfig.json --noEmit --pretty false",
"test:types": "node bin/run-types-tests.js",
"yarn:link": "node bin/yarn-link-all",
"yarn:unlink": "node bin/yarn-link-all --unlink",
"link:local": "node bin/yarn-link-local"
"yarn:unlink": "node bin/yarn-link-all --unlink"
},
"dependencies": {
"@simple-dom/document": "^1.4.0",
Expand All @@ -40,54 +42,56 @@
"simple-html-tokenizer": "^0.5.9"
},
"devDependencies": {
"@babel/core": "^7.8.4",
"@babel/plugin-transform-modules-commonjs": "^7.8.3",
"@babel/preset-env": "^7.8.4",
"@glimmer/env": "0.1.7",
"@types/node": "^13.7.4",
"@types/qunit": "^2.0.31",
"@typescript-eslint/eslint-plugin": "^2.20.0",
"@typescript-eslint/parser": "^2.20.0",
"amd-name-resolver": "^1.3.1",
"auto-dist-tag": "^1.0.0",
"babel-plugin-nukable-import": "^0.4.2",
"babel-plugin-strip-glimmer-utils": "^0.1.1",
"babel-plugin-transform-proto-to-assign": "^6.23.0",
"babel-preset-env": "^1.6.0",
"broccoli-babel-transpiler": "^6.1.2",
"broccoli-concat": "^2.1.0",
"broccoli-babel-transpiler": "^7.4.0",
"broccoli-concat": "^3.7.5",
"broccoli-debug": "^0.6.5",
"broccoli-file-creator": "^1.1.1",
"broccoli-funnel": "^2.0.1",
"broccoli-file-creator": "^2.1.1",
"broccoli-funnel": "^2.0.2",
"broccoli-merge-trees": "^3.0.2",
"broccoli-persistent-filter": "^2.1.1",
"broccoli-persistent-filter": "^2.3.1",
"broccoli-plugin": "^3.1.0",
"broccoli-rollup": "^2.0.0",
"broccoli-source": "^1.1.0",
"broccoli-rollup": "^4.1.1",
"broccoli-source": "^3.0.0",
"broccoli-typescript-compiler": "^4.2.0",
"chalk": "^3.0.0",
"dag-map": "^2.0.2",
"ember-cli": "~3.6.1",
"ember-cli": "~3.16.0",
"ember-cli-browserstack": "^1.0.1",
"ensure-posix-path": "^1.1.1",
"eslint": "^6.8.0",
"eslint-config-prettier": "^6.10.0",
"eslint-plugin-node": "^11.0.0",
"eslint-plugin-prettier": "^3.1.2",
"eslint-plugin-qunit": "^4.0.0",
"execa": "^3.4.0",
"execa": "^1.0.0",
"glob": "^7.0.5",
"js-yaml": "^3.10.0",
"lerna-changelog": "^0.8.2",
"loader.js": "^4.0.10",
"mkdirp": "^0.5.1",
"prettier": "^1.19.1",
"qunit": "^2.9.1",
"qunit": "^2.9.3",
"qunit-tap": "^1.5.1",
"rimraf": "^2.6.1",
"rollup-plugin-sourcemaps": "^0.4.2",
"semver": "^5.3.0",
"rimraf": "^2.7.1",
"rollup": "^1.31.1",
"rollup-plugin-sourcemaps": "^0.5.0",
"semver": "^6.3.0",
"testem-failure-only-reporter": "^0.0.1",
"toml": "^2.3.3"
"toml": "^3.0.0",
"typescript": "3.5.3"
},
"workspaces": [
"packages/*/*"
],
"changelog": {
"repo": "glimmerjs/glimmer-vm",
"labels": {
Expand Down
4 changes: 2 additions & 2 deletions packages/@glimmer/debug/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"@simple-dom/interface": "^1.4.0"
},
"devDependencies": {
"@types/qunit": "^2.0.31",
"toml": "^2.3.3"
"@types/qunit": "^2.9.0",
"toml": "^3.0.0"
}
}
2 changes: 1 addition & 1 deletion packages/@glimmer/dom-change-list/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
"devDependencies": {
"@simple-dom/serializer": "^1.4.0",
"@simple-dom/void-map": "^1.4.0",
"@types/qunit": "^2.0.31"
"@types/qunit": "^2.9.0"
}
}
2 changes: 1 addition & 1 deletion packages/@glimmer/integration-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@
"simple-html-tokenizer": "^0.5.9"
},
"devDependencies": {
"@types/qunit": "^2.0.31"
"@types/qunit": "^2.9.0"
}
}
2 changes: 1 addition & 1 deletion packages/@glimmer/node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"@simple-dom/interface": "^1.4.0"
},
"devDependencies": {
"@types/qunit": "^2.0.31",
"@types/qunit": "^2.9.0",
"@glimmer/compiler": "^0.47.9"
}
}
2 changes: 1 addition & 1 deletion packages/@glimmer/object/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
"@glimmer/util": "^0.47.9"
},
"devDependencies": {
"@types/qunit": "^2.0.31"
"@types/qunit": "^2.9.0"
}
}
2 changes: 1 addition & 1 deletion packages/@glimmer/runtime/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@
"@glimmer/object-reference": "^0.47.9",
"@glimmer/opcode-compiler": "^0.47.9",
"@glimmer/debug": "^0.47.9",
"@types/qunit": "^2.0.31"
"@types/qunit": "^2.9.0"
}
}
2 changes: 1 addition & 1 deletion packages/@glimmer/syntax/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
},
"devDependencies": {
"@glimmer/local-debug-flags": "^0.47.9",
"@types/qunit": "^2.0.31"
"@types/qunit": "^2.9.0"
}
}
2 changes: 1 addition & 1 deletion packages/@glimmer/util/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
},
"devDependencies": {
"@glimmer/local-debug-flags": "^0.47.9",
"@types/qunit": "^2.0.31",
"@types/qunit": "^2.9.0",
"@simple-dom/interface": "^1.4.0"
},
"typings": "index.ts"
Expand Down
Loading

0 comments on commit 494a95c

Please sign in to comment.