Skip to content
This repository was archived by the owner on Jan 2, 2024. It is now read-only.

Commit 3b907f4

Browse files
committed
Chore: Update application dependencies
1 parent ce5b501 commit 3b907f4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+42776
-33585
lines changed

.eslintrc.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
'use strict'
22

33
module.exports = {
4+
ignorePatterns: ['componentry.config.js', 'src/utils/setup-tracer.ts'],
45
extends: 'eloquence/react',
56
rules: {
67
// Enforce that testing library is used through utils/testing-library only
@@ -15,5 +16,14 @@ module.exports = {
1516
project: ['tsconfig.json', 'cypress/tsconfig.json'],
1617
},
1718
},
19+
{
20+
files: ['src/theme/**/*.js'],
21+
parserOptions: {
22+
sourceType: 'script',
23+
},
24+
env: {
25+
node: true,
26+
},
27+
},
1828
],
1929
}

.storybook/main.js

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ const path = require('path')
88
const MiniCssExtractPlugin = require('mini-css-extract-plugin')
99
const SVGSymbolSprite = require('svg-symbol-sprite-loader')
1010

11-
const { themeAccessor } = require('../webpack/theme-accessor')
12-
1311
const context = fs.realpathSync(process.cwd())
1412

1513
module.exports = {
@@ -41,29 +39,12 @@ module.exports = {
4139
MiniCssExtractPlugin.loader,
4240
{
4341
loader: 'css-loader',
44-
options: {
45-
sourceMap: isProduction,
46-
modules: {
47-
mode: 'global',
48-
localIdentName: '[name]-[local]--[hash:5]',
49-
},
50-
},
42+
options: { sourceMap: isProduction },
5143
},
5244
{
5345
loader: 'postcss-loader',
5446
options: { sourceMap: isProduction },
5547
},
56-
{
57-
loader: 'sass-loader',
58-
options: {
59-
sourceMap: isProduction,
60-
sassOptions: {
61-
functions: {
62-
'theme($theme-path: null)': themeAccessor,
63-
},
64-
},
65-
},
66-
},
6748
],
6849
},
6950
// --- 📦 SVG icon sprite loader

.storybook/preview.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
import { Theme } from 'componentry'
1+
import { ComponentryProvider } from 'componentry'
22
import svgSymbolSpriteLoader from 'svg-symbol-sprite-loader'
33

4-
import { componentryTheme } from '@/theme/componentry'
4+
import { theme } from '@/theme/theme'
55

66
// Include app base styles
7-
import '../src/index.scss'
7+
import '../src/index.css'
88

99
// Import app icon sprite
1010
import '../src/utils/require-icons'
@@ -20,9 +20,9 @@ svgSymbolSpriteLoader({
2020
export const decorators = [
2121
// Global decorator sets Componentry prop defaults
2222
(Story) => (
23-
<Theme theme={componentryTheme}>
23+
<ComponentryProvider theme={theme}>
2424
<Story />
25-
</Theme>
25+
</ComponentryProvider>
2626
),
2727
]
2828

babel.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ module.exports = function babelConfigs(api) {
116116
development: {
117117
plugins: [
118118
// Babel transform for "Fast Refresh"
119-
// 'react-refresh/babel',
119+
'react-refresh/babel',
120120
],
121121
},
122122
production: {

componentry.config.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
'use strict'
2+
3+
const { components } = require('./src/theme/components')
4+
const { theme } = require('./src/theme/theme')
5+
6+
// --- Componentry.design application theme
7+
// --------------------------------------------------------
8+
9+
module.exports = {
10+
theme,
11+
components,
12+
}

jest.config.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,5 +41,7 @@ module.exports = {
4141
'\\.svg$': '<rootDir>/__mocks__/svgr-loader-mock.js',
4242
'\\.css$': '<rootDir>/__mocks__/css-loader-mock.js',
4343
'\\.scss$': '<rootDir>/__mocks__/scss-loader-mock.js',
44+
// Workaround for: https://jestjs.io/docs/upgrading-to-jest28#packagejson-exports
45+
'componentry': '<rootDir>/node_modules/componentry/dist/commonjs/index.js',
4446
},
4547
}

0 commit comments

Comments
 (0)