gatsby-core-theme 5.1.4 → 6.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.storybook/main.js +1 -0
- package/CHANGELOG.md +18 -0
- package/jest.config.js +5 -1
- package/package.json +27 -30
- package/package.old.json +98 -0
- package/src/components/molecules/counter/counter-item/count-number/count-number.test.js +2 -2
- package/src/components/organisms/cards/index.js +1 -2
- package/src/styles/utils/_icons.scss +2 -2
- package/tests/custom-jest-environment.js +22 -0
- package/{loadershim.js → tests/loadershim.js} +1 -1
package/.storybook/main.js
CHANGED
|
@@ -46,6 +46,7 @@ module.exports = {
|
|
|
46
46
|
'~tests': path.resolve(__dirname, '../tests'),
|
|
47
47
|
'~context': path.resolve(__dirname, '../src/context'),
|
|
48
48
|
'~constants': path.resolve(__dirname, '../src/constants'),
|
|
49
|
+
'gatsby-page-utils': path.resolve(__dirname, '../../node_modules/gatsby-page-utils/dist'),
|
|
49
50
|
};
|
|
50
51
|
|
|
51
52
|
config.resolve.alias['$virtual/lazy-client-sync-requires'] = path.resolve(
|
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,21 @@
|
|
|
1
|
+
# [6.0.0](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/compare/v5.1.4...v6.0.0) (2022-03-31)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Breaking
|
|
5
|
+
|
|
6
|
+
* fixes tests ([5076ad0](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/5076ad01fbb21e779b23679091d4cec4c4152364))
|
|
7
|
+
* fixes tests ([13124fe](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/13124fe533af79d1bfa27bcafbe42430692fdf39))
|
|
8
|
+
* upgraded gatsby css and react packages ([764a722](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/764a722590cb3aea20064986caeffa231c74249e))
|
|
9
|
+
* upgraded to gatsby v4 ([97ba299](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/97ba299c1b596547aa1be3c74b508ebe74bfb0a2))
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
* removed unused packages ([924b2d5](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/924b2d5eba46322ccf2d573e72cc83bc02f1ec49))
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
* Merge branch 'tm-2812-gatsby-v4' into 'master' ([b0daf0c](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/commit/b0daf0cc9ddea499d81f03e734057c42474c1c54))
|
|
18
|
+
|
|
1
19
|
## [5.1.4](https://git.ilcd.rocks/team-floyd/themes/gatsby-themes/compare/v5.1.3...v5.1.4) (2022-03-23)
|
|
2
20
|
|
|
3
21
|
|
package/jest.config.js
CHANGED
|
@@ -18,6 +18,9 @@ module.exports = {
|
|
|
18
18
|
'^~constants(.*)$': '<rootDir>/src/constants$1',
|
|
19
19
|
// JSON Data
|
|
20
20
|
'data.json': '<rootDir>/__mocks__/search-data.json',
|
|
21
|
+
'^gatsby-plugin-utils/(.*)$': [`gatsby-plugin-utils/dist/$1`, `gatsby-plugin-utils/$1`],
|
|
22
|
+
'^gatsby-page-utils/(.*)$': `gatsby-page-utils/dist/$1`,
|
|
23
|
+
'^gatsby-core-utils/(.*)$': `gatsby-core-utils/dist/$1`,
|
|
21
24
|
},
|
|
22
25
|
// testPathIgnorePatterns: [`node_modules`, `\\.cache`, `<rootDir>.*/public`],
|
|
23
26
|
coveragePathIgnorePatterns: [
|
|
@@ -32,7 +35,8 @@ module.exports = {
|
|
|
32
35
|
__PATH_PREFIX__: ``,
|
|
33
36
|
},
|
|
34
37
|
testURL: `http://localhost`,
|
|
35
|
-
|
|
38
|
+
testEnvironment: '<rootDir>/tests/custom-jest-environment.js',
|
|
39
|
+
setupFiles: [`<rootDir>/tests/loadershim.js`, '<rootDir>/tests/envVars.js'],
|
|
36
40
|
collectCoverage: true,
|
|
37
41
|
coverageThreshold: {
|
|
38
42
|
global: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gatsby-core-theme",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "6.0.0",
|
|
4
4
|
"description": "Gatsby Theme NPM Package",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"GATSBY_RECAPTCHA_SITEKEY": "6LfoyvMUAAAAAO4nl_MQnqHb4XdHxEiu5cXgIqeB",
|
|
@@ -16,9 +16,6 @@
|
|
|
16
16
|
"storybook": "cross-env STORYBOOK_IMAGE_CDN_URL=https://cdn.irishluck.ie STORYBOOK_GATSBY_SITE_NAME=norskespilleautomater.com STORYBOOK_TRACKER_LINK_FORMAT_NON_MAIN=[no],[visit],short_name STORYBOOK_TRACKER_LINK_FORMAT_MAIN=[no],[visit],short_name start-storybook -s ../storybook-images -p 6006",
|
|
17
17
|
"build-storybook": "cross-env STORYBOOK_IMAGE_CDN_URL=https://cdn.irishluck.ie STORYBOOK_GATSBY_SITE_NAME=norskespilleautomater.com STORYBOOK_TRACKER_LINK_FORMAT_NON_MAIN=[no],[visit],short_name STORYBOOK_TRACKER_LINK_FORMAT_MAIN=[no],[visit],short_name build-storybook"
|
|
18
18
|
},
|
|
19
|
-
"peerDependencies": {
|
|
20
|
-
"gatsby": "^3.3.1"
|
|
21
|
-
},
|
|
22
19
|
"dependencies": {
|
|
23
20
|
"@loadable/babel-plugin": "^5.13.2",
|
|
24
21
|
"@loadable/component": "^5.15.0",
|
|
@@ -31,37 +28,36 @@
|
|
|
31
28
|
"dotenv": "^8.2.0",
|
|
32
29
|
"eslint": "^7.20.0",
|
|
33
30
|
"esm": "^3.2.25",
|
|
34
|
-
"gatsby": "^
|
|
35
|
-
"gatsby-image": "^3.
|
|
36
|
-
"gatsby-plugin-image": "^
|
|
37
|
-
"gatsby-plugin-loadable-components-ssr": "^
|
|
38
|
-
"gatsby-plugin-manifest": "^
|
|
39
|
-
"gatsby-plugin-postcss": "^
|
|
40
|
-
"gatsby-plugin-preact": "^
|
|
41
|
-
"gatsby-plugin-react-helmet": "^
|
|
42
|
-
"gatsby-plugin-sass": "^
|
|
43
|
-
"gatsby-plugin-sharp": "^
|
|
44
|
-
"gatsby-plugin-sitemap": "^
|
|
45
|
-
"gatsby-plugin-webfonts": "^2.1
|
|
46
|
-
"gatsby-source-filesystem": "^
|
|
47
|
-
"gatsby-transformer-sharp": "^
|
|
31
|
+
"gatsby": "^4.10.3",
|
|
32
|
+
"gatsby-image": "^3.11.0",
|
|
33
|
+
"gatsby-plugin-image": "^2.10.1",
|
|
34
|
+
"gatsby-plugin-loadable-components-ssr": "^4.2.0",
|
|
35
|
+
"gatsby-plugin-manifest": "^4.10.2",
|
|
36
|
+
"gatsby-plugin-postcss": "^5.11.0",
|
|
37
|
+
"gatsby-plugin-preact": "^6.10.1",
|
|
38
|
+
"gatsby-plugin-react-helmet": "^5.10.0",
|
|
39
|
+
"gatsby-plugin-sass": "^5.11.0",
|
|
40
|
+
"gatsby-plugin-sharp": "^4.10.2",
|
|
41
|
+
"gatsby-plugin-sitemap": "^5.10.2",
|
|
42
|
+
"gatsby-plugin-webfonts": "^2.2.1",
|
|
43
|
+
"gatsby-source-filesystem": "^4.10.1",
|
|
44
|
+
"gatsby-transformer-sharp": "^4.10.0",
|
|
48
45
|
"html-react-parser": "^1.3.0",
|
|
49
46
|
"js-search": "^2.0.0",
|
|
50
47
|
"lodash": "^4.17.15",
|
|
51
|
-
"node-sass": "5.0.0",
|
|
52
48
|
"normalize.css": "^8.0.1",
|
|
53
49
|
"postcss": "^8.2.10",
|
|
54
|
-
"preact": "^10.
|
|
55
|
-
"preact-render-to-string": "^5.1.
|
|
50
|
+
"preact": "^10.7.0",
|
|
51
|
+
"preact-render-to-string": "^5.1.20",
|
|
56
52
|
"prop-types": "15.7.2",
|
|
57
|
-
"react": "^
|
|
58
|
-
"react-
|
|
59
|
-
"react-dom": "^17.0.2",
|
|
53
|
+
"react": "^18.0.0",
|
|
54
|
+
"react-dom": "^18.0.0",
|
|
60
55
|
"react-google-recaptcha": "^2.1.0",
|
|
61
56
|
"react-helmet": "^6.0.0",
|
|
62
|
-
"react-icons": "^4.
|
|
63
|
-
"react-lazyload": "^2.
|
|
64
|
-
"react-masonry-css": "^1.0.16"
|
|
57
|
+
"react-icons": "^4.3.1",
|
|
58
|
+
"react-lazyload": "^3.2.0",
|
|
59
|
+
"react-masonry-css": "^1.0.16",
|
|
60
|
+
"sass": "^1.49.9"
|
|
65
61
|
},
|
|
66
62
|
"devDependencies": {
|
|
67
63
|
"@babel/core": "^7.13.1",
|
|
@@ -77,8 +73,8 @@
|
|
|
77
73
|
"@storybook/addon-essentials": "^6.0.21",
|
|
78
74
|
"@storybook/addon-links": "^6.0.21",
|
|
79
75
|
"@storybook/react": "^6.0.21",
|
|
80
|
-
"@testing-library/jest-dom": "^5.
|
|
81
|
-
"@testing-library/react": "^
|
|
76
|
+
"@testing-library/jest-dom": "^5.16.3",
|
|
77
|
+
"@testing-library/react": "^12.1.4",
|
|
82
78
|
"babel-jest": "^26.6.3",
|
|
83
79
|
"babel-loader": "^8.2.2",
|
|
84
80
|
"babel-plugin-remove-graphql-queries": "^3.0.0",
|
|
@@ -88,7 +84,8 @@
|
|
|
88
84
|
"gatsby-plugin-webpack-bundle-analyser-v2": "^1.1.26",
|
|
89
85
|
"identity-obj-proxy": "^3.0.0",
|
|
90
86
|
"jest": "^26.6.3",
|
|
91
|
-
"
|
|
87
|
+
"jest-environment-jsdom": "^27.5.1",
|
|
88
|
+
"react-test-renderer": "^18.0.0",
|
|
92
89
|
"sass-resources-loader": "^2.1.0"
|
|
93
90
|
},
|
|
94
91
|
"author": "",
|
package/package.old.json
ADDED
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "gatsby-core-theme",
|
|
3
|
+
"version": "5.1.4",
|
|
4
|
+
"description": "Gatsby Theme NPM Package",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"GATSBY_RECAPTCHA_SITEKEY": "6LfoyvMUAAAAAO4nl_MQnqHb4XdHxEiu5cXgIqeB",
|
|
7
|
+
"directories": {
|
|
8
|
+
"test": "tests"
|
|
9
|
+
},
|
|
10
|
+
"repository": {
|
|
11
|
+
"type": "git",
|
|
12
|
+
"url": "https://git.ilcd.rocks/team-floyd/themes/gatsby-themes"
|
|
13
|
+
},
|
|
14
|
+
"scripts": {
|
|
15
|
+
"test": "jest --coverage",
|
|
16
|
+
"storybook": "cross-env STORYBOOK_IMAGE_CDN_URL=https://cdn.irishluck.ie STORYBOOK_GATSBY_SITE_NAME=norskespilleautomater.com STORYBOOK_TRACKER_LINK_FORMAT_NON_MAIN=[no],[visit],short_name STORYBOOK_TRACKER_LINK_FORMAT_MAIN=[no],[visit],short_name start-storybook -s ../storybook-images -p 6006",
|
|
17
|
+
"build-storybook": "cross-env STORYBOOK_IMAGE_CDN_URL=https://cdn.irishluck.ie STORYBOOK_GATSBY_SITE_NAME=norskespilleautomater.com STORYBOOK_TRACKER_LINK_FORMAT_NON_MAIN=[no],[visit],short_name STORYBOOK_TRACKER_LINK_FORMAT_MAIN=[no],[visit],short_name build-storybook"
|
|
18
|
+
},
|
|
19
|
+
"peerDependencies": {
|
|
20
|
+
"gatsby": "^3.3.1"
|
|
21
|
+
},
|
|
22
|
+
"dependencies": {
|
|
23
|
+
"@loadable/babel-plugin": "^5.13.2",
|
|
24
|
+
"@loadable/component": "^5.15.0",
|
|
25
|
+
"@loadable/server": "^5.14.2",
|
|
26
|
+
"@loadable/webpack-plugin": "^5.14.2",
|
|
27
|
+
"@reach/router": "^1.3.3",
|
|
28
|
+
"axios": "^0.21.1",
|
|
29
|
+
"chalk": "^4.1.0",
|
|
30
|
+
"cross-env": "^7.0.3",
|
|
31
|
+
"dotenv": "^8.2.0",
|
|
32
|
+
"eslint": "^7.20.0",
|
|
33
|
+
"esm": "^3.2.25",
|
|
34
|
+
"gatsby": "^3.3.1",
|
|
35
|
+
"gatsby-image": "^3.3.0",
|
|
36
|
+
"gatsby-plugin-image": "^1.3.1",
|
|
37
|
+
"gatsby-plugin-loadable-components-ssr": "^3.3.0",
|
|
38
|
+
"gatsby-plugin-manifest": "^3.3.0",
|
|
39
|
+
"gatsby-plugin-postcss": "^4.3.0",
|
|
40
|
+
"gatsby-plugin-preact": "^5.13.0",
|
|
41
|
+
"gatsby-plugin-react-helmet": "^4.3.0",
|
|
42
|
+
"gatsby-plugin-sass": "^4.3.0",
|
|
43
|
+
"gatsby-plugin-sharp": "^3.3.0",
|
|
44
|
+
"gatsby-plugin-sitemap": "^3.3.0",
|
|
45
|
+
"gatsby-plugin-webfonts": "^2.1.0",
|
|
46
|
+
"gatsby-source-filesystem": "^3.3.0",
|
|
47
|
+
"gatsby-transformer-sharp": "^3.3.0",
|
|
48
|
+
"html-react-parser": "^1.3.0",
|
|
49
|
+
"js-search": "^2.0.0",
|
|
50
|
+
"lodash": "^4.17.15",
|
|
51
|
+
"node-sass": "5.0.0",
|
|
52
|
+
"normalize.css": "^8.0.1",
|
|
53
|
+
"postcss": "^8.2.10",
|
|
54
|
+
"preact": "^10.5.14",
|
|
55
|
+
"preact-render-to-string": "^5.1.19",
|
|
56
|
+
"prop-types": "15.7.2",
|
|
57
|
+
"react": "^17.0.2",
|
|
58
|
+
"react-cookies": "^0.1.1",
|
|
59
|
+
"react-dom": "^17.0.2",
|
|
60
|
+
"react-google-recaptcha": "^2.1.0",
|
|
61
|
+
"react-helmet": "^6.0.0",
|
|
62
|
+
"react-icons": "^4.2.0",
|
|
63
|
+
"react-lazyload": "^2.6.5",
|
|
64
|
+
"react-masonry-css": "^1.0.16"
|
|
65
|
+
},
|
|
66
|
+
"devDependencies": {
|
|
67
|
+
"@babel/core": "^7.13.1",
|
|
68
|
+
"@babel/preset-env": "^7.13.5",
|
|
69
|
+
"@semantic-release/changelog": "^5.0.1",
|
|
70
|
+
"@semantic-release/commit-analyzer": "^8.0.1",
|
|
71
|
+
"@semantic-release/git": "^9.0.0",
|
|
72
|
+
"@semantic-release/gitlab": "^6.2.1",
|
|
73
|
+
"@semantic-release/gitlab-config": "^8.0.0",
|
|
74
|
+
"@semantic-release/npm": "^7.1.3",
|
|
75
|
+
"@semantic-release/release-notes-generator": "^9.0.3",
|
|
76
|
+
"@storybook/addon-actions": "^6.0.21",
|
|
77
|
+
"@storybook/addon-essentials": "^6.0.21",
|
|
78
|
+
"@storybook/addon-links": "^6.0.21",
|
|
79
|
+
"@storybook/react": "^6.0.21",
|
|
80
|
+
"@testing-library/jest-dom": "^5.11.9",
|
|
81
|
+
"@testing-library/react": "^11.2.5",
|
|
82
|
+
"babel-jest": "^26.6.3",
|
|
83
|
+
"babel-loader": "^8.2.2",
|
|
84
|
+
"babel-plugin-remove-graphql-queries": "^3.0.0",
|
|
85
|
+
"babel-preset-gatsby": "^1.3.0",
|
|
86
|
+
"eslint-import-resolver-alias": "^1.1.2",
|
|
87
|
+
"eslint-plugin-react": "^7.22.0",
|
|
88
|
+
"gatsby-plugin-webpack-bundle-analyser-v2": "^1.1.26",
|
|
89
|
+
"identity-obj-proxy": "^3.0.0",
|
|
90
|
+
"jest": "^26.6.3",
|
|
91
|
+
"react-test-renderer": "^17.0.1",
|
|
92
|
+
"sass-resources-loader": "^2.1.0"
|
|
93
|
+
},
|
|
94
|
+
"author": "",
|
|
95
|
+
"license": "ISC",
|
|
96
|
+
"browserslist": "> 0.25%, not dead"
|
|
97
|
+
}
|
|
98
|
+
|
|
@@ -11,7 +11,7 @@ describe('Count Number Component', () => {
|
|
|
11
11
|
expect(getByText('0')).toBeTruthy();
|
|
12
12
|
|
|
13
13
|
await waitFor(() => {
|
|
14
|
-
expect(getByText('
|
|
14
|
+
expect(getByText('1')).toBeTruthy();
|
|
15
15
|
}, 4000);
|
|
16
16
|
});
|
|
17
17
|
test('render count down', async () => {
|
|
@@ -20,7 +20,7 @@ describe('Count Number Component', () => {
|
|
|
20
20
|
expect(getByText('10')).toBeTruthy();
|
|
21
21
|
|
|
22
22
|
await waitFor(() => {
|
|
23
|
-
expect(getByText('
|
|
23
|
+
expect(getByText('9')).toBeTruthy();
|
|
24
24
|
}, 4000);
|
|
25
25
|
});
|
|
26
26
|
});
|
|
@@ -39,8 +39,7 @@ CardsGridStyles.propTypes = {
|
|
|
39
39
|
tablet_num_of_columns: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
40
40
|
desktop_num_of_columns: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
41
41
|
}).isRequired,
|
|
42
|
-
children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node, PropTypes.any])
|
|
43
|
-
.isRequired,
|
|
42
|
+
children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node, PropTypes.any]),
|
|
44
43
|
mobileColumns: PropTypes.number,
|
|
45
44
|
tabletColumns: PropTypes.number,
|
|
46
45
|
desktopColumns: PropTypes.number,
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
border-right: $size solid transparent;
|
|
12
12
|
border-bottom: $size solid $color;
|
|
13
13
|
} @else {
|
|
14
|
-
$size:
|
|
14
|
+
$size: calc($size/3);
|
|
15
15
|
border: solid $color;
|
|
16
16
|
border-width: 0 $size $size 0;
|
|
17
17
|
padding: $size;
|
|
@@ -102,7 +102,7 @@
|
|
|
102
102
|
&:before {
|
|
103
103
|
transform: rotate(45deg);
|
|
104
104
|
transform-origin: 0 0;
|
|
105
|
-
margin:
|
|
105
|
+
margin: - calc($thickness / 4) 0 0 calc($thickness / 2);
|
|
106
106
|
}
|
|
107
107
|
|
|
108
108
|
&:after {
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/* eslint-disable class-methods-use-this */
|
|
2
|
+
/* eslint-disable no-empty-function */
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Correct Jest bug that prevents the Firestore tests from running. More info here:
|
|
6
|
+
* https://github.com/firebase/firebase-js-sdk/issues/3096#issuecomment-637584185
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
// eslint-disable-next-line import/no-extraneous-dependencies
|
|
10
|
+
const BrowserEnvironment = require('jest-environment-jsdom');
|
|
11
|
+
|
|
12
|
+
class MyEnvironment extends BrowserEnvironment {
|
|
13
|
+
constructor(config) {
|
|
14
|
+
super({ ...config, globals: { ...config.globals, Uint32Array, Uint8Array, ArrayBuffer } });
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
async setup() {}
|
|
18
|
+
|
|
19
|
+
async teardown() {}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
module.exports = MyEnvironment;
|