Skip to content

Commit

Permalink
Remove ember string (#148)
Browse files Browse the repository at this point in the history
Co-authored-by: Kevin Hinterlong <[email protected]>
  • Loading branch information
jkusa and kevinhinterlong authored Aug 26, 2024
1 parent 91ee1e2 commit f81ef8b
Show file tree
Hide file tree
Showing 9 changed files with 4,550 additions and 6,207 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ jsconfig.json
/package.json.ember-try
/package-lock.json.ember-try
/yarn.lock.ember-try
.yarn

# broccoli-debug
/DEBUG/
1 change: 1 addition & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
nodeLinker: node-modules
3 changes: 2 additions & 1 deletion addon/components/grid-stack.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import { tracked } from '@glimmer/tracking';
import { action } from '@ember/object';
import { inject as service } from '@ember/service';
import { scheduleOnce } from '@ember/runloop';
import { capitalize } from '@ember/string';
import { guidFor } from '@ember/object/internals';
import { GridStack } from 'gridstack';

Expand All @@ -43,6 +42,8 @@ export const GRID_STACK_EVENTS = [
'resizestop',
];

export const capitalize = (string) => string.charAt(0).toUpperCase() + string.slice(1);

export default class GridStackComponent extends Component {
@service gridStackRegistry;

Expand Down
3 changes: 2 additions & 1 deletion addon/modifiers/gs-item-attributes.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@
* Copyrights licensed under the BSD License. See the accompanying LICENSE file for terms.
*/
import { modifier } from 'ember-modifier';
import { dasherize } from '@ember/string';
import { isBlank } from '@ember/utils';

const GS_PREFIX = 'gs-';

const dasherize = (str) => str.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase();

export default modifier(function itemAttributes(element, opt) {
const [options = {}] = opt || [];
Object.entries(options).forEach(([key, value]) => {
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
},
"dependencies": {
"@ember/render-modifiers": "^2.0.2",
"ember-auto-import": "^2.6.3",
"ember-auto-import": "^2.7.4",
"ember-cli-babel": "^7.26.11",
"ember-cli-htmlbars": "^6.2.0",
"ember-modifier": "^3.0.0 || ^4.1.0",
Expand All @@ -53,13 +53,13 @@
"@ember/optional-features": "^2.0.0",
"@ember/string": "^3.0.1",
"@ember/test-helpers": "^2.9.3",
"@embroider/test-setup": "^2.1.1",
"@embroider/test-setup": "^3.0.3",
"@glimmer/component": "^1.1.2",
"@glimmer/tracking": "^1.1.2",
"babel-plugin-dynamic-import-node": "^2.3.3",
"broccoli-asset-rev": "^3.0.0",
"concurrently": "^8.0.1",
"ember-cli": "~4.12.1",
"ember-cli": "~4.12.3",
"ember-cli-dependency-checker": "^3.3.1",
"ember-cli-github-pages": "^0.2.2",
"ember-cli-inject-live-reload": "^2.1.0",
Expand Down
2 changes: 1 addition & 1 deletion screwdriver.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ cache:
pipeline: [~/.yarn]

shared:
image: node:14
image: node:18

jobs:
main:
Expand Down
2 changes: 1 addition & 1 deletion tests/dummy/config/ember-cli-update.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"packages": [
{
"name": "ember-cli",
"version": "4.12.1",
"version": "4.12.3",
"blueprints": [
{
"name": "addon",
Expand Down
2 changes: 2 additions & 0 deletions tests/dummy/config/ember-try.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ module.exports = async function () {
npm: {
devDependencies: {
'ember-source': '~4.4.0',
'ember-qunit': '6.0.0',
'@ember/test-helpers': '2.7.0',
},
},
},
Expand Down
10,737 changes: 4,537 additions & 6,200 deletions yarn.lock

Large diffs are not rendered by default.

0 comments on commit f81ef8b

Please sign in to comment.