mirror of
https://gitlab.com/bramw/baserow.git
synced 2025-04-17 18:32:35 +00:00
fixed moment dependency issue
This commit is contained in:
parent
d7c35a92de
commit
0d32330f56
18 changed files with 26 additions and 26 deletions
changelog.md
premium/web-frontend
modules/baserow_premium
test/unit/premium/admin/users
web-frontend
|
@ -24,6 +24,7 @@
|
|||
* **Premium**: You can now comment and discuss rows with others in your group, click the
|
||||
expand row button at the start of the row to view and add comments.
|
||||
* Added "Last Modified" and "Created On" field types.
|
||||
* Fixed moment issue if core is installed as a dependency.
|
||||
* New templates:
|
||||
* Blog Post Management
|
||||
* Updated templates:
|
||||
|
|
|
@ -5,7 +5,8 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import moment from 'moment'
|
||||
import moment from '@baserow/modules/core/moment'
|
||||
|
||||
export default {
|
||||
name: 'LocalDateField',
|
||||
functional: true,
|
||||
|
|
|
@ -21,9 +21,10 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import moment from 'moment'
|
||||
import { mapGetters } from 'vuex'
|
||||
|
||||
import moment from '@baserow/modules/core/moment'
|
||||
|
||||
export default {
|
||||
name: 'RowComment',
|
||||
props: {
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
import RowCommentService from '@baserow_premium/services/row_comments/row_comments'
|
||||
import _ from 'lodash'
|
||||
import moment from 'moment'
|
||||
|
||||
import moment from '@baserow/modules/core/moment'
|
||||
|
||||
import RowCommentService from '@baserow_premium/services/row_comments/row_comments'
|
||||
|
||||
export const state = () => ({
|
||||
comments: [],
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { TestApp } from '@baserow/test/helpers/testApp'
|
||||
import UsersAdminTable from '@baserow_premium/components/admin/users/UsersAdminTable'
|
||||
import moment from 'moment'
|
||||
import moment from '@baserow/modules/core/moment'
|
||||
import flushPromises from 'flush-promises'
|
||||
import UserAdminUserHelpers from '../../../../fixtures/uiHelpers'
|
||||
import MockPremiumServer from '@baserow_premium/../../test/fixtures/mockPremiumServer'
|
||||
|
|
|
@ -11,8 +11,7 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import moment from 'moment'
|
||||
|
||||
import moment from '@baserow/modules/core/moment'
|
||||
import context from '@baserow/modules/core/mixins/context'
|
||||
|
||||
export default {
|
||||
|
|
|
@ -49,8 +49,8 @@
|
|||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex'
|
||||
import moment from 'moment'
|
||||
|
||||
import moment from '@baserow/modules/core/moment'
|
||||
import modal from '@baserow/modules/core/mixins/modal'
|
||||
import error from '@baserow/modules/core/mixins/error'
|
||||
import { notifyIf } from '@baserow/modules/core/utils/error'
|
||||
|
|
|
@ -68,7 +68,7 @@
|
|||
* contents.
|
||||
*/
|
||||
|
||||
import moment from 'moment'
|
||||
import moment from '@baserow/modules/core/moment'
|
||||
import TrashEntry from '@baserow/modules/core/components/trash/TrashEntry'
|
||||
import InfiniteScroll from '@baserow/modules/core/components/helpers/InfiniteScroll'
|
||||
import TrashEmptyModal from '@baserow/modules/core/components/trash/TrashEmptyModal'
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
* trashed entry. Shows extra information about the entry like it's name, who trashed it
|
||||
* , how long ago it was trashed etc.
|
||||
*/
|
||||
import moment from 'moment'
|
||||
import moment from '@baserow/modules/core/moment'
|
||||
|
||||
export default {
|
||||
name: 'TrashEntry',
|
||||
|
|
5
web-frontend/modules/core/moment.js
Normal file
5
web-frontend/modules/core/moment.js
Normal file
|
@ -0,0 +1,5 @@
|
|||
// Moment should always be imported from here. This will enforce that the timezone
|
||||
// is always included. There were some problems when Baserow is installed as a
|
||||
// dependency and then moment-timezone does not work. Still will resolve that issue.
|
||||
export { default } from 'moment'
|
||||
export { tz } from 'moment-timezone'
|
|
@ -1,10 +1,5 @@
|
|||
import Vue from 'vue'
|
||||
|
||||
// Make sure that moment timezone is imported because it extends moment to enable
|
||||
// moment().tz(...) which we need in a couple of places.
|
||||
// eslint-disable-next-line
|
||||
import { tz } from 'moment-timezone'
|
||||
|
||||
import Context from '@baserow/modules/core/components/Context'
|
||||
import Modal from '@baserow/modules/core/components/Modal'
|
||||
import Editable from '@baserow/modules/core/components/Editable'
|
||||
|
|
|
@ -80,8 +80,7 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import moment from 'moment'
|
||||
|
||||
import moment from '@baserow/modules/core/moment'
|
||||
import { UploadFileUserFileUploadType } from '@baserow/modules/core/userFileUploadTypes'
|
||||
import UserFilesModal from '@baserow/modules/core/components/files/UserFilesModal'
|
||||
import FileFieldModal from '@baserow/modules/database/components/field/FileFieldModal'
|
||||
|
|
|
@ -35,8 +35,7 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import moment from 'moment'
|
||||
|
||||
import moment from '@baserow/modules/core/moment'
|
||||
import {
|
||||
getDateMomentFormat,
|
||||
getDateHumanReadableFormat,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import moment from 'moment'
|
||||
import BigNumber from 'bignumber.js'
|
||||
|
||||
import moment from '@baserow/modules/core/moment'
|
||||
import {
|
||||
isValidURL,
|
||||
isValidEmail,
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import moment from 'moment'
|
||||
|
||||
import moment from '@baserow/modules/core/moment'
|
||||
import {
|
||||
getDateMomentFormat,
|
||||
getTimeMomentFormat,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import moment from 'moment'
|
||||
import moment from '@baserow/modules/core/moment'
|
||||
import {
|
||||
getDateMomentFormat,
|
||||
getTimeMomentFormat,
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import moment from 'moment'
|
||||
|
||||
import moment from '@baserow/modules/core/moment'
|
||||
import { Registerable } from '@baserow/modules/core/registry'
|
||||
import ViewFilterTypeText from '@baserow/modules/database/components/view/ViewFilterTypeText'
|
||||
import ViewFilterTypeNumber from '@baserow/modules/database/components/view/ViewFilterTypeNumber'
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { TestApp } from '@baserow/test/helpers/testApp'
|
||||
import moment from 'moment'
|
||||
import moment from '@baserow/modules/core/moment'
|
||||
import {
|
||||
DateBeforeViewFilterType,
|
||||
DateAfterViewFilterType,
|
||||
|
|
Loading…
Add table
Reference in a new issue