Skip to content

Commit d582792

Browse files
committed
Minor package and security updates. Update to latest gulp-sass for high severity error. Silence annoying babel warning.
@atomic-reactor/cli ^2.2.55 → ^2.2.57 nodemon ^2.0.7 → ^2.0.12 ora ^5.4.0 → ^5.4.1 action-sequence ^1.1.1 → ^1.1.2 dayjs ^1.10.4 → ^1.10.6 chalk ^4.1.0 → ^4.1.2 xss ^1.0.8 → ^1.0.9
1 parent c0b7abe commit d582792

File tree

9 files changed

+803
-829
lines changed

9 files changed

+803
-829
lines changed

.core/babel.config.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ module.exports = {
6868
],
6969
['@babel/plugin-proposal-export-default-from'],
7070
['@babel/plugin-proposal-private-methods', { loose: true }],
71+
['@babel/plugin-proposal-private-property-in-object', { loose: true }],
7172
],
7273
env: {
7374
test: {
@@ -106,6 +107,10 @@ module.exports = {
106107
},
107108
],
108109
['@babel/plugin-syntax-dynamic-import'],
110+
[
111+
'@babel/plugin-proposal-private-property-in-object',
112+
{ loose: true },
113+
],
109114
],
110115
},
111116
},

.core/gulp.tasks.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@ const browserSync = require('browser-sync');
1010
const gulpif = require('gulp-if');
1111
const gulpwatch = require('@atomic-reactor/gulp-watch');
1212
const prefix = require('gulp-autoprefixer');
13-
const sass = require('gulp-sass');
14-
sass.compiler = require('sass');
13+
const sass = require('gulp-sass')(require('sass'));
1514
const fiber = require('fibers');
1615
const gzip = require('gulp-gzip');
1716
const reactiumImporter = require('@atomic-reactor/node-sass-reactium-importer');

docs/api_project.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ define({
88
"apidoc": "0.3.0",
99
"generator": {
1010
"name": "apidoc",
11-
"time": "2021-07-17T01:45:24.214Z",
11+
"time": "2021-08-17T19:20:16.141Z",
1212
"url": "https://apidocjs.com",
1313
"version": "0.25.0"
1414
}

docs/api_project.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"apidoc": "0.3.0",
99
"generator": {
1010
"name": "apidoc",
11-
"time": "2021-07-17T01:45:24.214Z",
11+
"time": "2021-08-17T19:20:16.141Z",
1212
"url": "https://apidocjs.com",
1313
"version": "0.25.0"
1414
}

package-lock.json

Lines changed: 674 additions & 817 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -53,19 +53,19 @@
5353
"@babel/cli": "^7.13.14",
5454
"@babel/node": "^7.13.13",
5555
"@loadable/component": "^5.14.1",
56-
"action-sequence": "^1.1.1",
56+
"action-sequence": "^1.1.2",
5757
"axios": "^0.21.1",
5858
"axios-retry": "^3.1.9",
5959
"body-parser": "^1.19.0",
60-
"chalk": "^4.1.0",
60+
"chalk": "^4.1.2",
6161
"classnames": "^2.3.1",
6262
"cookie-parser": "^1.4.5",
6363
"cookie-session": "^2.0.0-beta.3",
6464
"copy-to-clipboard": "^3.3.1",
6565
"core-js": "^3.10.1",
6666
"cors": "^2.8.5",
6767
"cross-env": "^7.0.3",
68-
"dayjs": "^1.10.4",
68+
"dayjs": "^1.10.6",
6969
"directory-tree": "^2.2.7",
7070
"express": "^4.17.1",
7171
"express-static-gzip": "^2.1.1",
@@ -95,10 +95,10 @@
9595
"shallow-equals": "^1.0.0",
9696
"underscore": "*",
9797
"uuid": "^3.4.0",
98-
"xss": "^1.0.8"
98+
"xss": "^1.0.9"
9999
},
100100
"devDependencies": {
101-
"@atomic-reactor/cli": "^2.2.55",
101+
"@atomic-reactor/cli": "^2.2.57",
102102
"@atomic-reactor/gulp-watch": "^5.0.2",
103103
"@atomic-reactor/node-sass-reactium-importer": "^1.0.0",
104104
"@atomic-reactor/webpack-po-loader": "0.0.3",
@@ -141,7 +141,7 @@
141141
"gulp-less": "^4.0.1",
142142
"gulp-rename": "^2.0.0",
143143
"gulp-run": "^1.7.1",
144-
"gulp-sass": "^4.1.0",
144+
"gulp-sass": "^5.0.0",
145145
"gulp-sourcemaps": "^3.0.0",
146146
"gulp4-run-sequence": "^1.0.1",
147147
"handlebars": "^4.7.7",
@@ -151,8 +151,8 @@
151151
"lint-staged": "^9.4.3",
152152
"module-alias": "^2.2.2",
153153
"node-sass": "^5.0.0",
154-
"nodemon": "^2.0.7",
155-
"ora": "^5.4.0",
154+
"nodemon": "^2.0.12",
155+
"ora": "^5.4.1",
156156
"readdir-recursive": "0.0.4",
157157
"sass": "^1.34.1",
158158
"slugify": "^1.5.0",
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
import React, { useEffect } from 'react';
2+
import Reactium from 'reactium-core/sdk';
3+
import { Link } from 'react-router-dom';
4+
5+
const Article = props => {
6+
const {
7+
active,
8+
currentRoute,
9+
previousRoute,
10+
transitionState,
11+
transitionStates,
12+
changes,
13+
} = props;
14+
15+
useEffect(() => {
16+
const to = setTimeout(() => {
17+
if (transitionState !== 'READY') {
18+
Reactium.Routing.nextState();
19+
}
20+
}, 1000);
21+
return () => clearTimeout(to);
22+
}, [transitionState]);
23+
24+
console.log('Article', { transitionState });
25+
26+
if (transitionState === 'LOADING') return <div>Loading...</div>;
27+
28+
return (
29+
<div>
30+
<div>(Article) Route Status: {transitionState}</div>
31+
<Link to={'/product/1'}>Product 1</Link>
32+
</div>
33+
);
34+
};
35+
36+
export default Article;
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
import React, { useEffect } from 'react';
2+
import Reactium from 'reactium-core/sdk';
3+
import { Link } from 'react-router-dom';
4+
5+
const Product = props => {
6+
const {
7+
active,
8+
currentRoute,
9+
previousRoute,
10+
transitionState,
11+
transitionStates,
12+
changes,
13+
} = props;
14+
15+
useEffect(() => {
16+
// Change Transition State on this component if not READY
17+
// every 1 second
18+
const to = setTimeout(() => {
19+
if (transitionState !== 'READY') {
20+
Reactium.Routing.nextState();
21+
}
22+
}, 1000);
23+
return () => clearTimeout(to);
24+
}, [transitionState]);
25+
26+
console.log('Product', { transitionState });
27+
28+
if (transitionState === 'LOADING') return <div>Loading...</div>;
29+
30+
return (
31+
<div>
32+
<div>(Product) Route Status: {transitionState}</div>
33+
<Link to={'/article/1'}>Article 1</Link>
34+
</div>
35+
);
36+
};
37+
38+
export default Product;
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
import Article from './Article';
2+
import Product from './Product';
3+
4+
// This is the same as the default
5+
const transitionStates = [
6+
{
7+
state: 'EXITING',
8+
active: 'previous',
9+
},
10+
{
11+
state: 'LOADING',
12+
active: 'current',
13+
},
14+
{
15+
state: 'ENTERING',
16+
active: 'current',
17+
},
18+
{
19+
state: 'READY',
20+
active: 'current',
21+
},
22+
];
23+
24+
// route.js can export an array of routes as well
25+
export default [
26+
{
27+
path: '/article/:id',
28+
component: Article,
29+
transitions: true,
30+
transitionStates,
31+
type: 'articles',
32+
},
33+
{
34+
path: '/product/:id',
35+
component: Product,
36+
transitions: true,
37+
transitionStates,
38+
},
39+
];

0 commit comments

Comments
 (0)