Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Update fixturify-project to ^7.1.3 - #11043

#11043
Open
NullVoxPopuli-ai-agent wants to merge 2 commits into
ember-cli:masterember-cli/ember-cli:masterfrom
NullVoxPopuli-ai-agent:update-fixturify-projectNullVoxPopuli-ai-agent/ember-cli:update-fixturify-projectCopy head branch name to clipboard
Open

Update fixturify-project to ^7.1.3#11043
NullVoxPopuli-ai-agent wants to merge 2 commits into
ember-cli:masterember-cli/ember-cli:masterfrom
NullVoxPopuli-ai-agent:update-fixturify-projectNullVoxPopuli-ai-agent/ember-cli:update-fixturify-projectCopy head branch name to clipboard

Conversation

@NullVoxPopuli-ai-agent

@NullVoxPopuli-ai-agent NullVoxPopuli-ai-agent commented Jul 7, 2026

Copy link
Copy Markdown

Updates fixturify-project from ^2.1.1 to ^7.1.3 (5 majors). The API changed substantially along the way, so the test helper and its consumers are updated to the new API. Net effect on the helper is a code reduction — the new upstream write() machinery replaces the helper's hand-rolled serialization.

Upstream breaking changes handled

  • v3: the class is now a named export (const { Project } = require('fixturify-project')), and project.root was removed — project.baseDir is now the project directory itself (fixture files are no longer nested under an extra <name>/ folder inside the tmp dir).
  • v5/v6: writeSync() and toJSON() were removed; writing is now the async write().
  • v7: files passed to the constructor are deep-merged (no impact on these tests).

Changes

tests/helpers/fixturify-project.js

  • writeSync() → async write(); buildProjectModel() / buildProjectModelForInRepoAddon() are now async and read the generated package.json back from disk.
  • In-repo addons are no longer serialized into the parent's files (that relied on the removed toJSON()); the helper now tracks them and writes each one into lib/<name> using the regular write() machinery during the parent's write(). This deleted the old serialization code and, as a bonus, the file-moving workarounds in the per-bundle-addon-cache fixture helper.
  • Dependencies created through addDependency/addDevDependency are constructed as EmberCLIFixturifyProject instances and handed to upstream via its public addDependency(project) overload (upstream's internal addDep hardcodes its own Project class since v5). This keeps nested usage like addon.addAddon(...) and engine.addReferenceDependency(...) working.
  • 'Reference' (dev)dependencies — package.json entries whose files intentionally live elsewhere on disk — are injected via a small pkgJSONWithDeps() override. This overrides a private upstream method; there is currently no public hook for customizing the generated package.json.

Tests

  • All writeSync() / buildProjectModel() call sites are now awaited.
  • tests/helpers/per-bundle-addon-cache.js: the standard cache fixture now defines the shared test-addon-dep / test-engine-dep directly in PROJECT/lib (and removes them from the project's ember-addon.paths) instead of creating them nested and moving their serialized files around — same disk layout, much simpler.
  • package-info-cache-test: the toJSON monkeypatch that left an empty node_modules/ember-resolver folder is replaced by explicitly emptying that directory after write(). Path assertions using fixturifyProject.root now use baseDir.
  • proxy-test: expect(() => buildProjectModel()).to.throw(...) became await expect(...).to.be.rejectedWith(...) since the model builder is now async.

Behavioral change worth flagging

Upstream now writes devDependencies to node_modules after dependencies (v2's toJSON did the opposite), so when the same package name exists in both with different versions, the devDependency copy is what ends up on disk. The duplicated-addon expectations in instantiate-addons-test were updated from 1.0.0 to 2.0.0 accordingly (the addon ordering that test locks down is unchanged).

Also included

  • A one-line prettier fix to RELEASE.md (separate commit) — prettier --check has been failing on master because of it, which keeps the linting CI job red.

Testing

  • node tests/runner tests/unit/**/*-test.js: 979 passing, 0 failing
  • pnpm lint (prettier + eslint): passing

NullVoxPopuli and others added 2 commits July 7, 2026 11:34
fixturify-project changed significantly between v2 and v7, so the test
helper and its consumers are updated to the new API:

- the class is now a named export: `const { Project } = require('fixturify-project')`
- `writeSync()` was removed in favor of the async `write()`, so
  `buildProjectModel()` / `buildProjectModelForInRepoAddon()` are now
  async and all call sites `await` them
- `project.root` was removed; `project.baseDir` is now the project
  directory itself (files are no longer nested under a `<name>/` folder)
- `toJSON()` was removed upstream; instead of serializing in-repo addons
  into the parent's `files`, the helper now tracks them and writes each
  one into `lib/<name>` with the regular `write()` machinery, which also
  removes the file-moving workarounds in the per-bundle-addon-cache
  fixture
- dependencies created through `addDependency`/`addDevDependency` are
  constructed as EmberCLIFixturifyProject instances (upstream hardcodes
  its own Project class), keeping nested `addAddon` /
  `addReferenceDependency` working
- 'reference' dependencies are injected via a small `pkgJSONWithDeps`
  override, since upstream has no public hook for customizing the
  generated `package.json`
- upstream now writes `devDependencies` to `node_modules` after
  `dependencies`, so when the same package name exists in both, the
  devDependency copy wins on disk (updated expectations in
  instantiate-addons-test)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
`prettier --check` has been failing on master because of this file,
which makes the linting CI job red.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.