Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/stable' into bugfix-template-tag…
Browse files Browse the repository at this point in the history
…-codemod-ts
  • Loading branch information
void-mAlex committed Oct 8, 2024
2 parents 52a00d1 + 38600e7 commit bba6cf5
Show file tree
Hide file tree
Showing 14 changed files with 3,286 additions and 2,857 deletions.
96 changes: 87 additions & 9 deletions .release-plan.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,20 @@
{
"solution": {
"@embroider/addon-dev": {
"oldVersion": "5.0.0"
"impact": "major",
"oldVersion": "5.0.0",
"newVersion": "6.0.0",
"constraints": [
{
"impact": "major",
"reason": "Appears in changelog section :boom: Breaking Change"
},
{
"impact": "minor",
"reason": "Appears in changelog section :rocket: Enhancement"
}
],
"pkgJSONPath": "./packages/addon-dev/package.json"
},
"@embroider/addon-shim": {
"oldVersion": "1.8.9"
Expand All @@ -10,13 +23,34 @@
"oldVersion": "3.1.1"
},
"@embroider/compat": {
"oldVersion": "3.6.1"
"impact": "patch",
"oldVersion": "3.6.1",
"newVersion": "3.6.2",
"constraints": [
{
"impact": "patch",
"reason": "Has dependency `workspace:*` on @embroider/macros"
},
{
"impact": "patch",
"reason": "Appears in changelog section :bug: Bug Fix"
}
],
"pkgJSONPath": "./packages/compat/package.json"
},
"@embroider/core": {
"impact": "patch",
"oldVersion": "3.4.15",
"newVersion": "3.4.16",
"oldVersion": "3.4.16",
"newVersion": "3.4.17",
"constraints": [
{
"impact": "patch",
"reason": "Has dependency `workspace:*` on @embroider/shared-internals"
},
{
"impact": "patch",
"reason": "Has dependency `workspace:*` on @embroider/macros"
},
{
"impact": "patch",
"reason": "Appears in changelog section :bug: Bug Fix"
Expand All @@ -28,7 +62,16 @@
"oldVersion": "3.0.3"
},
"@embroider/macros": {
"oldVersion": "1.16.6"
"impact": "patch",
"oldVersion": "1.16.6",
"newVersion": "1.16.7",
"constraints": [
{
"impact": "patch",
"reason": "Has dependency `workspace:*` on @embroider/shared-internals"
}
],
"pkgJSONPath": "./packages/macros/package.json"
},
"@embroider/reverse-exports": {
"oldVersion": "0.1.0"
Expand All @@ -37,7 +80,20 @@
"oldVersion": "2.1.8"
},
"@embroider/shared-internals": {
"oldVersion": "2.6.3"
"impact": "minor",
"oldVersion": "2.6.3",
"newVersion": "2.7.0",
"constraints": [
{
"impact": "minor",
"reason": "Appears in changelog section :rocket: Enhancement"
},
{
"impact": "patch",
"reason": "Appears in changelog section :bug: Bug Fix"
}
],
"pkgJSONPath": "./packages/shared-internals/package.json"
},
"@embroider/test-setup": {
"oldVersion": "4.0.0"
Expand All @@ -46,11 +102,33 @@
"oldVersion": "1.13.2"
},
"@embroider/vite": {
"oldVersion": "0.2.0"
"impact": "patch",
"oldVersion": "0.2.0",
"newVersion": "0.2.1",
"constraints": [
{
"impact": "patch",
"reason": "Appears in changelog section :bug: Bug Fix"
}
],
"pkgJSONPath": "./packages/vite/package.json"
},
"@embroider/webpack": {
"oldVersion": "4.0.5"
"impact": "patch",
"oldVersion": "4.0.5",
"newVersion": "4.0.6",
"constraints": [
{
"impact": "patch",
"reason": "Has dependency `workspace:*` on @embroider/shared-internals"
},
{
"impact": "patch",
"reason": "Appears in changelog section :bug: Bug Fix"
}
],
"pkgJSONPath": "./packages/webpack/package.json"
}
},
"description": "## Release (2024-09-20)\n\n@embroider/core 3.4.16 (patch)\n\n#### :bug: Bug Fix\n* `@embroider/core`, `@embroider/test-scenarios`\n * [#2088](https://github.com/embroider-build/embroider/pull/2088) Implement ember's component-template-resolving deprecation ([@ef4](https://github.com/ef4))\n\n#### Committers: 1\n- Edward Faulkner ([@ef4](https://github.com/ef4))\n"
"description": "## Release (2024-10-01)\n\n@embroider/addon-dev 6.0.0 (major)\n@embroider/compat 3.6.2 (patch)\n@embroider/core 3.4.17 (patch)\n@embroider/macros 1.16.7 (patch)\n@embroider/shared-internals 2.7.0 (minor)\n@embroider/vite 0.2.1 (patch)\n@embroider/webpack 4.0.6 (patch)\n\n#### :boom: Breaking Change\n* `@embroider/addon-dev`, `@embroider/test-scenarios`\n * [#2082](https://github.com/embroider-build/embroider/pull/2082) Hide base path from public URL of rollup-public-assets ([@simonihmig](https://github.com/simonihmig))\n\n#### :rocket: Enhancement\n* `@embroider/addon-dev`, `@embroider/shared-internals`, `@embroider/test-scenarios`\n * [#2121](https://github.com/embroider-build/embroider/pull/2121) backport #1855 addon-dev: incremental updates to output ([@patricklx](https://github.com/patricklx))\n\n#### :bug: Bug Fix\n* `@embroider/compat`, `@embroider/core`, `@embroider/vite`, `@embroider/webpack`, `@embroider/test-scenarios`\n * [#2127](https://github.com/embroider-build/embroider/pull/2127) Bump jsdom to fix punycode deprecation messages from tr46, psl, and whatwg-url ([@NullVoxPopuli](https://github.com/NullVoxPopuli))\n* `@embroider/shared-internals`, `@embroider/test-scenarios`\n * [#2122](https://github.com/embroider-build/embroider/pull/2122) speedup windows ci on stable ([@patricklx](https://github.com/patricklx))\n\n#### Committers: 3\n- Patrick Pircher ([@patricklx](https://github.com/patricklx))\n- Simon Ihmig ([@simonihmig](https://github.com/simonihmig))\n- [@NullVoxPopuli](https://github.com/NullVoxPopuli)\n"
}
29 changes: 29 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,34 @@
# Embroider Changelog

## Release (2024-10-01)

@embroider/addon-dev 6.0.0 (major)
@embroider/compat 3.6.2 (patch)
@embroider/core 3.4.17 (patch)
@embroider/macros 1.16.7 (patch)
@embroider/shared-internals 2.7.0 (minor)
@embroider/vite 0.2.1 (patch)
@embroider/webpack 4.0.6 (patch)

#### :boom: Breaking Change
* `@embroider/addon-dev`, `@embroider/test-scenarios`
* [#2082](https://github.com/embroider-build/embroider/pull/2082) Hide base path from public URL of rollup-public-assets ([@simonihmig](https://github.com/simonihmig))

#### :rocket: Enhancement
* `@embroider/addon-dev`, `@embroider/shared-internals`, `@embroider/test-scenarios`
* [#2121](https://github.com/embroider-build/embroider/pull/2121) backport #1855 addon-dev: incremental updates to output ([@patricklx](https://github.com/patricklx))

#### :bug: Bug Fix
* `@embroider/compat`, `@embroider/core`, `@embroider/vite`, `@embroider/webpack`, `@embroider/test-scenarios`
* [#2127](https://github.com/embroider-build/embroider/pull/2127) Bump jsdom to fix punycode deprecation messages from tr46, psl, and whatwg-url ([@NullVoxPopuli](https://github.com/NullVoxPopuli))
* `@embroider/shared-internals`, `@embroider/test-scenarios`
* [#2122](https://github.com/embroider-build/embroider/pull/2122) speedup windows ci on stable ([@patricklx](https://github.com/patricklx))

#### Committers: 3
- Patrick Pircher ([@patricklx](https://github.com/patricklx))
- Simon Ihmig ([@simonihmig](https://github.com/simonihmig))
- [@NullVoxPopuli](https://github.com/NullVoxPopuli)

## Release (2024-09-20)

@embroider/core 3.4.16 (patch)
Expand Down
2 changes: 1 addition & 1 deletion packages/addon-dev/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@embroider/addon-dev",
"version": "5.0.0",
"version": "6.0.0",
"description": "Utilities for addon authors",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion packages/compat/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@embroider/compat",
"version": "3.6.1",
"version": "3.6.2",
"private": false,
"description": "Backward compatibility layer for the Embroider build system.",
"repository": {
Expand Down
31 changes: 30 additions & 1 deletion packages/compat/src/v1-addon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,10 @@ export default class V1Addon {
@Memoize()
private get templateCompilerBabelPlugin(): PluginItem | undefined {
let plugins = loadAstPlugins(this.addonInstance.registry);
let hasTemplateTag = this.addonInstance.addons.find((a: any) => a.name === 'ember-template-imports');
// our macros don't run here in stage1
plugins = plugins.filter((p: any) => !isEmbroiderMacrosPlugin(p));
if (plugins.length > 0) {
if (plugins.length > 0 || hasTemplateTag) {
let compilerPath = require.resolve('ember-source/dist/ember-template-compiler.js', {
paths: [findTopmostAddon(this.addonInstance).parent.root],
});
Expand Down Expand Up @@ -205,6 +206,34 @@ export default class V1Addon {
// the older inline template compiler is present
return true;
}
if (this.addonInstance.addons.find((a: any) => a.name === 'ember-template-imports')) {
/**
* Stage1 will always run custom broccoli preprocessors. So that's enough to convert:
*
* import Thing from './thing';
* <template><Thing/></template>
* to
*
* import Thing from './thing';
* import { template } from '@ember/template-compiler';
* export default template("Thing", {
* eval: function() { return eval(arguments[0]) } })
* });
* This is really all we need to do at stage1, since this is now valid Javascript that could appear in a v2 addon.
*
* But if the addon is also using TS, we also need to run the typescript transform before it will be valid JS. And if the typescript transform was being truly correct it would not try to delete the import because the eval can see the imported binding. That's why we have an eval. It's a standards-compliant want of gaining access to everything in scope.
*
* Normally we only use babel-plugin-ember-template-compilation in stage1 to run custom AST transforms. Since there are none in the addon, we don't add it. The fix here is helping because there is a new reason to add it. It will further convert the above example to:
*
* import Thing from './thing';
* import { template } from '@ember/template-compiler';
* export default template("Thing", {
* scope: () => ({ Thing })
* });
* which typescript then respects.
*/
return true;
}

if (
this.addonInstance.addons.find(
Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@embroider/core",
"version": "3.4.16",
"version": "3.4.17",
"private": false,
"description": "A build system for EmberJS applications.",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion packages/macros/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@embroider/macros",
"version": "1.16.6",
"version": "1.16.7",
"private": false,
"description": "Standardized build-time macros for ember apps.",
"keywords": [
Expand Down
2 changes: 1 addition & 1 deletion packages/shared-internals/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@embroider/shared-internals",
"version": "2.6.3",
"version": "2.7.0",
"private": false,
"description": "Utilities shared among the other embroider packages",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion packages/vite/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@embroider/vite",
"version": "0.2.0",
"version": "0.2.1",
"main": "index.mjs",
"peerDependencies": {
"@embroider/core": "workspace:^",
Expand Down
2 changes: 1 addition & 1 deletion packages/webpack/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@embroider/webpack",
"version": "4.0.5",
"version": "4.0.6",
"private": false,
"description": "Builds EmberJS apps with Webpack",
"repository": {
Expand Down
Loading

0 comments on commit bba6cf5

Please sign in to comment.