Skip to content

Commit

Permalink
chore: updated dev dependencies and raised node version
Browse files Browse the repository at this point in the history
  • Loading branch information
web-mi committed Jan 25, 2024
1 parent 2302b1f commit 315557f
Show file tree
Hide file tree
Showing 113 changed files with 22,789 additions and 13,882 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ jobs:
else
echo ENV_NAME="prod" >> $GITHUB_ENV
fi
- uses: actions/checkout@v2.3.4
- uses: actions/setup-node@v3
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 14
node-version: 18
registry-url: 'https://npm.pkg.github.com'
cache: 'npm'
- name: Load .env file
Expand All @@ -38,7 +38,7 @@ jobs:
mode: ${{ env.ENV_NAME }}
- run: npm ci
- name: Run linters
uses: wearerequired/lint-action@v1
uses: wearerequired/lint-action@v2
with:
github_token: ${{ secrets.github_token }}
eslint: true
Expand All @@ -48,14 +48,14 @@ jobs:
stylelint_dir: ./src
stylelint_extensions: scss
prettier: true
- name: Run build
run: |
npm run build
- name: Run tests
run: |
echo "127.0.0.1 localhost" | sudo tee -a /etc/hosts
echo "fs.inotify.max_user_watches=524288" | sudo tee -a /etc/sysctl.conf
npm run test
- name: Run build
run: |
npm run build
npm run test:build
- name: Bump version
if: startsWith(env.BRANCH,'release') == true
run: |
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/dockerImage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,32 +32,32 @@ jobs:
else
echo ENV_NAME="prod" >> $GITHUB_ENV
fi
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: 14
node-version: 18
cache: 'npm'
- name: Load .env file
uses: xom9ikk/dotenv@v2
with:
mode: ${{ env.ENV_NAME }}
- run: npm ci
- name: Run linters
uses: wearerequired/lint-action@v1
uses: wearerequired/lint-action@v2
with:
github_token: ${{ secrets.github_token }}
eslint: true
eslint_dir: ./src
eslint_extensions: js,ts,tsx
prettier: true
prettier_dir: ./src
- name: Run build
run: |
npm run build
- name: Run tests
run: |
echo "127.0.0.1 localhost" | sudo tee -a /etc/hosts
echo "fs.inotify.max_user_watches=524288" | sudo tee -a /etc/sysctl.conf
npm run test
- name: Run build
run: |
npm run build
npm run test:build
- uses: actions/upload-artifact@v2
with:
name: buildfiles
Expand Down
32 changes: 9 additions & 23 deletions .stylelintrc.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,10 @@
const defaultConfig = require('@biotope/quality-gate/config/.stylelintrc');

module.exports = {
...defaultConfig,
extends: [
// TODO: From the admin app. Probably a good idea to enable.
// 'stylelint-config-idiomatic-order',

// The config from quality-gate isn't compatible with stylelint@^14,
// therefore merge it with working alternatives.
'stylelint-config-standard-scss',
'stylelint-config-prettier'
],
plugins: ['stylelint-scss', 'stylelint-no-unsupported-browser-features'],
extends: ['stylelint-config-standard', 'stylelint-config-standard-scss'],
rules: {
...defaultConfig.rules,
'selector-max-id': 0,
'scss/dollar-variable-colon-space-after': 'always-single-line',
'scss/dollar-variable-colon-space-before': 'never',
'plugin/no-unsupported-browser-features': [
true,
{
Expand All @@ -35,18 +27,13 @@ module.exports = {
'outline',
'css3-cursors',
'css-resize',
'intrinsic-width'
'intrinsic-width',
'css-nesting',
'css-when-else',
'css-selection'
]
}
],

// From admin app
'max-empty-lines': [
2,
{
ignore: ['comments']
}
],
'rule-empty-line-before': [
'always-multi-line',
{
Expand All @@ -56,7 +43,6 @@ module.exports = {

// Defaults are not good
'alpha-value-notation': 'number',
'number-leading-zero': 'always',
'color-function-notation': 'legacy',
'value-keyword-case': null, // Requires e.g. "robotoslab" instead of "RobotoSlab"
'scss/operator-no-unspaced': null, // Has false positives
Expand Down
8 changes: 5 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ARG NODE_VERSION=14.21.1
ARG NODE_VERSION=18.16.1
ARG PORT=80

FROM node:$NODE_VERSION as proxyBuild
FROM node:$NODE_VERSION AS proxyBuild

USER node
WORKDIR /app
Expand Down Expand Up @@ -32,6 +32,8 @@ ENV PORT=$PORT
# Prod build
FROM node:$NODE_VERSION

ARG PORT=80

USER node
WORKDIR /app
EXPOSE $PORT
Expand All @@ -41,6 +43,6 @@ COPY build /app/build
ENV NODE_ENV=production
ENV PORT=$PORT

RUN npm install --ignore-scripts
RUN npm ci --ignore-scripts

CMD ["npm", "run", "start"]
5 changes: 4 additions & 1 deletion config/env.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,10 @@ function getClientEnvironment(publicUrl) {
// and `sockPort` options in webpack-dev-server.
WDS_SOCKET_HOST: process.env.WDS_SOCKET_HOST,
WDS_SOCKET_PATH: process.env.WDS_SOCKET_PATH,
WDS_SOCKET_PORT: process.env.WDS_SOCKET_PORT
WDS_SOCKET_PORT: process.env.WDS_SOCKET_PORT,
// Whether or not react-refresh is enabled.
// It is defined here so it is available in the webpackHotDevClient.
FAST_REFRESH: process.env.FAST_REFRESH !== 'false'
}
);
// Stringify all values so we can feed into webpack DefinePlugin
Expand Down
29 changes: 0 additions & 29 deletions config/jest/babelTransform.js

This file was deleted.

14 changes: 0 additions & 14 deletions config/jest/cssTransform.js

This file was deleted.

40 changes: 0 additions & 40 deletions config/jest/fileTransform.js

This file was deleted.

8 changes: 5 additions & 3 deletions config/modules.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,11 @@ function getModules() {
// TypeScript project and set up the config
// based on tsconfig.json
if (hasTsConfig) {
const ts = require(resolve.sync('typescript', {
basedir: paths.appNodeModules
}));
const ts = require(
resolve.sync('typescript', {
basedir: paths.appNodeModules
})
);
config = ts.readConfigFile(paths.appTsConfig, ts.sys.readFile).config;
// Otherwise we'll check if there is jsconfig.json
// for non TS projects.
Expand Down
2 changes: 1 addition & 1 deletion config/paths.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ module.exports = {
appJsConfig: resolveApp('jsconfig.json'),
yarnLockFile: resolveApp('yarn.lock'),
testsSetup: resolveModule(resolveApp, 'src/setupTests'),
proxySetup: resolveApp('src/setupProxy.js'),
proxySetup: resolveApp('proxy/routes/index.js'),
appNodeModules: resolveApp('node_modules'),
appWebpackCache: resolveApp('node_modules/.cache'),
appTsBuildInfoFile: resolveApp('node_modules/.cache/tsconfig.tsbuildinfo'),
Expand Down
2 changes: 1 addition & 1 deletion config/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ module.exports = function (webpackEnv) {
.relative(paths.appSrc, info.absoluteResourcePath)
.replace(/\\/g, '/')
: isEnvDevelopment &&
((info) =>
((info) =>
path
.resolve(info.absoluteResourcePath)
.replace(/\\/g, '/'))
Expand Down
Loading

0 comments on commit 315557f

Please sign in to comment.