From 7df2e78c80349dd06aacbbe7cd4867824a471d86 Mon Sep 17 00:00:00 2001 From: Richard Cox Date: Fri, 19 Jul 2024 16:58:33 +0100 Subject: [PATCH 1/6] - `ember-cli-update --to 3.24.0 ` - no op - update package.json ember-source to ~3.24.7 - yarn install --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index e971dd1..bd28c27 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ "ember-page-title": "^6.0.3", "ember-qunit": "^5.1.1", "ember-resolver": "^8.0.2", - "ember-source": "~3.24.0", + "ember-source": "~3.24.7", "ember-template-lint": "^2.15.0", "ember-try": "^1.4.0", "eslint-config-prettier": "^7.1.0", diff --git a/yarn.lock b/yarn.lock index 45bcf13..606288b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7237,10 +7237,10 @@ ember-source-channel-url@^3.0.0: dependencies: node-fetch "^2.6.0" -ember-source@~3.24.0: - version "3.24.4" - resolved "https://registry.yarnpkg.com/ember-source/-/ember-source-3.24.4.tgz#db3f70cbe4155d48474177f1564627a1fc980f64" - integrity sha512-C5sFGxT743n2PCaTnpvy3GWHdPz+/Ve9qjcSdfRjUvFCSYNhsRkxkpXRvXEU8WoUXY35Pm4vV9RsiorX1M+/Tw== +ember-source@~3.24.7: + version "3.24.7" + resolved "https://registry.yarnpkg.com/ember-source/-/ember-source-3.24.7.tgz#456411e2acf3e992749af541113d4398463a2396" + integrity sha512-xwftkvyigiO2wl8FkpMt3uXG0cpvq0EQ5K+gsV251sHcQyRdihf4mY3CPRPgCxLvjEpBln8F+mhMbsxpOxI7Eg== dependencies: "@babel/helper-module-imports" "^7.8.3" "@babel/plugin-transform-block-scoping" "^7.8.3" From f7e4a4dea29f7f8c82f022b9d2270fdeb5ea215b Mon Sep 17 00:00:00 2001 From: Richard Cox Date: Fri, 19 Jul 2024 17:02:19 +0100 Subject: [PATCH 2/6] ember-cli-update --run-codemods --- MODULE_REPORT.md | 154 +++++++++++++++++++++++++++++++++++++++++++++++ codemods.log | 0 2 files changed, 154 insertions(+) create mode 100644 MODULE_REPORT.md create mode 100644 codemods.log diff --git a/MODULE_REPORT.md b/MODULE_REPORT.md new file mode 100644 index 0000000..0c254f6 --- /dev/null +++ b/MODULE_REPORT.md @@ -0,0 +1,154 @@ +## Module Report +### Unknown Global + +**Global**: `Ember.libraries` + +**Location**: `addon/index.js` at line 9 + +```js +}); + +if (Ember.libraries) { + Ember.libraries.registerCoreLibrary('Ember API Store', EmberApiStore.VERSION); +} +``` + +### Unknown Global + +**Global**: `Ember.libraries` + +**Location**: `addon/index.js` at line 10 + +```js + +if (Ember.libraries) { + Ember.libraries.registerCoreLibrary('Ember API Store', EmberApiStore.VERSION); +} + +``` + +### Unknown Global + +**Global**: `Ember.beginPropertyChanges` + +**Location**: `addon/mixins/type.js` at line 189 + +```js + var newType = normalizeType(newData.get('type'), store); + if ( !id && newId && type === newType ) { + Ember.beginPropertyChanges(); + + // A new record was created. Typeify will have put it into the store, +``` + +### Unknown Global + +**Global**: `Ember.endPropertyChanges` + +**Location**: `addon/mixins/type.js` at line 213 + +```js + } + + Ember.endPropertyChanges(); + } + +``` + +### Unknown Global + +**Global**: `Ember.ActionHandler` + +**Location**: `addon/models/resource.js` at line 26 + +```js +]; + +var Actionable = EmberObject.extend(Ember.ActionHandler); +var Resource = Actionable.extend(TypeMixin, { + // You should probably override intl with a real translator... +``` + +### Unknown Global + +**Global**: `Ember.beginPropertyChanges` + +**Location**: `addon/services/store.js` at line 516 + +```js + + if ( xhr.body && typeof xhr.body === 'object' ) { + Ember.beginPropertyChanges(); + let response = this._typeify(xhr.body); + delete xhr.body; +``` + +### Unknown Global + +**Global**: `Ember.endPropertyChanges` + +**Location**: `addon/services/store.js` at line 520 + +```js + delete xhr.body; + Object.defineProperty(response, 'xhr', {value: xhr, configurable: true}); + Ember.endPropertyChanges(); + + // Depaginate +``` + +### Unknown Global + +**Global**: `Ember.beginPropertyChanges` + +**Location**: `addon/services/store.js` at line 558 + +```js + return finish(body); + } else if ( xhr.body && typeof xhr.body === 'object' ) { + Ember.beginPropertyChanges(); + let out = finish(this._typeify(xhr.body)); + Ember.endPropertyChanges(); +``` + +### Unknown Global + +**Global**: `Ember.endPropertyChanges` + +**Location**: `addon/services/store.js` at line 560 + +```js + Ember.beginPropertyChanges(); + let out = finish(this._typeify(xhr.body)); + Ember.endPropertyChanges(); + + return out; +``` + +### Unknown Global + +**Global**: `Ember.beginPropertyChanges` + +**Location**: `addon/services/store.js` at line 857 + +```js + // Create a collection: {key: 'data'} + createCollection(input, opt) { + Ember.beginPropertyChanges(); + let key = (opt && opt.key ? opt.key : 'data'); + var cls = getOwner(this).lookup('model:collection'); +``` + +### Unknown Global + +**Global**: `Ember.endPropertyChanges` + +**Location**: `addon/services/store.js` at line 866 + +```js + + output.setProperties(getProperties(input, this.metaKeys)); + Ember.endPropertyChanges(); + return output; + }, +``` diff --git a/codemods.log b/codemods.log new file mode 100644 index 0000000..e69de29 From 10587a1f219eb09e0529a52591c14830119fdc95 Mon Sep 17 00:00:00 2001 From: Richard Cox Date: Wed, 31 Jul 2024 11:23:45 +0100 Subject: [PATCH 3/6] bump ember-cookies - after yarn link and restarting ember ui old dep threw exception --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index bd28c27..5064078 100644 --- a/package.json +++ b/package.json @@ -66,7 +66,7 @@ "broccoli-file-creator": "^2.1.1", "ember-auto-import": "^1.11.3", "ember-cli-babel": "^7.23.0", - "ember-cookies": "^0.4.0", + "ember-cookies": "^0.5.2", "eslint": "^7.17.0", "node-fetch": "^2.3.0", "set-cookie-parser": "^2.4.6" diff --git a/yarn.lock b/yarn.lock index 606288b..553add2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7091,10 +7091,10 @@ ember-compatibility-helpers@^1.2.1: fs-extra "^9.1.0" semver "^5.4.1" -ember-cookies@^0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/ember-cookies/-/ember-cookies-0.4.0.tgz#472f405bedd47c7c6f6a4e76ac927b8e7a3605ef" - integrity sha512-KXFxmaxEMlSqYQdyAaM/Rs84PxBJCqBQEPkLqhBStC9LwEovUSTEXzhd3FHVbMHch/THI4JzjoYEsj4CrdxVgQ== +ember-cookies@^0.5.2: + version "0.5.2" + resolved "https://registry.yarnpkg.com/ember-cookies/-/ember-cookies-0.5.2.tgz#06e33463f2f83254fefaf224cc944dec3fb9d3ba" + integrity sha512-nZ7oG97kBcO9UHjO95ryABpnVx62Bhxo7lIsBJNmWvFXleILm9DGueiAynzXxuYWWPuKIeeSbYakrS1869tNTw== dependencies: ember-cli-babel "^7.1.0" ember-getowner-polyfill "^1.1.0 || ^2.0.0" From c59b9d58cc5da5d1a880dc17918048abc8bf0c76 Mon Sep 17 00:00:00 2001 From: Richard Cox Date: Wed, 31 Jul 2024 11:40:08 +0100 Subject: [PATCH 4/6] Ran through MODULE_REPORT.md Ember.libraries - Console logged one instance, never hit in normal use of console Ember.beginPropertyChanges - Console logged one instance, output without errors Ember.endPropertyChanges - no problemConsole logged one instance, output without errors Ember.ActionHandler = Console logged one instance, output without errors --- MODULE_REPORT.md | 154 ----------------------------------------------- codemods.log | 0 2 files changed, 154 deletions(-) delete mode 100644 MODULE_REPORT.md delete mode 100644 codemods.log diff --git a/MODULE_REPORT.md b/MODULE_REPORT.md deleted file mode 100644 index 0c254f6..0000000 --- a/MODULE_REPORT.md +++ /dev/null @@ -1,154 +0,0 @@ -## Module Report -### Unknown Global - -**Global**: `Ember.libraries` - -**Location**: `addon/index.js` at line 9 - -```js -}); - -if (Ember.libraries) { - Ember.libraries.registerCoreLibrary('Ember API Store', EmberApiStore.VERSION); -} -``` - -### Unknown Global - -**Global**: `Ember.libraries` - -**Location**: `addon/index.js` at line 10 - -```js - -if (Ember.libraries) { - Ember.libraries.registerCoreLibrary('Ember API Store', EmberApiStore.VERSION); -} - -``` - -### Unknown Global - -**Global**: `Ember.beginPropertyChanges` - -**Location**: `addon/mixins/type.js` at line 189 - -```js - var newType = normalizeType(newData.get('type'), store); - if ( !id && newId && type === newType ) { - Ember.beginPropertyChanges(); - - // A new record was created. Typeify will have put it into the store, -``` - -### Unknown Global - -**Global**: `Ember.endPropertyChanges` - -**Location**: `addon/mixins/type.js` at line 213 - -```js - } - - Ember.endPropertyChanges(); - } - -``` - -### Unknown Global - -**Global**: `Ember.ActionHandler` - -**Location**: `addon/models/resource.js` at line 26 - -```js -]; - -var Actionable = EmberObject.extend(Ember.ActionHandler); -var Resource = Actionable.extend(TypeMixin, { - // You should probably override intl with a real translator... -``` - -### Unknown Global - -**Global**: `Ember.beginPropertyChanges` - -**Location**: `addon/services/store.js` at line 516 - -```js - - if ( xhr.body && typeof xhr.body === 'object' ) { - Ember.beginPropertyChanges(); - let response = this._typeify(xhr.body); - delete xhr.body; -``` - -### Unknown Global - -**Global**: `Ember.endPropertyChanges` - -**Location**: `addon/services/store.js` at line 520 - -```js - delete xhr.body; - Object.defineProperty(response, 'xhr', {value: xhr, configurable: true}); - Ember.endPropertyChanges(); - - // Depaginate -``` - -### Unknown Global - -**Global**: `Ember.beginPropertyChanges` - -**Location**: `addon/services/store.js` at line 558 - -```js - return finish(body); - } else if ( xhr.body && typeof xhr.body === 'object' ) { - Ember.beginPropertyChanges(); - let out = finish(this._typeify(xhr.body)); - Ember.endPropertyChanges(); -``` - -### Unknown Global - -**Global**: `Ember.endPropertyChanges` - -**Location**: `addon/services/store.js` at line 560 - -```js - Ember.beginPropertyChanges(); - let out = finish(this._typeify(xhr.body)); - Ember.endPropertyChanges(); - - return out; -``` - -### Unknown Global - -**Global**: `Ember.beginPropertyChanges` - -**Location**: `addon/services/store.js` at line 857 - -```js - // Create a collection: {key: 'data'} - createCollection(input, opt) { - Ember.beginPropertyChanges(); - let key = (opt && opt.key ? opt.key : 'data'); - var cls = getOwner(this).lookup('model:collection'); -``` - -### Unknown Global - -**Global**: `Ember.endPropertyChanges` - -**Location**: `addon/services/store.js` at line 866 - -```js - - output.setProperties(getProperties(input, this.metaKeys)); - Ember.endPropertyChanges(); - return output; - }, -``` diff --git a/codemods.log b/codemods.log deleted file mode 100644 index e69de29..0000000 From ed965c7bd738c6d17ce4c53a456304ed3f68bcf4 Mon Sep 17 00:00:00 2001 From: Richard Cox Date: Wed, 31 Jul 2024 11:42:37 +0100 Subject: [PATCH 5/6] Bump package version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 5064078..a1f6435 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@rancher/ember-api-store", - "version": "3.0.2", + "version": "4.0.0", "directories": { "doc": "doc", "test": "tests" From d7ab9936623f93a2ead510e768c51c591087c1f9 Mon Sep 17 00:00:00 2001 From: Richard Cox Date: Wed, 31 Jul 2024 15:26:50 +0100 Subject: [PATCH 6/6] Changes - fix ember-source to exact version - we can't have any higher and shouldn't be lower - remove broccoli-asset-rev - real underlying cause of the error when building rancher/ui - dep is 6 years stale and brought in a very old version of broccoli-filter that was not compatible - it's not wired up to be used, so drop it (should be adding hashes to file names) --- package.json | 3 +-- yarn.lock | 43 ++----------------------------------------- 2 files changed, 3 insertions(+), 43 deletions(-) diff --git a/package.json b/package.json index a1f6435..5364770 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,6 @@ "@ember/test-helpers": "^2.1.4", "@glimmer/component": "^1.0.3", "@glimmer/tracking": "^1.0.3", - "broccoli-asset-rev": "^3.0.0", "ember-cli": "~3.24.0", "ember-cli-app-version": "^3.2.0", "ember-cli-dependency-checker": "^3.2.0", @@ -43,7 +42,7 @@ "ember-page-title": "^6.0.3", "ember-qunit": "^5.1.1", "ember-resolver": "^8.0.2", - "ember-source": "~3.24.7", + "ember-source": "3.24.7", "ember-template-lint": "^2.15.0", "ember-try": "^1.4.0", "eslint-config-prettier": "^7.1.0", diff --git a/yarn.lock b/yarn.lock index 553add2..9f5a6b7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4638,25 +4638,6 @@ broccoli-amd-funnel@^2.0.1: broccoli-plugin "^1.3.0" symlink-or-copy "^1.2.0" -broccoli-asset-rev@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/broccoli-asset-rev/-/broccoli-asset-rev-3.0.0.tgz#65a28c8a062d6ee2cffd91ed2a8309e0f8253ac6" - integrity sha512-gAHQZnwvtl74tGevUqGuWoyOdJUdMMv0TjGSMzbdyGImr9fZcnM6xmggDA8bUawrMto9NFi00ZtNUgA4dQiUBw== - dependencies: - broccoli-asset-rewrite "^2.0.0" - broccoli-filter "^1.2.2" - broccoli-persistent-filter "^1.4.3" - json-stable-stringify "^1.0.0" - minimatch "^3.0.4" - rsvp "^3.0.6" - -broccoli-asset-rewrite@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/broccoli-asset-rewrite/-/broccoli-asset-rewrite-2.0.0.tgz#603c4a52d4c8987a2f681254436923ac0a9c94ab" - integrity sha512-dqhxdQpooNi7LHe8J9Jdxp6o3YPFWl4vQmint6zrsn2sVbOo+wpyiX3erUSt0IBtjNkAxqJjuvS375o2cLBHTA== - dependencies: - broccoli-filter "^1.2.3" - broccoli-babel-transpiler@^6.5.0: version "6.5.1" resolved "https://registry.yarnpkg.com/broccoli-babel-transpiler/-/broccoli-babel-transpiler-6.5.1.tgz#a4afc8d3b59b441518eb9a07bd44149476e30738" @@ -4833,21 +4814,6 @@ broccoli-file-creator@^2.1.1: broccoli-plugin "^1.1.0" mkdirp "^0.5.1" -broccoli-filter@^1.2.2, broccoli-filter@^1.2.3: - version "1.3.0" - resolved "https://registry.yarnpkg.com/broccoli-filter/-/broccoli-filter-1.3.0.tgz#71e3a8e32a17f309e12261919c5b1006d6766de6" - integrity sha512-VXJXw7eBfG82CFxaBDjYmyN7V72D4In2zwLVQJd/h3mBfF3CMdRTsv2L20lmRTtCv1sAHcB+LgMso90e/KYiLw== - dependencies: - broccoli-kitchen-sink-helpers "^0.3.1" - broccoli-plugin "^1.0.0" - copy-dereference "^1.0.0" - debug "^2.2.0" - mkdirp "^0.5.1" - promise-map-series "^0.2.1" - rsvp "^3.0.18" - symlink-or-copy "^1.0.1" - walk-sync "^0.3.1" - broccoli-funnel-reducer@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/broccoli-funnel-reducer/-/broccoli-funnel-reducer-1.0.0.tgz#11365b2a785aec9b17972a36df87eef24c5cc0ea" @@ -6046,11 +6012,6 @@ copy-concurrently@^1.0.0: rimraf "^2.5.4" run-queue "^1.0.0" -copy-dereference@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/copy-dereference/-/copy-dereference-1.0.0.tgz#6b131865420fd81b413ba994b44d3655311152b6" - integrity sha1-axMYZUIP2BtBO6mUtE02VTERUrY= - copy-descriptor@^0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d" @@ -7237,7 +7198,7 @@ ember-source-channel-url@^3.0.0: dependencies: node-fetch "^2.6.0" -ember-source@~3.24.7: +ember-source@3.24.7: version "3.24.7" resolved "https://registry.yarnpkg.com/ember-source/-/ember-source-3.24.7.tgz#456411e2acf3e992749af541113d4398463a2396" integrity sha512-xwftkvyigiO2wl8FkpMt3uXG0cpvq0EQ5K+gsV251sHcQyRdihf4mY3CPRPgCxLvjEpBln8F+mhMbsxpOxI7Eg== @@ -12646,7 +12607,7 @@ rollup@^0.57.1: signal-exit "^3.0.2" sourcemap-codec "^1.4.1" -rsvp@^3.0.14, rsvp@^3.0.17, rsvp@^3.0.18, rsvp@^3.0.21, rsvp@^3.0.6: +rsvp@^3.0.14, rsvp@^3.0.17, rsvp@^3.0.18, rsvp@^3.0.21: version "3.6.2" resolved "https://registry.yarnpkg.com/rsvp/-/rsvp-3.6.2.tgz#2e96491599a96cde1b515d5674a8f7a91452926a" integrity sha512-OfWGQTb9vnwRjwtA2QwpG2ICclHC3pgXZO5xt8H2EfgDquO0qVdSb5T88L4qJVAEugbS56pAuV4XZM58UX8ulw==