Skip to content

Commit e74dee3

Browse files
committed
Firefly-451: package.json updates
- Allows any version of node v8 or later - Most packages updated - Packages now locked at their revisions instead of minor releases - Babel updated, to most recent, 7.8 - ESlint updated to most recent, and now better supports ES2020 - Jest update some, can go to most recent with node 8 - JSDoc updated to most recent - Webpack updated a few revisions, (minor) - Other package updated when there is compatibility - Cleaned out several unused packages - Added `package-json-doc.md` to help better document package.json - transformation-matrix-js moved from npm package to externalSource - it is not longer supported as a npm package. - changed yarn install to yarn install --ignore-platform - this is because of a bug in yarn fsevents is an optional dependency and if in resolutions, npm works correctly see yarnpkg/yarn#7273 - changed a couple of files of use `?.` to make sure it works - optional chaining - to update all the url load we have to change the way we reference images in css files. we not reference them under ~images instread of /images - Small bug fixes: - Fixes Firefly-470 - Fixes Firefly-476 - Fixes Firefly-477
1 parent 86ab622 commit e74dee3

38 files changed

+4639
-4403
lines changed

.eslintrc

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,13 @@
1616

1717
"env": {
1818
"es6": true,
19+
"es2020": true,
1920
"browser": true,
2021
"jest": true
2122
},
23+
"parser": "babel-eslint",
2224
"parserOptions": {
23-
"ecmaVersion": 7,
25+
"ecmaVersion": 2020,
2426
"ecmaFeatures": {
2527
"arrowFunctions" : true,
2628
"binaryLiterals" : true,
@@ -43,8 +45,13 @@
4345
},
4446
"sourceType": "module"
4547
},
46-
"rules": {
47-
48+
"settings": {
49+
"react": {
50+
"createClass": "createReactClass", // Regex for Component Factory to use,
51+
"version": "detect", // React version. "detect" automatically picks the version you have installed.
52+
}
53+
},
54+
"rules": {
4855
"arrow-parens": [2, "always"],
4956
"comma-spacing": 0,
5057
"curly": [2, "multi-line"],

__jest__/jest.transform.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,5 @@ module.exports = require('babel-jest').createTransformer({
1111
],
1212
plugins:[
1313
'@babel/plugin-transform-runtime',
14-
'@babel/plugin-proposal-class-properties'
1514
]
1615
});

buildScript/global.gincl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ ext.NODE = { ...cmd ->
185185
exec {
186186
workingDir = rootDir
187187
executable "yarn"
188-
args "install", "--frozen-lockfile"
188+
args "install", "--ignore-platform", "--frozen-lockfile"
189189
}
190190
}
191191

buildScript/webpack.config.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ export default function makeWebpackConfig(config) {
4343
alias : {
4444
firefly : path.resolve(config.firefly_dir, 'js'),
4545
styles : path.resolve(config.firefly_dir, 'html', 'css'),
46+
images : path.resolve(config.firefly_dir, 'html', 'images'),
4647
html : path.resolve(config.firefly_dir, 'html')
4748
}
4849
};
@@ -127,14 +128,13 @@ export default function makeWebpackConfig(config) {
127128
debug: false,//!ENV_PROD, uncomment this line to enable the debugger
128129
modules: false, // preserve application module style - in our case es6 modules
129130
useBuiltIns : 'usage',
130-
corejs:'core-js@2'
131+
corejs: 3
131132
}
132133
],
133134
'@babel/preset-react'
134135
],
135136
plugins: [
136137
'@babel/plugin-transform-runtime',
137-
'@babel/plugin-proposal-class-properties'
138138
]
139139
}
140140
},
@@ -145,7 +145,8 @@ export default function makeWebpackConfig(config) {
145145
loader: 'style-loader'
146146
},
147147
{
148-
loader: `css-loader?root=${path.resolve(config.firefly_dir, 'html')}`,
148+
loader: 'css-loader'
149+
// loader: `css-loader?root=${path.resolve(config.firefly_dir, 'html')}`,
149150
},
150151
]
151152
},

package-json-doc.md

Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
### Info and guide to firefly package.json - 2/1/2020
2+
3+
4+
If package.json allowed comments we would put this inline.
5+
6+
7+
## Runtime Dependencies
8+
9+
We are striving to keep most of the runtime dependencies up-to-date. The react/UI dependences will change often.
10+
The non-react dependencies do not change much.
11+
12+
##### UI: `react` - always strive to keep up-to-date
13+
- react
14+
- react-dom
15+
- prop-types
16+
17+
##### UI: 3 party react base packages
18+
- fixed-data-table-2
19+
- rc-slider
20+
- rc-tree
21+
- react-color
22+
- react-datetime
23+
- react-dnd (not current version, _see below_)
24+
- react-dnd-html5-backend (not current version, _see below_)
25+
- react-grid-layout
26+
- react-select
27+
- react-sizeme
28+
- react-split-pane
29+
30+
##### Non- UI:
31+
- enum
32+
- immutability-helper
33+
- isomorphic-fetch
34+
- local-storage
35+
- lodash
36+
- moment
37+
- point-in-polygon
38+
- shallowequal
39+
- validator
40+
- redux (v3, v4 has possible breaking changes, _see below_)
41+
- redux-logger
42+
- redux-saga (v0, v1 has some possible breaking changes, _see below_)
43+
- redux-thunk
44+
45+
### Runtime Dependencies - not updated
46+
47+
These runtime dependencies that are purposely not most the most recent version
48+
49+
#### `redux`
50+
We have not yet updating redux to version 4. To update to for we are going to
51+
have to make sure are do stuff to create exceptions. This will need a little testing
52+
and fixes.
53+
54+
From release notes:
55+
> Throw if getState, subscribe, or unsubscribe called while dispatching (including inside a reducer)
56+
57+
https://github.com/reduxjs/redux/tree/v4.0.0
58+
59+
Redux is fairly simple conceptually. There is no urgency to update.
60+
61+
#### `redux-saga`
62+
Has some breaking changes going to version 1. It will need some testing if we upgrade.
63+
We use very little of redux-saga so the breaking changes might not affect us.
64+
65+
#### `react-dnd` and `react-dnd-backend`
66+
These are used by `eternal/FilePicker`. This code will need to back updated to use the new versions.
67+
68+
69+
70+
## Build, Test, Doc Dependencies
71+
72+
#### `Babel`
73+
Babel is completely up to date. We will work to keep it that way every year.
74+
Babel seems to change required package almost every update. When we goto the next
75+
version please make sure all these package are still necessary
76+
77+
babel packages:
78+
- @babel/core
79+
- @babel/preset-react
80+
- @babel/register
81+
- @babel/plugin-transform-runtime
82+
- @babel/preset-env
83+
84+
Runtime
85+
- core-js
86+
- regenerator-runtime
87+
88+
#### `Webpack`
89+
Webpack is completely up to date. We will work to keep it that way every year.
90+
The loaders are mostly up to date, some require node 10.13
91+
92+
Webpack packages:
93+
- webpack
94+
- webpack-cli
95+
- babel-loader
96+
- style-loader
97+
- css-loader
98+
- url-loader (v2, v3 requires node 10.13)
99+
- file-loader (v4, v5 requires node 10.13)
100+
- webpack-visualizer-plugin
101+
102+
103+
#### `Jest`
104+
Version 24. (Version 25 requires node >10)
105+
106+
107+
#### `JSDoc`
108+
JSDoc is completely up to date. We should always keep this up-to-date
109+
110+
JSDoc packages:
111+
- jsdoc
112+
- jsdoc-jsx
113+
- ink-docstrap
114+
- publish-release
115+
116+
#### `ESLint`
117+
ESLint is completely up to date. We should always keep this up-to-date
118+
119+
ESLint packages:
120+
- eslint
121+
- babel-eslint
122+
- eslint-loader
123+
- eslint-plugin-jsdoc
124+
- eslint-plugin-jsx-a11y
125+
- eslint-plugin-react
126+
- eslint-plugin-react-hooks
127+

package.json

Lines changed: 65 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -3,84 +3,77 @@
33
"version": "1.0.0",
44
"license": "SEE LICENSE IN License.txt",
55
"description": "defining dependencies only",
6+
"notice": "IF YOU EDIT THIS FILE, PLEASE UPDATE package-json-doc.md",
67
"repository": {
78
"type": "git",
89
"url": "https://github.com/Caltech-IPAC/firefly.git"
910
},
1011
"dependencies": {
11-
"@babel/core": "^7.5.0",
12-
"@babel/plugin-proposal-class-properties": "^7.0.0",
13-
"@babel/plugin-transform-runtime": "^7.0.0",
14-
"@babel/polyfill": "^7.0.0",
15-
"@babel/preset-env": "^7.4.4",
16-
"@babel/preset-react": "^7.0.0",
17-
"@babel/preset-stage-3": "^7.0.0",
18-
"@babel/register": "^7.4.4",
19-
"@babel/runtime-corejs2": "^7.0.0",
20-
"babel-loader": "^8.0.0",
21-
"babel-plugin-react-transform": "^2.0.2",
22-
"classnames": "^2.2.5",
23-
"core-js": "^2.6.4",
24-
"enum": "^2.5",
25-
"fixed-data-table-2": "^0.8.22",
26-
"immutability-helper": "^3.0",
27-
"isomorphic-fetch": "^2.2.1",
28-
"local-storage": "^1.4.2",
29-
"lodash": "^4.17",
30-
"moment": "^2.17",
31-
"numeral": "^2.0.6",
32-
"point-in-polygon": "^1.0.1",
33-
"prop-types": "^15.6",
34-
"rc-slider": "^8.6",
35-
"rc-tree": "^1.14.9",
36-
"react": "^16.8",
37-
"react-addons-update": "^15.6.2",
38-
"react-color": "^2.17.0",
39-
"react-datetime": "^2.16.0",
40-
"react-dnd": "^7.0.2",
41-
"react-dnd-html5-backend": "^7.0.2",
42-
"react-dom": "^16.8.1",
43-
"react-grid-layout": "^0.16.6",
44-
"react-select": "^2.3.0",
45-
"react-sizeme": "^2.5.2",
46-
"react-split-pane": "^0.1.85",
47-
"redux": "^3.7",
48-
"redux-logger": "^3.0",
49-
"redux-saga": "^0.16",
50-
"redux-thunk": "^2.2",
51-
"shallowequal": "^1.0.2",
52-
"transformation-matrix-js": "^2.7.1",
53-
"validator": "^9.4"
12+
"core-js": "~3.6",
13+
"regenerator-runtime": "~0.13",
14+
"enum": "~2.5",
15+
"immutability-helper": "~3.0",
16+
"isomorphic-fetch": "~2.2",
17+
"local-storage": "~1.4.2",
18+
"lodash": "~4.17",
19+
"moment": "~2.24",
20+
"point-in-polygon": "~1.0",
21+
"shallowequal": "~1.1",
22+
"validator": "~12.2",
23+
"rc-slider": "~9.1",
24+
"rc-tree": "~2.1",
25+
"redux": "~3.7",
26+
"redux-logger": "~3.0",
27+
"redux-saga": "~0.16",
28+
"redux-thunk": "~2.3",
29+
"react": "~16.12",
30+
"react-dom": "~16.12",
31+
"prop-types": "~15.7",
32+
"react-color": "~2.18",
33+
"react-datetime": "~2.16",
34+
"react-dnd": "~7.0",
35+
"react-dnd-html5-backend": "~7.7",
36+
"react-grid-layout": "~0.17",
37+
"react-select": "~3.0",
38+
"react-sizeme": "~2.6",
39+
"react-split-pane": "~0.1",
40+
"fixed-data-table-2": "~1.0"
5441
},
5542
"devDependencies": {
56-
"@babel/core": "^7.5.0",
57-
"@babel/preset-env": "^7.4.4",
58-
"babel-core": "^7.0.0-bridge.0",
59-
"babel-jest": "^23.4.2",
60-
"chai": "^3.5.0",
61-
"css-loader": "^0.19.0",
62-
"eslint": "^5.1.0",
63-
"eslint-loader": "^2.1.0",
64-
"eslint-plugin-jsdoc": "^v3.4.1",
65-
"eslint-plugin-jsx-a11y": "^6.0.3",
66-
"eslint-plugin-react": "^7.6.1",
67-
"eslint-plugin-react-hooks": "^1.6.1",
68-
"file-loader": "^0.9.0",
69-
"ink-docstrap": "^1.2.1",
70-
"jest": "^23.6.0",
71-
"jsdoc": "^3.5.5",
72-
"jsdoc-jsx": "^0.1.0",
73-
"mocha": "^3.1.0",
74-
"postcss-loader": "^0.11.1",
75-
"publish-release": "^1.1.0",
76-
"react-redux": "^5.0.0",
77-
"redux-devtools": "^3.3.1",
78-
"request": "^2.65.0",
79-
"script-loader": "^0.6.1",
80-
"style-loader": "^0.12.3",
81-
"url-loader": "^0.5.7",
82-
"webpack": "^4.29",
83-
"webpack-cli": "^3.2",
84-
"webpack-visualizer-plugin": "^0.1.11"
43+
"@babel/core": "~7.8",
44+
"@babel/preset-react": "~7.8",
45+
"@babel/register": "~7.8",
46+
"@babel/plugin-transform-runtime": "~7.8",
47+
"@babel/preset-env": "~7.8",
48+
"eslint": "~6.8",
49+
"babel-eslint": "~10.0",
50+
"eslint-loader": "~3.0",
51+
"eslint-plugin-jsdoc": "~21.0",
52+
"eslint-plugin-jsx-a11y": "~6.2",
53+
"eslint-plugin-react": "~7.18",
54+
"eslint-plugin-react-hooks": "~2.3",
55+
"jest": "~24.9",
56+
"babel-jest": "~24.9",
57+
"babel-core": "7.0.0-bridge.0",
58+
"jsdoc": "~3.6",
59+
"jsdoc-jsx": "~0.1",
60+
"ink-docstrap": "~1.3",
61+
"publish-release": "~1.6",
62+
"request": "~2.88",
63+
"webpack": "~4.41",
64+
"webpack-cli": "~3.3",
65+
"babel-loader": "~8.0",
66+
"style-loader": "~1.1",
67+
"css-loader": "~3.4",
68+
"url-loader": "~2.3",
69+
"file-loader": "~4.3",
70+
"webpack-visualizer-plugin": "~0.1.11"
71+
},
72+
"optionalDependencies": {
73+
"fsevents": "~2.1"
74+
},
75+
"resolutions": {
76+
"**/chokidar/fsevents": "~2.1",
77+
"**/jest-haste-map/fsevents": "~2.1"
8578
}
8679
}

0 commit comments

Comments
 (0)