Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade dependencies #40

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
build:
strategy:
matrix:
node: [12, 14]
node: [12, 14, 16]

runs-on: ubuntu-latest

Expand Down
11 changes: 6 additions & 5 deletions cli/environment/storybook/main.webpackFinal.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ const path = require('path')

const CWD = process.cwd()

const getClientDependency = module => path.resolve(CWD, 'node_modules', module)
const getClientDependency = module =>
path.resolve(CWD, 'node_modules', module, 'index.js')

function addAliases(config) {
config.resolve.alias = {
Expand Down Expand Up @@ -33,19 +34,19 @@ function addSourceLoader(config) {
}

function addCustomBabelConfig(config) {
config.module.rules[2].oneOf[2].options.extends = path.resolve(
config.module.rules[2].oneOf[3].options.extends = path.resolve(
__dirname,
'.babelrc',
)
delete config.module.rules[2].oneOf[2].options.presets
delete config.module.rules[2].oneOf[3].options.presets
}

function allowImportingBookSetupItem(config) {
const pathBookSetupItem = path.resolve(CWD, 'config', 'book.setup-item.js')

config.resolve.plugins[1].allowedFiles.add(pathBookSetupItem)
config.resolve.plugins[0].allowedFiles.add(pathBookSetupItem)

config.module.rules[2].oneOf[2].include.push(pathBookSetupItem)
config.module.rules[2].oneOf[3].include.push(pathBookSetupItem)
}

function removeEslintBeforeBuilding(config) {
Expand Down
9 changes: 5 additions & 4 deletions cli/environment/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const buildGeneralConfig = require('react-scripts/config/webpack.config')
const getCacheIdentifier = require('./webpack/getCacheIdentifier')

const getClientDependency = module =>
path.resolve(process.cwd(), 'node_modules', module)
path.resolve(process.cwd(), 'node_modules', module, 'index.js')

function addCustomEntryPoint(config) {
const pathToOurEntryPoint = path.resolve(
Expand Down Expand Up @@ -36,15 +36,16 @@ function addCustomEntryPoint(config) {
}

function addCustomBabelConfig(config) {
config.module.rules[1].oneOf[2].options.extends = path.resolve(
config.module.rules[1].oneOf[3].options.extends = path.resolve(
__dirname,
'babel.config.js',
)
}

function addCacheBoosterWhenCollectionsChanged(config) {
config.module.rules[1].oneOf[2].options.cacheIdentifier += ':'
config.module.rules[1].oneOf[2].options.cacheIdentifier += getCacheIdentifier()
config.module.rules[1].oneOf[3].options.cacheIdentifier += ':'
config.module.rules[1].oneOf[3].options.cacheIdentifier +=
getCacheIdentifier()
}

function enhanceDependencyResolver(config) {
Expand Down
2 changes: 1 addition & 1 deletion examples/basic/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"styled-components": "^4"
},
"eslintConfig": {
"extends": "./node_modules/dreact/cli/environment/eslint.config.js"
"extends": "../../cli/environment/eslint.config.js"
},
"browserslist": {
"production": [
Expand Down
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
},
"dependencies": {
"@babel/core": "^7",
"@babel/eslint-parser": "^7.18.2",
"@frontrockets/redux-abstract-action": "^0.0.1",
"@sentry/browser": "^5.11.1",
"@storybook/addon-actions": "^6",
Expand All @@ -25,7 +26,6 @@
"@storybook/react": "^6",
"@typescript-eslint/eslint-plugin": "^4.25.0",
"@typescript-eslint/parser": "^4.25.0",
"babel-eslint": "^10.0.3",
"babel-jest": "^26",
"babel-plugin-jsx-remove-data-test-id": "^2.1.3",
"babel-plugin-module-resolver": "^4.0.0",
Expand All @@ -38,7 +38,7 @@
"enzyme-adapter-react-16": "^1.15",
"eslint": "^7",
"eslint-config-airbnb": "^18",
"eslint-config-datarockets": "^0.0.4-6",
"eslint-config-datarockets": "https://gitpkg.now.sh/datarockets/style-guide/packages/eslint-config?master",
"eslint-config-prettier": "^6",
"eslint-import-resolver-babel-module": "^5.1",
"eslint-plugin-import": "^2",
Expand All @@ -54,22 +54,22 @@
"minimatch": "^3.0.4",
"module-alias": "^2.2.2",
"react-redux": "^7.1",
"react-scripts": "^4.0.1",
"react-scripts": "^5.0.1",
"redux": "^4.0",
"redux-saga": "^1.1",
"stylelint": "^13",
"stylelint-config-datarockets": "^0.0.4-6",
"stylelint-config-datarockets": "https://gitpkg.now.sh/datarockets/style-guide/packages/stylelint-config?master",
"stylelint-config-prettier": "^8",
"stylelint-config-standard": "^20",
"stylelint-config-styled-components": "^0.1",
"stylelint-processor-styled-components": "^1"
},
"devDependencies": {
"@babel/preset-env": "^7",
"prettier": "^2"
"prettier": "^2.7"
},
"peerDependencies": {
"react": "^16.8 || ^17"
"react": "^16.8 || ^17 || ^18"
},
"prettier": {
"semi": false,
Expand Down
Loading