Skip to content

Commit

Permalink
Have to switch to pnpm, because of pending PRs on other repos, and ya…
Browse files Browse the repository at this point in the history
…rn not being able to handle patch-package across multiple copies of dependincies
  • Loading branch information
NullVoxPopuli committed Oct 14, 2023
1 parent 9b3ed20 commit cbc7ac0
Show file tree
Hide file tree
Showing 8 changed files with 11,984 additions and 11,192 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:

strategy:
matrix:
node-version: [16.x, 18.x]
node-version: [16.x, 18.18.1]

steps:
- uses: actions/checkout@v3
Expand Down
11 changes: 10 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"test": "tests"
},
"scripts": {
"postinstall": "patch-package",
"lint": "npm-run-all --aggregate-output --continue-on-error --parallel 'lint:!(fix)'",
"lint:fix": "npm-run-all --aggregate-output --continue-on-error --parallel lint:*:fix",
"lint:hbs": "ember-template-lint .",
Expand All @@ -30,7 +31,8 @@
"dependencies": {
"broccoli-stew": "^3.0.0",
"content-tag": "^1.1.2",
"ember-cli-version-checker": "^5.1.2"
"ember-cli-version-checker": "^5.1.2",
"postinstall-postinstall": "^2.1.0"
},
"devDependencies": {
"@babel/core": "^7.22.20",
Expand Down Expand Up @@ -116,5 +118,12 @@
"release": true,
"tokenRef": "GITHUB_AUTH"
}
},
"pnpm": {
"patchedDependencies": {
"[email protected]": "patches/[email protected]",
"[email protected]": "patches/[email protected]",
"[email protected]": "patches/[email protected]"
}
}
}
14 changes: 14 additions & 0 deletions patches/[email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
diff --git a/js/addon.js b/js/addon.js
index 2c168efe48b0fefcb9ffdbf1a1f2019074f6535a..0e1b744807569ce3d1838ffa7f552a029977ae5d 100644
--- a/js/addon.js
+++ b/js/addon.js
@@ -91,7 +91,8 @@ exports.default = ember_cli_entities_1.addon({
_checkBabelVersion() {
let babel = this.parent.addons.find(addon => addon.name === 'ember-cli-babel');
let version = babel && babel.pkg.version;
- if (!babel || !(semver_1.default.gte(version, '7.1.0') && semver_1.default.lt(version, '8.0.0'))) {
+ // https://github.com/typed-ember/ember-cli-typescript/issues/1567
+ if (!babel || !(semver_1.default.gte(version, '7.1.0'))) {
let versionString = babel ? `version ${babel.pkg.version}` : `no instance of ember-cli-babel`;
this.ui.writeWarnLine(`ember-cli-typescript requires ember-cli-babel ^7.1.0, but you have ${versionString} installed; ` +
'your TypeScript files may not be transpiled correctly.');
14 changes: 14 additions & 0 deletions patches/[email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
diff --git a/js/addon.js b/js/addon.js
index eb1fc77735a0795addd8b87c353e4773c04d35a5..19755534dfd7ac04cb052218047dab1a92f9ce2d 100644
--- a/js/addon.js
+++ b/js/addon.js
@@ -83,7 +83,8 @@ exports.default = ember_cli_entities_1.addon({
_checkBabelVersion() {
let babel = this.parent.addons.find(addon => addon.name === 'ember-cli-babel');
let version = babel && babel.pkg.version;
- if (!babel || !(semver_1.default.gte(version, '7.7.3') && semver_1.default.lt(version, '8.0.0'))) {
+ // https://github.com/typed-ember/ember-cli-typescript/issues/1567
+ if (!babel || !(semver_1.default.gte(version, '7.7.3'))) {
let versionString = babel ? `version ${babel.pkg.version}` : `no instance of ember-cli-babel`;
this.ui.writeWarnLine(`ember-cli-typescript requires ember-cli-babel ^7.7.3, but you have ${versionString} installed; ` +
'your TypeScript files may not be transpiled correctly.');
14 changes: 14 additions & 0 deletions patches/[email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
diff --git a/index.js b/index.js
index c4c64a8c50480c3c453686492de8f87fa54ae139..255bf8e3901901fce9689eaf8981a4338553ba32 100644
--- a/index.js
+++ b/index.js
@@ -52,7 +52,8 @@ module.exports = {
const emberBabelChecker = this.parentChecker.for('ember-cli-babel', 'npm');

this._usingBabel6 = emberBabelChecker.satisfies('^6.0.0-beta.1');
- this._usingBabel7 = emberBabelChecker.satisfies('^7.0.0-beta.1');
+ // https://github.com/ember-cli/ember-compatibility-helpers/pull/57
+ this._usingBabel7 = emberBabelChecker.satisfies('>= 7.0.0-beta.1');

if (!this._usingBabel6 && !this._usingBabel7) {
host.project.ui.writeWarnLine(
Loading

0 comments on commit cbc7ac0

Please sign in to comment.