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

Bump/nodejs v18 #1595

Merged
merged 34 commits into from
Dec 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
1262652
Pin Node version
RodriSanchez1 Oct 18, 2023
6b8c564
Bump react-scripts to v5.0.1
RodriSanchez1 Oct 18, 2023
6b55f6b
Add craco for modify webpack config
RodriSanchez1 Oct 18, 2023
0cb0992
Avoid no-anonymous-default-export webpack warning
RodriSanchez1 Oct 18, 2023
ed3f7d6
Fix openDb import
RodriSanchez1 Oct 18, 2023
f201a93
WebpackIgnore css url resolution
RodriSanchez1 Oct 18, 2023
3b8e092
Update lockfile
RodriSanchez1 Oct 18, 2023
0e7cd87
Fix Unit Test - Update Snapshots
RodriSanchez1 Oct 19, 2023
f2e77ef
DetectOpenHandles on test for debug
RodriSanchez1 Oct 19, 2023
87ffd8c
Remove detectOpneHandles option
RodriSanchez1 Oct 19, 2023
7a220d2
Remove board from unit test
RodriSanchez1 Oct 19, 2023
3ff834a
Add board again and --detectOpenHandles
RodriSanchez1 Oct 19, 2023
0b2be6d
Avoid Account from tests
RodriSanchez1 Oct 19, 2023
a44b341
Add Account again and --runInBand option
RodriSanchez1 Oct 20, 2023
a840aa6
Revert "Fix Unit Test - Update Snapshots"
RodriSanchez1 Oct 20, 2023
f812338
Define entry point on craco config
RodriSanchez1 Oct 24, 2023
eb3fa12
Add excludeAliases: console
RodriSanchez1 Oct 24, 2023
1cf69f9
fix: relax nvmrc version to minor
shayc Oct 25, 2023
54e9f5a
Optional chaining on ignoreWarning
RodriSanchez1 Oct 30, 2023
4f0a065
Update craco config
RodriSanchez1 Oct 30, 2023
7085feb
Move @babel/plugin.. package to devDependencies
RodriSanchez1 Oct 30, 2023
9bf3c9f
Merge branch 'master' into bump/NodejsV18
RodriSanchez1 Oct 30, 2023
fa8e641
Merge branch 'master' into bump/NodejsV18
martinbedouret Nov 17, 2023
4e03528
Merge branch 'master' into bump/NodejsV18
RodriSanchez1 Nov 22, 2023
cafafa9
Use static v1.30.0 microsoft-cognitive-services
RodriSanchez1 Nov 22, 2023
bdb44f4
Lock file
RodriSanchez1 Nov 22, 2023
61cc5bb
Add babel-plugin-transform-import-meta package
RodriSanchez1 Nov 27, 2023
8d85784
Fix test
RodriSanchez1 Nov 27, 2023
97b4449
Lock file
RodriSanchez1 Nov 27, 2023
2ac0a47
Auto stash before merge of "bump/NodejsV18" and "RodriSanchez1/bump/N…
martinbedouret Dec 4, 2023
6188018
Merge branch 'master' into bump/NodejsV18
martinbedouret Dec 4, 2023
2e0d500
Fix lock file
RodriSanchez1 Dec 8, 2023
58b5ec4
Remove bablerc file and packages
RodriSanchez1 Dec 8, 2023
4a34788
Merge branch 'master' into bump/NodejsV18
RodriSanchez1 Dec 8, 2023
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
10 changes: 5 additions & 5 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
build:
docker:
# specify the version you desire here
- image: cimg/node:16.18
- image: cimg/node:18.18.1
shayc marked this conversation as resolved.
Show resolved Hide resolved
working_directory: ~/repo
steps:
- checkout
Expand All @@ -24,13 +24,13 @@ jobs:
- ~/.cache/yarn
key: yarn-packages-v1-{{ .Branch }}-{{ checksum "yarn.lock" }}
# run tests
- run:
- run:
name: Run Unit Tests
command: yarn test -- --silent --updateSnapshot --no-watchman --maxWorkers=50% --testPathPattern="/Board|Communicator|App|Settings|Account|UI/"
command: yarn test --silent --updateSnapshot --runInBand --no-watchman --testPathPattern="/Board|Communicator|App|Settings|Account|UI/"
image:
docker:
# specify the version you desire here
- image: cimg/node:16.18
- image: cimg/node:18.18.1
working_directory: ~/repo
steps:
- checkout
Expand All @@ -52,7 +52,7 @@ jobs:
version: 19.03.13
docker_layer_caching: false # (3)
# build and push Docker image
- run:
- run:
name: Build Docker Image
command: |
TAG=0.1.$CIRCLE_BUILD_NUM
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v16
v18.18
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Stage 1 - the build process
FROM node:16-alpine as build-deps
FROM node:18.18.1 as build-deps
WORKDIR /usr/src/app
COPY package.json yarn.lock ./
RUN yarn install
Expand Down
35 changes: 35 additions & 0 deletions craco.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
const NodePolyfillPlugin = require('node-polyfill-webpack-plugin');
const path = require('path');

module.exports = {
webpack: {
entry: './src/index.js',
alias: {
'react/jsx-dev-runtime': path.resolve(
__dirname,
'node_modules/react/jsx-dev-runtime.js'
),
'react/jsx-runtime': path.resolve(
__dirname,
'node_modules/react/jsx-runtime.js'
)
},
plugins: [new NodePolyfillPlugin({ excludeAliases: ['console'] })],
resolve: {
extensions: ['.web.js', '.mjs', '.js', '.json', '.web.jsx', '.jsx']
},
configure: {
ignoreWarnings: [
function ignoreSourcemapsloaderWarnings(warning) {
return (
warning.module?.resource.includes('node_modules') &&
warning.details?.includes('source-map-loader')
);
}
]
}
},
babel: {
plugins: ['babel-plugin-transform-import-meta']
}
};
19 changes: 12 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"keycode": "^2.2.1",
"lodash": "^4.17.21",
"mathjs": "7.6.0",
"microsoft-cognitiveservices-speech-sdk": "^1.32.0",
"microsoft-cognitiveservices-speech-sdk": "^1.33.1",
"mime-types": "^2.1.35",
"moment": "2.29.4",
"mongoose": "^6.12.3",
Expand Down Expand Up @@ -90,6 +90,9 @@
"yup": "^0.32.11"
},
"devDependencies": {
"@babel/plugin-proposal-private-property-in-object": "^7.21.11",
"babel-plugin-transform-import-meta": "^2.2.1",
"@craco/craco": "^7.1.0",
"@types/mime-types": "^2.1.1",
"@wojtekmaj/enzyme-adapter-react-17": "^0.6.0",
"decompress-zip": "^0.3.1",
Expand All @@ -99,12 +102,14 @@
"husky": "^1.1.4",
"jest-mock-axios": "^3.2.0",
"lint-staged": "^10.0.3",
"node-polyfill-webpack-plugin": "^2.0.1",
"prettier": "1.15.3",
"react-app-rewired": "^2.1.3",
"react-scripts": "^3.4.4",
"react-scripts": "5.0.1",
RodriSanchez1 marked this conversation as resolved.
Show resolved Hide resolved
"react-test-renderer": "^17.0.2",
"redux-mock-store": "^1.5.4",
"sw-precache": "^5.2.1",
"ts-loader": "^9.5.0",
"typescript": "^4.6.4"
},
"husky": {
Expand All @@ -120,7 +125,7 @@
},
"jest": {
"transformIgnorePatterns": [
"node_modules/(?!idb)"
"node_modules/(?!idb|microsoft-cognitiveservices-speech-sdk)"
],
"moduleNameMapper": {
"\\.(css|less)$": "<rootDir>/src/__mocks__/styleMock.js"
Expand All @@ -143,19 +148,19 @@
},
"scripts": {
"analyze": "source-map-explorer build/static/js/**/*.js",
"start": "react-scripts start",
"build": "react-scripts build && sw-precache --config=sw-precache-config.js",
"start": "craco start",
"build": "craco build && sw-precache --config=sw-precache-config.js",
"build-cordova-debug": "react-app-rewired build",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is react-app-rewired needed? can you use craco instead? (i'm not sure)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes we can remove it. I will do that in other PR

"predeploy": "yarn build",
"deploy": "gh-pages -d build",
"test": "react-scripts test",
"test": "craco test",
"decrypt:local": "./scripts/decrypt-private.sh local",
"encrypt:local": "./scripts/encrypt-private.sh local",
"decrypt:prod": "./scripts/decrypt-private.sh prod",
"encrypt:prod": "./scripts/encrypt-private.sh prod",
"translations:pull": "CBOARD_ENV=local node ./scripts/crowdin-fetch-latest.js",
"translations:push": "CBOARD_ENV=local node ./scripts/crowdin-push-changes.js",
"eject": "react-scripts eject"
"eject": "craco eject"
},
"funding": {
"type": "opencollective",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

exports[`ClearButton tests default renderer 1`] = `
<Unknown>
<ForwardRef(WithStyles(ForwardRef(IconButton)))
<WithStyles(ForwardRef(IconButton))
aria-label="Clear"
className="Output__button__sm"
>
<UNDEFINED
<Memo
className="Output__icon__sm"
/>
</ForwardRef(WithStyles(ForwardRef(IconButton)))>
</WithStyles(ForwardRef(IconButton))>
</Unknown>
`;
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ exports[`CommunicatorDialogButtons tests default renderer 1`] = `
id="communicator-dialog-buttons-search-button"
label="cboard.components.CommunicatorDialog.search"
>
<UNDEFINED />
<Memo />
</IconButton>
</div>
<div
Expand All @@ -22,24 +22,24 @@ exports[`CommunicatorDialogButtons tests default renderer 1`] = `
label="cboard.components.CommunicatorDialog.menu"
onClick={[Function]}
>
<UNDEFINED />
<Memo />
</IconButton>
<ForwardRef(WithStyles(ForwardRef(Menu)))
<WithStyles(ForwardRef(Menu))
anchorEl={null}
id="communicator-dialog-buttons-menu"
onClose={[Function]}
open={false}
>
<ForwardRef(WithStyles(ForwardRef(MenuItem)))>
<ForwardRef(Link)
<WithStyles(ForwardRef(MenuItem))>
<Link
to="/settings/help"
>
<FormattedMessage
values={Object {}}
/>
</ForwardRef(Link)>
</ForwardRef(WithStyles(ForwardRef(MenuItem)))>
<ForwardRef(WithStyles(ForwardRef(MenuItem)))>
</Link>
</WithStyles(ForwardRef(MenuItem))>
<WithStyles(ForwardRef(MenuItem))>
<a
href="https://www.cboard.io/terms-of-use/"
rel="noopener noreferrer"
Expand All @@ -49,8 +49,8 @@ exports[`CommunicatorDialogButtons tests default renderer 1`] = `
values={Object {}}
/>
</a>
</ForwardRef(WithStyles(ForwardRef(MenuItem)))>
</ForwardRef(WithStyles(ForwardRef(Menu)))>
</WithStyles(ForwardRef(MenuItem))>
</WithStyles(ForwardRef(Menu))>
</div>
</div>
`;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,57 +4,57 @@ exports[`Communicator tests default renderer 1`] = `
<div
className="CommunicatorToolbar"
>
<ForwardRef(WithStyles(ForwardRef(Button)))
<WithStyles(ForwardRef(Button))
className="Communicator__title"
disabled={false}
id="boards-button"
onClick={[Function]}
>
<UNDEFINED />
<Memo />
<FormattedMessage
defaultMessage="Boards"
id="cboard.components.CommunicatorToolbar.boards"
values={Object {}}
/>
</ForwardRef(WithStyles(ForwardRef(Button)))>
<ForwardRef(WithStyles(ForwardRef(Menu)))
</WithStyles(ForwardRef(Button))>
<WithStyles(ForwardRef(Menu))
anchorEl={null}
className="CommunicatorToolbar__menu"
id="boards-menu"
onClose={[Function]}
open={false}
>
<ForwardRef(WithStyles(ForwardRef(ListItem)))
<WithStyles(ForwardRef(ListItem))
className="CommunicatorToolbar__menuitem"
onClick={[Function]}
>
<ForwardRef(WithStyles(ForwardRef(ListItemAvatar)))>
<ForwardRef(WithStyles(ForwardRef(Avatar)))>
<UNDEFINED />
</ForwardRef(WithStyles(ForwardRef(Avatar)))>
</ForwardRef(WithStyles(ForwardRef(ListItemAvatar)))>
<ForwardRef(WithStyles(ForwardRef(ListItemText)))
<WithStyles(ForwardRef(ListItemAvatar))>
<WithStyles(ForwardRef(Avatar))>
<Memo />
</WithStyles(ForwardRef(Avatar))>
</WithStyles(ForwardRef(ListItemAvatar))>
<WithStyles(ForwardRef(ListItemText))
inset={true}
primary="board-1-name-key"
secondary="cboard.components.CommunicatorToolbar.tiles"
/>
</ForwardRef(WithStyles(ForwardRef(ListItem)))>
<ForwardRef(WithStyles(ForwardRef(ListItem)))
</WithStyles(ForwardRef(ListItem))>
<WithStyles(ForwardRef(ListItem))
className="CommunicatorToolbar__menuitem"
onClick={[Function]}
>
<ForwardRef(WithStyles(ForwardRef(ListItemAvatar)))>
<ForwardRef(WithStyles(ForwardRef(Avatar)))>
<UNDEFINED />
</ForwardRef(WithStyles(ForwardRef(Avatar)))>
</ForwardRef(WithStyles(ForwardRef(ListItemAvatar)))>
<ForwardRef(WithStyles(ForwardRef(ListItemText)))
<WithStyles(ForwardRef(ListItemAvatar))>
<WithStyles(ForwardRef(Avatar))>
<Memo />
</WithStyles(ForwardRef(Avatar))>
</WithStyles(ForwardRef(ListItemAvatar))>
<WithStyles(ForwardRef(ListItemText))
inset={true}
primary="board-2-name"
secondary="cboard.components.CommunicatorToolbar.tiles"
/>
</ForwardRef(WithStyles(ForwardRef(ListItem)))>
</ForwardRef(WithStyles(ForwardRef(Menu)))>
</WithStyles(ForwardRef(ListItem))>
</WithStyles(ForwardRef(Menu))>
<WithWidth(WithMobileDialog)
onClose={[Function]}
onSubmit={[Function]}
Expand All @@ -67,7 +67,7 @@ exports[`Communicator tests default renderer 1`] = `
/>
}
>
<ForwardRef(WithStyles(ForwardRef(TextField)))
<WithStyles(ForwardRef(TextField))
autoFocus={true}
fullWidth={true}
label={
Expand All @@ -87,16 +87,16 @@ exports[`Communicator tests default renderer 1`] = `
<div
className="CommunicatorToolbar__group CommunicatorToolbar__group--start"
>
<ForwardRef(WithStyles(ForwardRef(Button)))
<WithStyles(ForwardRef(Button))
className="edit__communicator"
disabled={false}
onClick={[Function]}
>
<UNDEFINED
<Memo
className="CommunicatorToolbar__group CommunicatorToolbar__group--start--button"
/>
cboard.components.CommunicatorToolbar.editCommunicator
</ForwardRef(WithStyles(ForwardRef(Button)))>
</WithStyles(ForwardRef(Button))>
</div>
<div
className="CommunicatorToolbar__group CommunicatorToolbar__group--end"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`Notifications tests default renderer 1`] = `
<ForwardRef(WithStyles(ForwardRef(Snackbar)))
<WithStyles(ForwardRef(Snackbar))
ContentProps={
Object {
"aria-describedby": "message-id",
Expand Down
Loading