Skip to content
Merged
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
15 changes: 9 additions & 6 deletions docs/devGuide/development/migratingNodeJs.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,19 +39,22 @@ Switch to use the Node.js version that you are migrating to.
- Go to the [Node.js changelog](https://nodejs.org/en/blog/release) of the new version
- Go through the list of deprecated syntax and check if it is being used in MarkBind
- Replace any deprecated syntax
2. Check that all user-facing functionalities are working
1. Update Node type dependency
- TypeScript does not automatically know which version of Node.js you are using. You must update the `@types/node` package to match your target Node.js runtime so that the compiler can recognize new global variables, modules, and method signatures.
- Run `npm install -D @types/node@<new-version>` to install the new type definitions.
1. Check that all user-facing functionalities are working
- A quick way to do this is to go to the <a tags="environment--combined" href="/userGuide/readerFacingFeatures.html">Reader Facing Features in the User Guide</a><a tags="environment--dg" href="https://markbind.org/userGuide/readerFacingFeatures.html">Reader Facing Features in the User Guide</a>.
3. Check that there are no issues with development setup
1. Check that there are no issues with development setup
- Set up the development environment by running through the steps in [Setting Up]({{baseUrl}}/devGuide/development/settingUp.html) to ensure there are no problems
4. Update GitHubActions
1. Update GitHubActions
- Go to [MarkBind/markbind-action](https://github.com/MarkBind/markbind-action) and update the Node.js version numbers
- See [Update node version from 14 to 16 PR](https://github.com/MarkBind/markbind-action/pull/8/files) for an example
- Test there are no issues with workflows
- Testing instructions located here: [markbind-action]({{baseUrl}}/devGuide/githubActions/markbindAction.html) and [markbind-reusable-workflows]({{baseUrl}}/devGuide/githubActions/markbindReusableWorkflows.html)
<box type="info" seamless header="If a different npm version is needed">

Install correct version of npm in `action.yml` and `fork-build.yml`. Refer to [Update node version from 14 to 16 PR](https://github.com/MarkBind/markbind-action/pull/8/files) to see where npm install should be run. </box>
5. Check deployment to Netlify/other platforms
1. Check deployment to Netlify/other platforms
- Deployment to Netlify
- Follow steps in <a tags="environment--combined" href="/userGuide/deployingTheSite.html#deploying-to-netlify">Deploying to Netlify</a><a tags="environment--dg" href="https://markbind.org/userGuide/deployingTheSite.html#deploying-to-netlify">Deploying to Netlify</a> but change the `NODE_VERSION` value accordingly. Check there are no issues with deployment and deployed site is as expected.
- MarkBind has two repos [init-minimal-netlify](https://github.com/MarkBind/init-minimal-netlify) and [init-typical-netlify](https://github.com/MarkBind/init-typical-netlify) which allows deployment to Netlify by using a config file. Update the config file `netlify.toml` with the correct Node.js version and check that deployment using button in `README` works as expected.
Expand All @@ -66,11 +69,11 @@ Switch to use the Node.js version that you are migrating to.
- Follow steps in <a tags="environment--combined" href="/userGuide/deployingTheSite.html#using-ci-platforms">Using CI Platforms</a><a tags="environment--dg" href="https://markbind.org/userGuide/deployingTheSite.html#using-ci-platforms">Using CI Platforms</a> but update the config files for the various CI Platforms to use the correct Node.js version. Try deploying and ensure there are no problems with deployment.
<box type="info" seamless header="If a different npm version is needed">
Install the correct npm version before running npm commands. </box>
6. Update documentation
1. Update documentation
- Update Node.js and npm version in documentation. See [Update to use Node 16](https://github.com/MarkBind/markbind/pull/2233/files#diff-0f8e38868f41667abec6adacbb5131fbd6999c4913fc43e3429390b744f7a1f3) as an example. <box type="tip" seamless>
Don't forget to update the version numbers in the example config files in <a tags="environment--combined" href="/userGuide/deployingTheSite.html">Deploying the Site</a><a tags="environment--dg" href="https://markbind.org/userGuide/deployingTheSite.html">Deploying the Site</a>!
</box>
7. Update `neftlify.toml`
1. Update `neftlify.toml`
- The `neftlify.toml` file in the `markbind` repo's root directory is used to deploy our documentation site to Netlify. Update the `NODE_VERSION` value to the new Node.js version.

{% from "njk/common.njk" import previous_next %}
Expand Down
40 changes: 29 additions & 11 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"devDependencies": {
"@babel/preset-typescript": "^7.28.5",
"@stylistic/stylelint-plugin": "^2.1.0",
"@types/node": "^18.15.0",
"@types/node": "^22.19.11",
"@typescript-eslint/eslint-plugin": "^5.62.0",
"@typescript-eslint/parser": "^5.62.0",
"danger": "^13.0.4",
Expand Down
1 change: 0 additions & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@
"@types/katex": "^0.16.0",
"@types/lodash": "^4.14.181",
"@types/markdown-it": "^12.2.3",
"@types/node": "^18.15.0",
"@types/nunjucks": "^3.2.1",
"@types/path-is-inside": "^1.0.0",
"@types/primer__octicons": "^17.11.0",
Expand Down