Closed mariliasoaresTW closed 3 weeks ago
mkdir ../remix
mv ./* ../remix
mv ./.* ../remix
cd ..
https://github.com/vercel/next.js/tree/canary/packages/create-next-app
yarn create next-app iw-complaint-manager
cd iw-complaint-manager
mv ../remix ./
https://github.com/vercel/next.js/discussions/10935#discussioncomment-7055469
https://storybook.js.org/docs/8.0/get-started/nextjs#manual-migration
yarn add --dev @storybook/nextjs
yarn add --dev storybook@latest
yarn sb init
https://mui.com/material-ui/integrations/nextjs/
yarn add @mui/material-nextjs @emotion/cache
https://sequelize.org/docs/v6/getting-started/
yarn add --dev sequelize pg pg-hstore
https://nextjs.org/docs/app/building-your-application/testing/cypress
yarn add -D cypress
https://nextjs.org/docs/app/building-your-application/testing/jest
yarn add -D jest jest-environment-jsdom @testing-library/react @testing-library/jest-dom
These libraries we are not taking with us for this story: Express.js, Remix, Vitest. For testing we will stick RTL + Jest. Make sure we are creating React+Next.js with Typescript.
Questions: Should we add jest configuration for storybook for testing purposes ? @justin-c-anthony . Answer: Yes Import aliases and how we want to use it ? Answer: add for all components and important files Finding out about .cjs and .mjs ? mjs is not important, try to stick to .cjs What type we should use in package.json? Type: Module Add sample test for RTL+Jest
I don't think we can use module in package.json unless we update to the canary release. Here is the GitHub issue for reference: Next.js uses CommonJS modules, which causes a build error if "type": "module" is used in package.json
Edited circleCI config.yml
to adjust persist_workspace
and tested with current_project_version
branch:
We reverted branches filter back to main so pipeline is only triggered by main
branch commits.
There is an open pull request for storybook that addresses a patch for the vulnerability we're facing. I'm not sure when it will be merged: Release: Patch 8.1.6 #27427
Bootstapped sequelize with sequelize-cli package. We also configured seqeulize and modified the circle ci config.yml. All that is left is to do is to modify config.yml back to main and merge the changes in the feature branch.
main
branch has all the changes we made in current_project_version
branch. CircleCI and Heroku both work as intended.
We added release please configuration to the main branch. All checks successfully passed.
The patch for the storybook vulnerability has been released. We just need to update Storybook to 8.1.6.
Was working on setting up jest and came across a small bug when using .toBe in the test. "property toBe does not exist on type "assertion"". To fix this we needed to import "import {expect, jest, test} from '@jest/globals'" at the top of the file. I will link further documentation but this looks like a necessity when using certain matches with TS. https://jestjs.io/docs/29.4/expect
User Story As a developer I want to migrate from Remix to Next.js as our development framework So it can be easier to configure
Definition of Done
Acceptance Criteria Given I clone the repo locally When I need to run the app Then the app builds on the Next.js framework
current_project_version