Skip to content

Commit

Permalink
fix: change dayjs to per-package dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
martinjagodic committed Nov 24, 2023
1 parent 63060ae commit 592bf3b
Show file tree
Hide file tree
Showing 9 changed files with 8 additions and 17 deletions.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,6 @@
"@emotion/babel-preset-css-prop": "^11.11.0",
"browserify": "^17.0.0",
"buffer": "^6.0.3",
"dayjs": "^1.11.10",
"emotion": "^11.0.0",
"eslint-config-prettier": "^8.0.0",
"eslint-plugin-babel": "^5.3.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/decap-cms-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"@emotion/react": "^11.11.1",
"@emotion/styled": "^11.11.0",
"codemirror": "^5.46.0",
"dayjs": "^1.11.10",
"decap-cms-backend-azure": "^3.1.0-beta.0",
"decap-cms-backend-bitbucket": "^3.1.0-beta.0",
"decap-cms-backend-git-gateway": "^3.1.0-beta.0",
Expand Down Expand Up @@ -65,7 +66,6 @@
"uuid": "^8.3.2"
},
"peerDependencies": {
"dayjs": "^1.11.10",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
Expand Down
2 changes: 0 additions & 2 deletions packages/decap-cms-app/src/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { DecapCmsCore as CMS } from 'decap-cms-core';
import dayjs from 'dayjs';
import './extensions.js';

// Log version
Expand All @@ -11,6 +10,5 @@ if (typeof window !== 'undefined') {

export const DecapCmsApp = {
...CMS,
dayjs,
};
export default CMS;
2 changes: 1 addition & 1 deletion packages/decap-cms-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"ajv-keywords": "^5.0.0",
"clean-stack": "^4.1.0",
"copy-text-to-clipboard": "^3.0.0",
"dayjs": "^1.11.10",
"deepmerge": "^4.2.2",
"diacritics": "^1.3.0",
"fuzzy": "^0.1.1",
Expand Down Expand Up @@ -77,7 +78,6 @@
"peerDependencies": {
"@emotion/react": "^11.11.1",
"@emotion/styled": "^11.11.0",
"dayjs": "^1.11.10",
"decap-cms-editor-component-image": "^3.0.0",
"decap-cms-lib-auth": "^3.0.0",
"decap-cms-lib-util": "^3.0.0",
Expand Down
1 change: 0 additions & 1 deletion packages/decap-cms-default-exports/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
"uuid": "^8.3.2"
},
"peerDependencies": {
"dayjs": "^1.11.10",
"react": "^18.2.0",
"react-dom": "^18.2.0"
}
Expand Down
2 changes: 0 additions & 2 deletions packages/decap-cms-default-exports/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import EmotionStyled from '@emotion/styled';
import Immutable from 'immutable';
import ImmutablePropTypes from 'react-immutable-proptypes';
import Lodash from 'lodash/lodash';
import Dayjs from 'dayjs';
import PropTypes from 'prop-types';
import React from 'react';
import ReactDOM from 'react-dom';
Expand All @@ -35,7 +34,6 @@ export const DecapCmsDefaultExports = {
Immutable,
ImmutablePropTypes,
Lodash,
Dayjs,
PropTypes,
React,
ReactDOM,
Expand Down
4 changes: 3 additions & 1 deletion packages/decap-cms-lib-widgets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,10 @@
"build": "cross-env NODE_ENV=production webpack",
"build:esm": "cross-env NODE_ENV=esm babel src --out-dir dist/esm --ignore \"**/__tests__\" --root-mode upward --extensions \".js,.jsx,.ts,.tsx\""
},
"dependencies": {
"dayjs": "^1.11.10"
},
"peerDependencies": {
"dayjs": "^1.11.10",
"immutable": "^3.7.6",
"lodash": "^4.17.11"
}
Expand Down
4 changes: 3 additions & 1 deletion packages/decap-cms-widget-datetime/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,11 @@
"build": "cross-env NODE_ENV=production webpack",
"build:esm": "cross-env NODE_ENV=esm babel src --out-dir dist/esm --ignore \"**/__tests__\" --root-mode upward"
},
"dependencies": {
"dayjs": "^1.11.10"
},
"peerDependencies": {
"@emotion/react": "^11.11.1",
"dayjs": "^1.11.10",
"react": "^18.2.0"
}
}
7 changes: 0 additions & 7 deletions scripts/externals.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,6 @@ module.exports = {
amd: 'immutable',
umd: 'immutable',
},
dayjs: {
root: ['DecapCmsDefaultExports', 'Dayjs'],
commonjs2: 'dayjs',
commonjs: 'dayjs',
amd: 'dayjs',
umd: 'dayjs',
},
'prop-types': {
root: ['DecapCmsDefaultExports', 'PropTypes'],
commonjs2: 'prop-types',
Expand Down

0 comments on commit 592bf3b

Please sign in to comment.