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

chore(deps): update dependency ember-moment to v10 #430

Merged
merged 8 commits into from
May 19, 2022
Merged
Show file tree
Hide file tree
Changes from all 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
3 changes: 0 additions & 3 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,4 @@ module.exports = {
extends: ['plugin:qunit/recommended'],
},
],
globals: {
moment: true,
},
};
3 changes: 2 additions & 1 deletion app/abilities/forum/post.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { isNone } from '@ember/utils';
import { Ability } from 'ember-can';
import { isNone } from '@ember/utils';
import moment from 'moment';

export default class Post extends Ability {
get canShow() {
Expand Down
1 change: 1 addition & 0 deletions app/components/forum/forum-post.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import Component from '@ember/component';
import moment from 'moment';

const ForumPostComponent = Component.extend({
showMarkdown: false,
Expand Down
5 changes: 3 additions & 2 deletions app/components/input/date-input.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { inject as service } from '@ember/service';
import TimeInputComponent from './time-input';
import { computed } from '@ember/object';
import moment from 'moment';
import { oneWay } from '@ember/object/computed';
import TimeInputComponent from './time-input';
import { inject as service } from '@ember/service';

export default TimeInputComponent.extend({
media: service(),
Expand Down
3 changes: 2 additions & 1 deletion app/components/input/time-input.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { computed } from '@ember/object';
import TextField from '@ember/component/text-field';
import { computed } from '@ember/object';
import moment from 'moment';

export default TextField.extend({
tagName: 'span',
Expand Down
9 changes: 5 additions & 4 deletions app/components/tools/board-room-presence.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import { equal } from '@ember/object/computed';
import Ember from 'ember';
import { inject as service } from '@ember/service';
import { task, timeout } from 'ember-concurrency';
import Component from '@ember/component';
import Ember from 'ember';
import { computed } from '@ember/object';
import { task, timeout } from 'ember-concurrency';
import { equal } from '@ember/object/computed';
import moment from 'moment';
import { inject as service } from '@ember/service';

const BoardRoomPresence = Component.extend({
session: service(),
Expand Down
1 change: 1 addition & 0 deletions app/controllers/application/group-memberships.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import Controller from '@ember/controller';
import { action } from '@ember/object';
import { isBlank } from '@ember/utils';
import moment from 'moment';
import { tracked } from '@glimmer/tracking';

export default class GroupMembershipsController extends Controller {
Expand Down
3 changes: 2 additions & 1 deletion app/controllers/photo-albums/photo-album/photos/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { action } from '@ember/object';
import Controller from '@ember/controller';
import { action } from '@ember/object';
import { dasherize } from '@ember/string';
import moment from 'moment';
import { inject as service } from '@ember/service';

export default class PhotoAlbumPhotosIndexController extends Controller {
Expand Down
3 changes: 2 additions & 1 deletion app/helpers/form-opened-label.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { inject as service } from '@ember/service';
import Helper from '@ember/component/helper';
import moment from 'moment';
import { inject as service } from '@ember/service';

export default class FormOpenedLabel extends Helper {
@service intl;
Expand Down
3 changes: 2 additions & 1 deletion app/models/activity.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import Model, { belongsTo, attr } from '@ember-data/model';
import { isNone } from '@ember/utils';
import { CoverPhotoFallback } from 'amber-ui/constants';
import { isNone } from '@ember/utils';
import moment from 'moment';

export default class Activity extends Model {
// Attributes
Expand Down
3 changes: 2 additions & 1 deletion app/models/form/form.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import Model, { hasMany, attr } from '@ember-data/model';
import { all } from 'rsvp';
import { A } from '@ember/array';
import { all } from 'rsvp';
import moment from 'moment';

export default class Form extends Model {
@attr respondFrom;
Expand Down
1 change: 1 addition & 0 deletions app/models/forum/post.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import Model, { belongsTo, attr } from '@ember-data/model';
import moment from 'moment';

export default class Post extends Model {
// Properties
Expand Down
1 change: 1 addition & 0 deletions app/models/membership.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import Model, { belongsTo, attr } from '@ember-data/model';
import moment from 'moment';

export default class Membership extends Model {
// Attributes
Expand Down
1 change: 1 addition & 0 deletions app/models/poll.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import Model, { belongsTo, attr } from '@ember-data/model';
import { isNone } from '@ember/utils';
import moment from 'moment';

export default class Poll extends Model {
// Properties
Expand Down
1 change: 0 additions & 1 deletion config/environment.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ module.exports = function (environment) {
},

moment: {
includeLocales: ['nl'],
allowEmpty: true,
},

Expand Down
11 changes: 11 additions & 0 deletions ember-cli-build.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
'use strict';

const EmberApp = require('ember-cli/lib/broccoli/ember-app');
const MomentLocalesPlugin = require('moment-locales-webpack-plugin');

module.exports = function (defaults) {
let app = new EmberApp(defaults, {
Expand All @@ -25,6 +26,16 @@ module.exports = function (defaults) {
useSessionSetupMethod: true,
},

autoImport: {
webpack: {
plugins: [
new MomentLocalesPlugin({
localesToKeep: ['nl'],
}),
],
},
},

babel: {
sourceMaps: 'inline',
},
Expand Down
2 changes: 1 addition & 1 deletion mirage/factories/user.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Factory } from 'ember-cli-mirage';

import faker from '@faker-js/faker';
import moment from 'moment';

export default Factory.extend({
activatedAt: () => faker.date.past(10),
Expand Down
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
"ember-linkify": "^4.1.2",
"ember-load-initializers": "^2.1.2",
"ember-maybe-import-regenerator": "^0.1.6",
"ember-moment": "^9.0.1",
"ember-moment": "^10.0.0",
"ember-pikaday": "^3.0.0",
"ember-power-select": "^5.0.4",
"ember-promise-helpers": "^2.0.0",
Expand All @@ -94,7 +94,8 @@
"glob": "^4.0.5",
"http-proxy": "^1.1.6",
"loader.js": "^4.7.0",
"moment-duration-format": "^2.3.2",
"moment": "^2.29.1",
"moment-locales-webpack-plugin": "^1.2.0",
"morgan": "^1.3.2",
"npm-run-all": "^4.1.5",
"prettier": "^2.5.1",
Expand All @@ -115,7 +116,7 @@
"workerpool@^2.3.0": "^2.3.4"
},
"engines": {
"node": "12.* || 14.* || >= 16"
"node": "14.* || >= 16"
},
"ember": {
"edition": "octane"
Expand Down
5 changes: 4 additions & 1 deletion tests/unit/helpers/form-opened-label-test.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
import { module, test } from 'qunit';
import EmberObject from '@ember/object';
import Service from '@ember/service';
import formOpenedLabelHelper from 'amber-ui/helpers/form-opened-label';
import { module, test } from 'qunit';
import moment from 'moment';

module('Unit | Helper | form opened label', function () {
moment.locale('nl');

const i18nStub = Service.extend({
t: (text) => text,
});
Expand Down
3 changes: 2 additions & 1 deletion tests/unit/models/user-test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { run } from '@ember/runloop';
import { module, test } from 'qunit';
import moment from 'moment';
import { run } from '@ember/runloop';
import { setupTest } from 'ember-qunit';

let user;
Expand Down
85 changes: 67 additions & 18 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1680,6 +1680,16 @@ __metadata:
languageName: node
linkType: hard

"@embroider/addon-shim@npm:^0.50.2":
version: 0.50.2
resolution: "@embroider/addon-shim@npm:0.50.2"
dependencies:
"@embroider/shared-internals": ^0.50.2
semver: ^7.3.5
checksum: 14076ec7c1dd5b29c1450711c37986c70d72148cff42c8114a532473ee059257a4eec7bdb933bb774c16d98420e920112e8f4ed57b42af998103c0b802fe47de
languageName: node
linkType: hard

"@embroider/addon-shim@npm:^1.0.0":
version: 1.6.0
resolution: "@embroider/addon-shim@npm:1.6.0"
Expand Down Expand Up @@ -1736,6 +1746,21 @@ __metadata:
languageName: node
linkType: hard

"@embroider/shared-internals@npm:^0.50.2":
version: 0.50.2
resolution: "@embroider/shared-internals@npm:0.50.2"
dependencies:
babel-import-util: ^1.1.0
ember-rfc176-data: ^0.3.17
fs-extra: ^9.1.0
lodash: ^4.17.21
resolve-package-path: ^4.0.1
semver: ^7.3.5
typescript-memoize: ^1.0.1
checksum: 340426b9bb8cd43caa0db2c9455c6443c71e6ea37509e5555a1ac50db619f0cf42aa094807769571a0f81d3625f592a8626a7438440b52684eccb4c026d94ccf
languageName: node
linkType: hard

"@embroider/shared-internals@npm:^1.6.0":
version: 1.6.0
resolution: "@embroider/shared-internals@npm:1.6.0"
Expand Down Expand Up @@ -3518,7 +3543,7 @@ __metadata:
ember-linkify: ^4.1.2
ember-load-initializers: ^2.1.2
ember-maybe-import-regenerator: ^0.1.6
ember-moment: ^9.0.1
ember-moment: ^10.0.0
ember-pikaday: ^3.0.0
ember-power-select: ^5.0.4
ember-promise-helpers: ^2.0.0
Expand All @@ -3544,7 +3569,8 @@ __metadata:
glob: ^4.0.5
http-proxy: ^1.1.6
loader.js: ^4.7.0
moment-duration-format: ^2.3.2
moment: ^2.29.1
moment-locales-webpack-plugin: ^1.2.0
morgan: ^1.3.2
npm-run-all: ^4.1.5
prettier: ^2.5.1
Expand Down Expand Up @@ -8092,7 +8118,7 @@ __metadata:
languageName: node
linkType: hard

"ember-auto-import@npm:^1.10.1, ember-auto-import@npm:^1.11.3, ember-auto-import@npm:^1.12.0, ember-auto-import@npm:^1.5.3, ember-auto-import@npm:^1.6.0":
"ember-auto-import@npm:^1.11.3, ember-auto-import@npm:^1.12.0, ember-auto-import@npm:^1.5.3, ember-auto-import@npm:^1.6.0":
version: 1.12.1
resolution: "ember-auto-import@npm:1.12.1"
dependencies:
Expand Down Expand Up @@ -9489,16 +9515,20 @@ __metadata:
languageName: node
linkType: hard

"ember-moment@npm:^9.0.1":
version: 9.0.1
resolution: "ember-moment@npm:9.0.1"
"ember-moment@npm:^10.0.0":
version: 10.0.0
resolution: "ember-moment@npm:10.0.0"
dependencies:
ember-auto-import: ^1.10.1
ember-cli-babel: ^7.23.0
ember-cli-htmlbars: ^5.3.1
moment: ^2.29.1
moment-timezone: ^0.5.33
checksum: 902a509c00383f798fa96b49c986d84d164c411861749561655627e1cd74c882b6776e8fa75efdd376ad1460234244fc8dcb7a58b694fad7340108b5d768dde0
"@embroider/addon-shim": ^0.50.2
peerDependencies:
moment: ^2
moment-timezone: ^0.5.34
peerDependenciesMeta:
moment:
optional: true
moment-timezone:
optional: true
checksum: f01fa430f71ed4cc1149d62ef9c9dd18303263f37ece62f27912c31332e253c353a5719b41d4c9fe0a1955f5b99aaceda4b647e6678e5f49ab8bbe6f572042ea
languageName: node
linkType: hard

Expand Down Expand Up @@ -14249,6 +14279,13 @@ __metadata:
languageName: node
linkType: hard

"lodash.difference@npm:^4.5.0":
version: 4.5.0
resolution: "lodash.difference@npm:4.5.0"
checksum: ecee276aa578f300e79350805a14a51be8d1f12b3c1389a19996d8ab516f814211a5f65c68331571ecdad96522b863ccc484b55504ce8c9947212a29f8857d5a
languageName: node
linkType: hard

"lodash.find@npm:^4.5.1, lodash.find@npm:^4.6.0":
version: 4.6.0
resolution: "lodash.find@npm:4.6.0"
Expand Down Expand Up @@ -15403,14 +15440,19 @@ __metadata:
languageName: node
linkType: hard

"moment-duration-format@npm:^2.3.2":
version: 2.3.2
resolution: "moment-duration-format@npm:2.3.2"
checksum: 84bdb479b2d0d6fd4684ea4a5a8e3955024afa7a0df2369cd327fe35af020aa613283f71c7002d2c4af68015860137801e7d5cc8a6997289d005d697f2b88943
"moment-locales-webpack-plugin@npm:^1.2.0":
version: 1.2.0
resolution: "moment-locales-webpack-plugin@npm:1.2.0"
dependencies:
lodash.difference: ^4.5.0
peerDependencies:
moment: ^2.8.0
webpack: ^1 || ^2 || ^3 || ^4 || ^5
checksum: bb5daebfc2f2bd0c003b9d576893531edc6ac3c884c77fc4c3a7c8d228340c9a26a5c7676c8e4505922eebb1309f2defbcf619a1706d7d7e579039690df2487b
languageName: node
linkType: hard

"moment-timezone@npm:^0.5.13, moment-timezone@npm:^0.5.33":
"moment-timezone@npm:^0.5.13":
version: 0.5.34
resolution: "moment-timezone@npm:0.5.34"
dependencies:
Expand All @@ -15419,13 +15461,20 @@ __metadata:
languageName: node
linkType: hard

"moment@npm:>= 2.9.0, moment@npm:^2.19.3, moment@npm:^2.29.1":
"moment@npm:>= 2.9.0, moment@npm:^2.19.3":
version: 2.29.1
resolution: "moment@npm:2.29.1"
checksum: 1e14d5f422a2687996be11dd2d50c8de3bd577c4a4ca79ba5d02c397242a933e5b941655de6c8cb90ac18f01cc4127e55b4a12ae3c527a6c0a274e455979345e
languageName: node
linkType: hard

"moment@npm:^2.29.1":
version: 2.29.2
resolution: "moment@npm:2.29.2"
checksum: ee850b5776485e2af0775ceb3cfebaa7d7638f0a750fe0678fcae24c310749f96c1938808384bd422a55e5703834a71fcb09c8a1d36d9cf847f6ed0205d7a3e5
languageName: node
linkType: hard

"morgan@npm:^1.10.0, morgan@npm:^1.3.2":
version: 1.10.0
resolution: "morgan@npm:1.10.0"
Expand Down