Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into the-platform
Browse files Browse the repository at this point in the history
  • Loading branch information
ef4 committed Mar 9, 2021
2 parents 2c0883f + d97b87e commit bcc3cec
Show file tree
Hide file tree
Showing 22 changed files with 123 additions and 62 deletions.
43 changes: 43 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,48 @@
# Embroider Changelog

## v0.37.0 (2021-03-08)

#### :rocket: Enhancement
* `core`
* [#713](https://github.com/embroider-build/embroider/pull/713) Avoid monkey patching template compiler for 3.24.3 and 3.25.2+. ([@rwjblue](https://github.com/rwjblue))
* [#705](https://github.com/embroider-build/embroider/pull/705) Avoid patching the template compiler on Ember 3.26. ([@rwjblue](https://github.com/rwjblue))
* [#700](https://github.com/embroider-build/embroider/pull/700) TemplateCompiler fixes / improvements (avoid monkey patch for Ember 3.27+) ([@rwjblue](https://github.com/rwjblue))
* `macros`
* [#712](https://github.com/embroider-build/embroider/pull/712) Allow macroCondition inside modifier ([@simonihmig](https://github.com/simonihmig))
* [#694](https://github.com/embroider-build/embroider/pull/694) Run importSync transform later, so ember-auto-import can support importSync ([@simonihmig](https://github.com/simonihmig))

#### :bug: Bug Fix
* `compat`
* [#710](https://github.com/embroider-build/embroider/pull/710) Fix case where `autoRun` is `false` but no other addon set content into the `{{content-for 'app-boot'}}` ([@thoov](https://github.com/thoov))
* [#674](https://github.com/embroider-build/embroider/pull/674) adjust paths seen by css preprocessors ([@ef4](https://github.com/ef4))
* [#702](https://github.com/embroider-build/embroider/pull/702) Handle case where node_modules are symlinked ([@thoov](https://github.com/thoov))
* [#690](https://github.com/embroider-build/embroider/pull/690) Exclude 'babel-plugin-compact-reexports' during Stage 1 build ([@charlespierce](https://github.com/charlespierce))
* [#687](https://github.com/embroider-build/embroider/pull/687) Strip `main` field from v1 addons' `package.json` once they are rewritten as V2 ([@ef4](https://github.com/ef4))
* `compat`, `core`
* [#709](https://github.com/embroider-build/embroider/pull/709) Fix the path to the on-disk styles file for in-repo engines ([@charlespierce](https://github.com/charlespierce))
* `core`
* [#686](https://github.com/embroider-build/embroider/pull/686) Prevent accidental duplication of babel plugin during rebuilds ([@ef4](https://github.com/ef4))

#### :house: Internal
* `compat`
* [#706](https://github.com/embroider-build/embroider/pull/706) Remove `ember-cli-htmlbars` dependency in `@embroider/compat`. ([@rwjblue](https://github.com/rwjblue))
* Other
* [#711](https://github.com/embroider-build/embroider/pull/711) Add release automation setup. ([@rwjblue](https://github.com/rwjblue))
* [#704](https://github.com/embroider-build/embroider/pull/704) Avoid running CI jobs on both push and pull_request events. ([@rwjblue](https://github.com/rwjblue))
* [#697](https://github.com/embroider-build/embroider/pull/697) Refactor suite-setup-util to avoid knock on errors. ([@rwjblue](https://github.com/rwjblue))
* `core`, `macros`
* [#707](https://github.com/embroider-build/embroider/pull/707) Fixup types for newer @babel/types. ([@rwjblue](https://github.com/rwjblue))
* `router`, `util`
* [#703](https://github.com/embroider-build/embroider/pull/703) Add 3.20 and 3.24 to list of matrix tests. ([@rwjblue](https://github.com/rwjblue))

#### Committers: 5
- Charles Pierce ([@charlespierce](https://github.com/charlespierce))
- Edward Faulkner ([@ef4](https://github.com/ef4))
- Robert Jackson ([@rwjblue](https://github.com/rwjblue))
- Simon Ihmig ([@simonihmig](https://github.com/simonihmig))
- Travis Hoover ([@thoov](https://github.com/thoov))


## 0.36.0 (2021-01-21)

- BUGFIX: fix non-legacy CSS handling in production builds when using `@embroider/webpack`
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,5 +82,6 @@
"volta": {
"node": "12.16.1",
"yarn": "1.17.3"
}
},
"version": "0.37.0"
}
2 changes: 1 addition & 1 deletion packages/babel-loader-7/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@embroider/babel-loader-7",
"version": "0.36.0",
"version": "0.37.0",
"repository": {
"type": "git",
"url": "https://github.com/embroider-build/embroider.git",
Expand Down
9 changes: 4 additions & 5 deletions packages/compat/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@embroider/compat",
"version": "0.36.0",
"version": "0.37.0",
"private": false,
"description": "Backward compatibility layer for the Embroider build system.",
"repository": {
Expand Down Expand Up @@ -30,7 +30,7 @@
"@babel/preset-env": "^7.12.1",
"@babel/traverse": "^7.12.1",
"@babel/types": "^7.12.1",
"@embroider/macros": "0.36.0",
"@embroider/macros": "0.37.0",
"@types/babel__code-frame": "^7.0.2",
"@types/yargs": "^15.0.9",
"assert-never": "^1.1.0",
Expand All @@ -47,8 +47,6 @@
"broccoli-source": "^3.0.0",
"chalk": "^4.1.0",
"debug": "^3.1.0",
"ember-cli-htmlbars": "^4.0.9",
"ember-cli-htmlbars-3": "npm:ember-cli-htmlbars@3",
"fs-extra": "^7.0.0",
"fs-tree-diff": "^2.0.0",
"jsdom": "^16.4.0",
Expand Down Expand Up @@ -80,10 +78,11 @@
"@types/semver": "^7.3.4",
"@types/strip-bom": "^3.0.0",
"ember-cli-htmlbars-inline-precompile": "^2.1.0",
"ember-cli-htmlbars-3": "npm:ember-cli-htmlbars@3",
"typescript": "~4.0.0"
},
"peerDependencies": {
"@embroider/core": "0.36.0"
"@embroider/core": "0.37.0"
},
"engines": {
"node": "10.* || 12.* || >= 14"
Expand Down
9 changes: 5 additions & 4 deletions packages/compat/src/build-compat-addon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import broccoliMergeTrees from 'broccoli-merge-trees';
import { Node } from 'broccoli-node-api';
import OneShot from './one-shot';
import Funnel from 'broccoli-funnel';
import { UnwatchedDir } from 'broccoli-source';
import { UnwatchedDir, WatchedDir } from 'broccoli-source';
import EmptyPackageTree from './empty-package-tree';

export default function cachedBuildCompatAddon(originalPackage: Package, v1Cache: V1InstanceCache): Node {
Expand All @@ -22,7 +22,7 @@ function buildCompatAddon(originalPackage: Package, v1Cache: V1InstanceCache): N
// non-native-v2 addon. (The non-native one will get rewritten and
// therefore moved, so to continue depending on it the native one needs to
// move too.)
return withoutNodeModules(originalPackage.root);
return withoutNodeModules(originalPackage);
}

let oldPackages = v1Cache.getAddons(originalPackage.root);
Expand All @@ -49,8 +49,9 @@ function buildCompatAddon(originalPackage: Package, v1Cache: V1InstanceCache): N
}
}

function withoutNodeModules(root: string): Node {
return new Funnel(new UnwatchedDir(root), {
function withoutNodeModules(originalPackage: Package): Node {
let Klass = originalPackage.mayRebuild ? WatchedDir : UnwatchedDir;
return new Funnel(new Klass(originalPackage.root), {
exclude: ['node_modules'],
});
}
12 changes: 11 additions & 1 deletion packages/compat/src/compat-addons.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import Options, { optionsWithDefaults } from './options';
import V1App from './v1-app';
import { createHash } from 'crypto';
import TreeSync from 'tree-sync';
import { WatchedDir } from 'broccoli-source';

export default class CompatAddons implements Stage {
private didBuild = false;
Expand Down Expand Up @@ -42,9 +43,18 @@ export default class CompatAddons implements Stage {

get tree(): Node {
let movedAddons = [...this.packageCache.moved.keys()].map(oldPkg => buildCompatAddon(oldPkg, this.v1Cache));

// these get watched so that EMBROIDER_REBUILD_ADDONS will still work
// correctly, even for v2 addons that have no v1 addon deps and therefore
// don't need to be moved. We don't consume these trees in our build step,
// we only do this to trigger rebuilds to happen.
let watchedUnmovedAddons = [...this.packageCache.unmovedAddons]
.filter(pkg => pkg.mayRebuild)
.map(pkg => new WatchedDir(pkg.root));

let { synthVendor, synthStyles } = this.getSyntheticPackages(this.v1Cache.app, movedAddons);
return new WaitForTrees(
{ movedAddons, synthVendor, synthStyles },
{ movedAddons, synthVendor, synthStyles, watchedUnmovedAddons },
'@embroider/compat/addons',
this.build.bind(this)
);
Expand Down
8 changes: 8 additions & 0 deletions packages/compat/src/moved-package-cache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ export class MovedPackageCache extends PackageCache {
readonly appDestDir: string;
private commonSegmentCount: number;
readonly moved: Map<Package, Package> = new Map();
readonly unmovedAddons: Set<Package>;

constructor(
rootCache: PackageCache['rootCache'],
Expand Down Expand Up @@ -82,6 +83,7 @@ export class MovedPackageCache extends PackageCache {
}
this.rootCache = rootCache;
this.resolutionCache = resolutionCache;
this.unmovedAddons = movedSet.unmovedAddons;
}

private movedPackage(originalPkg: Package): Package {
Expand Down Expand Up @@ -215,6 +217,7 @@ function pathSegments(filename: string) {

class MovedSet {
private mustMove: Map<Package, boolean> = new Map();
unmovedAddons: Set<Package> = new Set();

constructor(private app: Package) {
this.check(app);
Expand Down Expand Up @@ -256,6 +259,11 @@ class MovedSet {
mustMove = this.check(dep) || mustMove;
}
this.mustMove.set(pkg, mustMove);

if (!mustMove) {
this.unmovedAddons.add(pkg);
}

return mustMove;
}

Expand Down
2 changes: 1 addition & 1 deletion packages/compat/src/v1-addon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { AddonMeta, NodeTemplateCompiler, debug, PackageCache, Resolver, extensi
import Options from './options';
import walkSync from 'walk-sync';
import ObserveTree from './observe-tree';
import { Options as HTMLBarsOptions } from 'ember-cli-htmlbars';
import type { Options as HTMLBarsOptions } from 'ember-cli-htmlbars';
import { isEmbroiderMacrosPlugin } from '@embroider/macros/src/node';
import { TransformOptions, PluginItem } from '@babel/core';
import V1App from './v1-app';
Expand Down
4 changes: 2 additions & 2 deletions packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@embroider/core",
"version": "0.36.0",
"version": "0.37.0",
"private": false,
"description": "A build system for EmberJS applications.",
"repository": {
Expand Down Expand Up @@ -35,7 +35,7 @@
"@babel/runtime": "^7.12.5",
"@babel/traverse": "^7.12.1",
"@babel/types": "^7.12.1",
"@embroider/macros": "0.36.0",
"@embroider/macros": "0.37.0",
"assert-never": "^1.1.0",
"babel-plugin-syntax-dynamic-import": "^6.18.0",
"broccoli-node-api": "^1.7.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/hbs-loader/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@embroider/hbs-loader",
"version": "0.36.0",
"version": "0.37.0",
"private": false,
"description": "Glimmer handlebars loader for webpack",
"repository": {
Expand Down Expand Up @@ -28,7 +28,7 @@
"typescript": "~4.0.0"
},
"peerDependencies": {
"@embroider/core": "0.36.0",
"@embroider/core": "0.37.0",
"webpack": "^4 | ^5"
},
"engines": {
Expand Down
4 changes: 2 additions & 2 deletions packages/macros/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@embroider/macros",
"version": "0.36.0",
"version": "0.37.0",
"private": false,
"description": "Standardized build-time macros for ember apps.",
"keywords": [
Expand All @@ -27,7 +27,7 @@
"@babel/core": "^7.12.3",
"@babel/traverse": "^7.12.1",
"@babel/types": "^7.12.1",
"@embroider/core": "0.36.0",
"@embroider/core": "0.37.0",
"assert-never": "^1.1.0",
"ember-cli-babel": "^7.23.0",
"lodash": "^4.17.10",
Expand Down
12 changes: 6 additions & 6 deletions packages/router/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@embroider/router",
"version": "0.36.0",
"version": "0.37.0",
"description": "Lazy loading router",
"keywords": [
"ember-addon"
Expand Down Expand Up @@ -28,15 +28,15 @@
"test:classic": "CLASSIC=true ember test --test-port=0"
},
"dependencies": {
"@embroider/macros": "0.36.0",
"@embroider/macros": "0.37.0",
"ember-cli-babel": "^7.23.0"
},
"devDependencies": {
"@ember/optional-features": "^0.7.0",
"@embroider/compat": "0.36.0",
"@embroider/core": "0.36.0",
"@embroider/compat": "0.37.0",
"@embroider/core": "0.37.0",
"@embroider/test-support": "0.36.0",
"@embroider/webpack": "0.36.0",
"@embroider/webpack": "0.37.0",
"@types/ember__routing": "^3.16.9",
"babel-eslint": "^10.1.0",
"broccoli-asset-rev": "^3.0.0",
Expand Down Expand Up @@ -64,7 +64,7 @@
"qunit-dom": "^0.8.4"
},
"peerDependencies": {
"@embroider/core": "*",
"@embroider/core": "0.37.0",
"@types/ember__routing": "*"
},
"peerDependenciesMeta": {
Expand Down
4 changes: 2 additions & 2 deletions packages/test-setup/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@embroider/test-setup",
"version": "0.36.0",
"version": "0.37.0",
"repository": {
"type": "git",
"url": "https://github.com/embroider-build/embroider.git",
Expand All @@ -16,7 +16,7 @@
"resolve": "^1.17.0"
},
"devDependencies": {
"@embroider/compat": "0.36.0"
"@embroider/compat": "0.37.0"
},
"volta": {
"extends": "../../package.json"
Expand Down
12 changes: 6 additions & 6 deletions packages/util/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@embroider/util",
"version": "0.36.0",
"version": "0.37.0",
"description": "The default blueprint for ember-cli addons.",
"keywords": [
"ember-addon"
Expand All @@ -24,16 +24,16 @@
"test:ember-compatibility": "ember try:each"
},
"dependencies": {
"@embroider/macros": "0.36.0",
"@embroider/macros": "0.37.0",
"ember-cli-babel": "^7.22.1"
},
"devDependencies": {
"@ember/optional-features": "^2.0.0",
"@embroider/compat": "0.36.0",
"@embroider/core": "0.36.0",
"@embroider/test-setup": "0.36.0",
"@embroider/compat": "0.37.0",
"@embroider/core": "0.37.0",
"@embroider/test-setup": "0.37.0",
"@embroider/test-support": "0.36.0",
"@embroider/webpack": "0.36.0",
"@embroider/webpack": "0.37.0",
"@glimmer/component": "^1.0.1",
"@glimmer/tracking": "^1.0.1",
"babel-eslint": "^10.1.0",
Expand Down
8 changes: 4 additions & 4 deletions packages/webpack/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@embroider/webpack",
"version": "0.36.0",
"version": "0.37.0",
"private": false,
"description": "Builds EmberJS apps with Webpack",
"repository": {
Expand All @@ -23,8 +23,8 @@
"@babel/core": "^7.12.3",
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.12.1",
"@babel/plugin-proposal-optional-chaining": "^7.12.1",
"@embroider/babel-loader-7": "0.36.0",
"@embroider/hbs-loader": "0.36.0",
"@embroider/babel-loader-7": "0.37.0",
"@embroider/hbs-loader": "0.37.0",
"@types/source-map": "^0.5.7",
"babel-core": "^6.26.3",
"babel-loader": "8",
Expand Down Expand Up @@ -53,7 +53,7 @@
"typescript": "~4.0.0"
},
"peerDependencies": {
"@embroider/core": "0.36.0"
"@embroider/core": "0.37.0"
},
"engines": {
"node": "10.* || 12.* || >= 14"
Expand Down
8 changes: 4 additions & 4 deletions test-packages/engines-host-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@
"devDependencies": {
"@ember/jquery": "^0.6.0",
"@ember/optional-features": "^0.7.0",
"@embroider/compat": "0.36.0",
"@embroider/core": "0.36.0",
"@embroider/router": "0.36.0",
"@embroider/compat": "0.37.0",
"@embroider/core": "0.37.0",
"@embroider/router": "0.37.0",
"@embroider/test-support": "0.36.0",
"@embroider/webpack": "0.36.0",
"@embroider/webpack": "0.37.0",
"broccoli-asset-rev": "^3.0.0",
"eager-engine": "0.0.0",
"ember-cli": "~3.10.1",
Expand Down
Loading

0 comments on commit bcc3cec

Please sign in to comment.