Skip to content

Commit

Permalink
Merge branch 'embroider-build:main' into fix-missing-assets
Browse files Browse the repository at this point in the history
  • Loading branch information
patricklx authored Nov 14, 2024
2 parents 3013f36 + 7195610 commit 16efa2a
Show file tree
Hide file tree
Showing 41 changed files with 1,441 additions and 365 deletions.
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
/packages/webpack/**/*.d.ts
/packages/hbs-loader/**/*.js
/packages/hbs-loader/**/*.d.ts
/packages/broccoli-side-watch/**/*.js
/packages/broccoli-side-watch/**/*.d.ts
/test-packages/support/**/*.js
/test-packages/**/*.d.ts
/test-packages/release/src/*.js
Expand Down
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
/packages/webpack/**/*.d.ts
/packages/hbs-loader/**/*.js
/packages/hbs-loader/**/*.d.ts
/packages/broccoli-side-watch/**/*.js
/packages/broccoli-side-watch/**/*.d.ts
/test-packages/support/**/*.js
/test-packages/**/*.d.ts
/test-packages/release/src/*.js
Expand Down
146 changes: 146 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,151 @@
# Embroider Changelog

## Release (2024-11-11)

@embroider/addon-dev 7.0.0 (major)

#### :boom: Breaking Change
* `@embroider/addon-dev`
* [#2166](https://github.com/embroider-build/embroider/pull/2166) Fix gjs/gts sourcemaps -- we accidentally unlocked really good DX ([@NullVoxPopuli](https://github.com/NullVoxPopuli))

#### Committers: 1
- [@NullVoxPopuli](https://github.com/NullVoxPopuli)

## Release (2024-11-05)

@embroider/compat 3.7.0 (minor)

#### :rocket: Enhancement
* `@embroider/compat`
* [#2164](https://github.com/embroider-build/embroider/pull/2164) Support v2 ember-source ([@ef4](https://github.com/ef4))

#### Committers: 1
- Edward Faulkner ([@ef4](https://github.com/ef4))

## Release (2024-10-31)

@embroider/addon-shim 1.9.0 (minor)

#### :rocket: Enhancement
* `@embroider/addon-shim`
* [#2158](https://github.com/embroider-build/embroider/pull/2158) Add a new option for addon-shim to pass config to ember-auto-import ([@ef4](https://github.com/ef4))

#### :house: Internal
* `@embroider/test-scenarios`, `ts-app-template`
* [#2159](https://github.com/embroider-build/embroider/pull/2159) pinning @types/qunit to fix ci ([@ef4](https://github.com/ef4))

#### Committers: 1
- Edward Faulkner ([@ef4](https://github.com/ef4))

## Release (2024-10-09)

@embroider/compat 3.6.5 (patch)
@embroider/core 3.4.19 (patch)
@embroider/macros 1.16.9 (patch)
@embroider/shared-internals 2.8.1 (patch)
@embroider/webpack 4.0.8 (patch)

#### :bug: Bug Fix
* `@embroider/shared-internals`
* [#2151](https://github.com/embroider-build/embroider/pull/2151) Fix hbs plugin not resolving .hbs due to broken Regex ([@simonihmig](https://github.com/simonihmig))

#### Committers: 1
- Simon Ihmig ([@simonihmig](https://github.com/simonihmig))

## Release (2024-10-09)

@embroider/broccoli-side-watch 1.0.1 (patch)

#### :bug: Bug Fix
* `@embroider/broccoli-side-watch`
* [#2148](https://github.com/embroider-build/embroider/pull/2148) Fix broken default export when required from CJS ([@simonihmig](https://github.com/simonihmig))

#### Committers: 1
- Simon Ihmig ([@simonihmig](https://github.com/simonihmig))

## Release (2024-10-09)

@embroider/addon-dev 6.0.1 (patch)
@embroider/broccoli-side-watch 1.0.0 (major)
@embroider/compat 3.6.4 (patch)
@embroider/core 3.4.18 (patch)
@embroider/macros 1.16.8 (patch)
@embroider/shared-internals 2.8.0 (minor)
@embroider/webpack 4.0.7 (patch)

#### :boom: Breaking Change
* `@embroider/broccoli-side-watch`
* [#2146](https://github.com/embroider-build/embroider/pull/2146) Fix broccoli-side-watch so release-plan will release as 1.0.0 ([@simonihmig](https://github.com/simonihmig))

#### :rocket: Enhancement
* `@embroider/broccoli-side-watch`, `@embroider/shared-internals`
* [#2141](https://github.com/embroider-build/embroider/pull/2141) Add better broccoli-side-watch package ([@simonihmig](https://github.com/simonihmig))

#### :bug: Bug Fix
* `@embroider/addon-dev`, `@embroider/test-scenarios`
* [#2136](https://github.com/embroider-build/embroider/pull/2136) Enforce correct plugin order in addon-dev ([@simonihmig](https://github.com/simonihmig))

#### Committers: 1
- Simon Ihmig ([@simonihmig](https://github.com/simonihmig))

## Release (2024-10-08)

@embroider/compat 3.6.3 (patch)

#### :bug: Bug Fix
* `@embroider/compat`, `@embroider/test-scenarios`
* [#2133](https://github.com/embroider-build/embroider/pull/2133) fix typescript support for codemod and add option for renaming elements ([@void-mAlex](https://github.com/void-mAlex))
* [#2120](https://github.com/embroider-build/embroider/pull/2120) fix gts in v1 addons ([@patricklx](https://github.com/patricklx))

#### :house: Internal
* `@embroider/test-scenarios`
* [#2142](https://github.com/embroider-build/embroider/pull/2142) fixing test suite for ember >= 6 ([@ef4](https://github.com/ef4))

#### Committers: 3
- Alex ([@void-mAlex](https://github.com/void-mAlex))
- Edward Faulkner ([@ef4](https://github.com/ef4))
- Patrick Pircher ([@patricklx](https://github.com/patricklx))

## 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)

#### :bug: Bug Fix
* `@embroider/core`, `@embroider/test-scenarios`
* [#2088](https://github.com/embroider-build/embroider/pull/2088) Implement ember's component-template-resolving deprecation ([@ef4](https://github.com/ef4))

#### Committers: 1
- Edward Faulkner ([@ef4](https://github.com/ef4))

## Release (2024-08-30)

@embroider/compat 3.6.1 (patch)
Expand Down
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,10 @@ Edit `ember-cli-build.js`:
```js
return require('@embroider/compat').templateTagCodemod(app, {
shouldTransformPath: (path) => { return true; },
nameHint: (path) => {
// example path: shared/my-button
return path;
},
dryRun: true,
});
```
Expand All @@ -132,6 +136,7 @@ Requires optimized build (static* flags to be turned on)
### Options

* `shouldTransformPath` - allows users to filter the templates that the code mod would run on
* `nameHint` - optional function control the import name and template replacement values - valid JS identifier required or it will be coerced into one
* `dryRun` - option can be used to obtain a summary of the changed the build would perform and which files it would act upon

### Limitations
Expand Down
4 changes: 2 additions & 2 deletions 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": "7.0.0",
"description": "Utilities for addon authors",
"repository": {
"type": "git",
Expand Down Expand Up @@ -36,7 +36,7 @@
"dependencies": {
"@embroider/core": "workspace:^",
"@rollup/pluginutils": "^5.1.0",
"content-tag": "^2.0.2",
"content-tag": "^3.0.0",
"fs-extra": "^10.0.0",
"minimatch": "^3.0.4",
"rollup-plugin-copy-assets": "^2.0.3",
Expand Down
30 changes: 16 additions & 14 deletions packages/addon-dev/src/rollup-gjs-plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,25 @@ const PLUGIN_NAME = 'rollup-gjs-plugin';
const processor = new Preprocessor();
// import { parse as pathParse } from 'path';

export default function rollupGjsPlugin(
{ inline_source_map } = { inline_source_map: true }
): Plugin {
export default function rollupGjsPlugin(): Plugin {
return {
name: PLUGIN_NAME,

transform(input: string, id: string) {
if (!gjsFilter(id)) {
return null;
}
let code = processor.process(input, {
filename: id,
inline_source_map,
});
return {
code,
};
transform: {
// Enforce running the gjs transform before any others like babel that expect valid JS
order: 'pre',
handler(input: string, id: string) {
if (!gjsFilter(id)) {
return null;
}
let { code, map } = processor.process(input, {
filename: id,
});
return {
code,
map,
};
},
},
};
}
Expand Down
26 changes: 15 additions & 11 deletions packages/addon-dev/src/rollup-hbs-plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,18 +83,22 @@ export default function rollupHbsPlugin({
}
},

transform(code: string, id: string) {
let hbsFilename = id.replace(/\.\w{1,3}$/, '') + '.hbs';
if (hbsFilename !== id) {
this.addWatchFile(hbsFilename);
if (getMeta(this, id)?.type === 'template-only-component-js') {
this.addWatchFile(id);
transform: {
// Enforce running the hbs transform before any others like babel that expect valid JS
order: 'pre',
handler(code: string, id: string) {
let hbsFilename = id.replace(/\.\w{1,3}$/, '') + '.hbs';
if (hbsFilename !== id) {
this.addWatchFile(hbsFilename);
if (getMeta(this, id)?.type === 'template-only-component-js') {
this.addWatchFile(id);
}
}
}
if (!hbsFilter(id)) {
return null;
}
return hbsToJS(code);
if (!hbsFilter(id)) {
return null;
}
return hbsToJS(code);
},
},
};
}
Expand Down
4 changes: 2 additions & 2 deletions packages/addon-dev/src/rollup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ export class Addon {
return hbs(options);
}

gjs(options?: { inline_source_map: boolean }) {
return gjs(options);
gjs() {
return gjs();
}

// this does incremental updates to the dist files and also deletes files that are not part of the generated bundle
Expand Down
2 changes: 1 addition & 1 deletion packages/addon-shim/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@embroider/addon-shim",
"version": "1.8.9",
"version": "1.9.0",
"description": "Make v2 addons work in non-Embroider apps.",
"keywords": [],
"main": "./src/index.js",
Expand Down
Loading

0 comments on commit 16efa2a

Please sign in to comment.