Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump string to latest #353

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion addon/decorators/core-validator.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { get, set } from '@ember/object';
import { getOwner } from '@ember/application';
import { capitalize } from '@ember/string';
import { isEmpty, isBlank, isPresent, typeOf, isEqual } from '@ember/utils';
import { A, isArray } from '@ember/array';

Expand Down Expand Up @@ -28,6 +27,11 @@ const Messages = {
'sr-cyrl': MessagesSrCyrl,
};

function capitalize(str) {
if (typeof str !== 'string' || !str.length) return '';
return str.charAt(0).toUpperCase() + str.slice(1);
}

function coreValidator(constructor) {
return class CoreValidator extends constructor {
validationErrors = {};
Expand Down
48 changes: 26 additions & 22 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,18 +35,27 @@
"postpack": "ember ts:clean"
},
"dependencies": {
"ember-cli-babel": "^7.26.11",
"ember-cli-typescript": "^5.2.1"
"ember-cli-babel": "^8.2.0",
"ember-cli-typescript": "^5.3.0"
},
"devDependencies": {
"@babel/core": "7.26.0",
"@babel/eslint-parser": "7.25.9",
"@babel/plugin-proposal-decorators": "7.25.9",
"@babel/plugin-proposal-private-property-in-object": "7.21.11",
"@ember/optional-features": "^2.0.0",
"@ember/string": "^3.1.1",
"@ember/test-helpers": "^2.8.1",
"@ember/test-helpers": "4.0.4",
"@embroider/test-setup": "^3.0.1",
"@glimmer/component": "^1.1.2",
"@glimmer/tracking": "^1.1.2",
"@tsconfig/ember": "^2.0.0",
"@types/ember": "^4.0.3",
"@types/ember-data": "4.4.7",
"@types/ember-data__adapter": "4.0.2",
"@types/ember-data__model": "^4.0.0",
"@types/ember-data__serializer": "^4.0.1",
"@types/ember-data__store": "^4.0.2",
"@types/ember-resolver": "^9.0.0",
"@types/ember__application": "^4.0.5",
"@types/ember__array": "^4.0.3",
"@types/ember__component": "^4.0.11",
Expand All @@ -60,41 +69,33 @@
"@types/ember__routing": "^4.0.12",
"@types/ember__runloop": "^4.0.2",
"@types/ember__service": "^4.0.2",
"@types/ember__string": "^3.0.10",
"@types/ember__template": "^4.0.1",
"@types/ember__test": "^4.0.1",
"@types/ember__string": "3.0.15",
"@types/ember__template": "^4.0.7",
"@types/ember__test": "^4.0.6",
"@types/ember__test-helpers": "^2.9.1",
"@types/ember__utils": "^4.0.2",
"@types/ember-data": "4.4.7",
"@types/ember-data__adapter": "4.0.2",
"@types/ember-data__model": "^4.0.0",
"@types/ember-data__serializer": "^4.0.1",
"@types/ember-data__store": "^4.0.2",
"@types/ember-qunit": "^6.1.1",
"@types/ember-resolver": "^9.0.0",
"@types/qunit": "^2.19.3",
"@types/ember__utils": "^4.0.7",
"@types/qunit": "^2.19.12",
"@types/rsvp": "^4.0.4",
"@typescript-eslint/eslint-plugin": "5.54.0",
"@typescript-eslint/parser": "5.57.0",
"auto-changelog": "^2.4.0",
"broccoli-asset-rev": "^3.0.0",
"concurrently": "^8.0.1",
"ember-auto-import": "^2.5.0",
"ember-cli": "~4.9.2",
"ember-auto-import": "2.10.0",
"ember-cli": "6.0.1",
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codebase verification

Update ember-cli-update.json to match the new ember-cli version

The ember-cli configuration in tests/dummy/config/ember-cli-update.json still references version 4.9.2, while package.json has been updated to 6.0.1. This mismatch should be addressed to maintain consistency and ensure proper blueprint updates.

  • tests/dummy/config/ember-cli-update.json: Update the ember-cli version from "4.9.2" to "6.0.1"

Other configuration files (ember-cli-build.js and environment.js) follow standard patterns and don't require changes for the upgrade. The project's ember dependencies are also compatible with ember-cli 6.x.

🔗 Analysis chain

Verify ember-cli 6.x compatibility

The major version upgrade of ember-cli from 4.x to 6.x might require:

  1. Updates to ember-cli blueprints
  2. Changes to ember-cli configuration files
  3. Compatibility verification with other dependencies
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check for ember-cli blueprint usage
fd -g '**/blueprints/**'

# Check for ember-cli config files
fd -g '**/config/**'

Length of output: 49


Script:

#!/bin/bash
# Check for ember-cli related files and configurations
fd -e js -e json -e yaml -e yml ember-cli

# Check package.json for ember related dependencies
cat package.json | jq '.dependencies + .devDependencies | with_entries(select(.key | contains("ember")))'

# Search for ember-cli configuration patterns
rg -l "ember-cli|EmberApp|environment" --type js --type json

Length of output: 2031


Script:

#!/bin/bash
# Check the content of ember-cli configuration files
cat ember-cli-build.js
cat tests/dummy/config/ember-cli-update.json
cat tests/dummy/config/environment.js

# Check for any breaking changes in dependencies
rg -A 5 "BREAKING CHANGE|BREAKING-CHANGE|BREAKING CHANGES" CHANGELOG.md

Length of output: 2477

"ember-cli-dependency-checker": "^3.3.1",
"ember-cli-htmlbars": "6.3.0",
"ember-cli-inject-live-reload": "^2.1.0",
"ember-cli-sri": "^2.1.1",
"ember-cli-terser": "^4.0.2",
"ember-data": "^5.3.0",
"ember-load-initializers": "^2.1.2",
"ember-page-title": "^7.0.0",
"ember-qunit": "^6.0.0",
"ember-qunit": "8.1.1",
"ember-resolver": "^11.0.1",
"ember-source": "4.12.3",
"ember-source-channel-url": "^3.0.0",
"ember-template-lint": "^5.2.0",
"ember-try": "^2.0.0",
"ember-try": "3.0.0",
"eslint": "^8.43.0",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-ember": "^11.4.0",
Expand All @@ -104,11 +105,14 @@
"loader.js": "^4.7.0",
"prettier": "^2.8.1",
"qunit": "^2.19.3",
"qunit-dom": "^2.0.0",
"qunit-dom": "3.3.0",
"release-it": "^15.6.0",
"typescript": "^5.2.2",
"webpack": "^5.75.0"
},
"resolutions": {
"@babel/plugin-proposal-private-property-in-object": "7.21.11"
},
Comment on lines +113 to +115
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codebase verification

Remove unnecessary resolutions entry

The @babel/plugin-proposal-private-property-in-object resolution appears to be an orphaned dependency resolution. There are no direct references to this plugin in any Babel configuration files, and no React dependencies that would require this resolution. Since package resolutions should only be used to solve specific dependency conflicts, and no such conflict is evident, this entry can be safely removed.

🔗 Analysis chain

Review the necessity of resolutions field

The resolutions field forces @babel/plugin-proposal-private-property-in-object to version 7.21.11. This is typically added to resolve dependency conflicts or security issues.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check for duplicate versions of the package
yarn why "@babel/plugin-proposal-private-property-in-object" 2>/dev/null || npm ls "@babel/plugin-proposal-private-property-in-object"

Length of output: 179


Script:

#!/bin/bash
# Check package-lock.json or yarn.lock for the dependency
fd "package-lock.json|yarn.lock" --type f --exec cat {}

# Check if this package is a direct dependency or devDependency
grep -A 5 "dependencies\|devDependencies" package.json

# Look for any babel configuration files that might use this plugin
fd "babel.config|.babelrc" --type f --exec cat {}

Length of output: 131273


Script:

#!/bin/bash
# Check for any babel config files that might reference this plugin
fd "babel" --type f --exec grep -l "private-property-in-object" {} \;

# Check for any create-react-app dependencies which might need this resolution
grep -r "react-scripts" package.json

# Check git history for when this resolution was added
git log -p package.json | grep -A 5 "private-property-in-object"

Length of output: 107

"publishConfig": {
"access": "public",
"registry": "https://registry.npmjs.org"
Expand Down
2 changes: 1 addition & 1 deletion tests/test-helper.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Application from 'dummy/app';
import QUnit from 'qunit';
import config from 'dummy/config/environment';
import * as QUnit from 'qunit';
import { setApplication } from '@ember/test-helpers';
import { setup } from 'qunit-dom';
import { start } from 'ember-qunit';
Expand Down
Loading
Loading