Allow for `package.json` deep merge to support more scenarios

未关闭
#1,058 12 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
45/100
Issue 类型
功能
描述清晰度
描述清楚
活跃度
停滞
技术栈
javascript
领域
testing

调研方向

从 lib/dependency-manager-adapters/base.js 的第 142-150 行附近开始,这里会选择性地使 package.json 属性可被覆盖。跟踪 dependency-manager 覆盖的应用方式,并将所请求的行为与链接的示例提交进行比较。当 dependenciesMeta.*.injected 之类的嵌套 package.json 设置可以针对 CI 场景进行深度合并时,即视为完成。

由索引模型根据 Issue 内容生成。

描述

When supporting addons from ember@3 up to ember@6, there needs to happen various changes here and there.

My current problem is roughly mentioned here: embroider-build/addon-blueprint#131
Basically the resolving @ember/owner in ember <> 4.12 - that in some scenarios is missresolved by the package manager, namely pnpm for me. That's why we are advised to use dependenciesMeta.*.injected. However, that comes with a big downside for actually developing the addon and requires third-party-tools only to fix that.

A handy trick would be for CI to have that scenario modelled, in my case for older ember versions.
Here is my sample commit for that: https://github.com/gossi/ember-ability/pull/137/commits/9ecfd9b458be241294ce8ca80abf9dedfe3dc173 which adds a script and dependenciesMeta to some package.json - but that does not work, because only a couple of selected properties are overwritable, see: https://github.com/ember-cli/ember-try/blob/e0d196ee4030879bccda807d47c2eb1742182558/lib/dependency-manager-adapters/base.js#L142-L150

What about a deep merge instead and everybody is free to change what they seem necessary for them?

主要语言
JavaScript
星标
180
派生
57
PR 合并指标
30 天内没有已合并 PR

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

ember-cli/ember-try 的其他 Issue

查看 ember-cli/ember-try 的全部 Issue

相似的 Issue

更多 JavaScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。