Skip to content
This repository was archived by the owner on Feb 15, 2022. It is now read-only.

Upgrade dependencies - May 2021 #225

Closed
5 tasks done
ghost opened this issue Mar 25, 2021 · 17 comments
Closed
5 tasks done

Upgrade dependencies - May 2021 #225

ghost opened this issue Mar 25, 2021 · 17 comments

Comments

@ghost
Copy link

ghost commented Mar 25, 2021

  • Review release notes updates since last global upgrade of dependencies
  • Upgrade all dependencies to the latest versions, except for any dependencies that we are being more cautious with.
  • Make any adjustments to code and configurations based on release note suggestions
  • Perform manual regression test using guide
  • Create follow-up tasks to attempt upgrade in July 2021 and finish upgrade in October 2021. - This was done here: Upgrade dependencies dry run - July 2021  #355.

time box: 2 days

@ghost ghost self-assigned this Mar 25, 2021
@ghost ghost changed the title Upgrade dependencies - April 2020 Upgrade dependencies - May 2020 Mar 25, 2021
@ghost ghost changed the title Upgrade dependencies - May 2020 Upgrade dependencies - May 2021 Mar 26, 2021
@ghost
Copy link
Author

ghost commented Apr 3, 2021

Notable upgrades:

  • nextjs minor versions (detailed discussions on ReScript forum about problems with webpack upgrade bundled with nextjs)
  • reason-react -> rescript-react
  • upgrade react to catch up with nextjs demands

@ghost
Copy link
Author

ghost commented Apr 3, 2021

Apply this fix: next transpile hack. next-transpile-modules fixed this issue with release 7.1.0, so this wasn't needed.

@ghost
Copy link
Author

ghost commented Apr 8, 2021

  • Take new ReScript-vscode plugin

@ghost
Copy link
Author

ghost commented Apr 9, 2021

Switch from bsc to new rescript cli wrapper.

Update: Perform this switch as part of the next upgrade. We are targeting 9.0.x in this upgrade, which doesn't provide the new rescript-cli, IIRC.

@ghost
Copy link
Author

ghost commented Apr 10, 2021

  • Remove the explicit postcss dependency, allow nextjs to bring it transitively again.

@agarwal agarwal unassigned ghost Apr 22, 2021
@agarwal agarwal assigned ghost May 11, 2021
@ghost
Copy link
Author

ghost commented May 12, 2021

  • Pin the version of bsconfig schema to the exact compiler version. It currently references the master branch: "$schema": "https://raw.githubusercontent.com/rescript-lang/rescript-compiler/master/docs/docson/build-schema.json",

@ghost
Copy link
Author

ghost commented May 18, 2021

  • Review release notes updates since last global upgrade of dependencies
  • Upgrade all dependencies to the latest versions, except for any dependencies that we are being more cautious with.
  • Make any adjustments to code and configurations based on release note suggestions
  • Perform manual regression test using guide
  • Pin the version of bsconfig schema to the exact compiler version. It currently references the master branch: "$schema": "https://raw.githubusercontent.com/rescript-lang/rescript-compiler/master/docs/docson/build-schema.json",
  • Remove the explicit postcss dependency, allow nextjs to bring it transitively again

All of these tasks will be done as part of #354, with the exception of upgrading mdast-util-to-string. I will deal with mdast-util-to-string in a follow-up PR.

@ghost
Copy link
Author

ghost commented May 18, 2021

Review the following release notes:

  • next-js
  • react, react-dom
  • @rescript/react
  • bs-platform
  • tailwindcss
  • webpack
  • postcss
  • js-yaml
  • graymatter
  • next-transpile-modules
  • autoprefixer
  • rescript-vscode plugin
  • concurrently
  • mdast-util-to-string

@ghost
Copy link
Author

ghost commented May 18, 2021

  • Update postcss cli version in contributing instructions. - No updated needed.

@ghost
Copy link
Author

ghost commented May 18, 2021

rescript-vscode plugin

VS Code appears to upgrade this automatically. Currently, we don't specify the version in our vscode configuration.

@ghost
Copy link
Author

ghost commented May 18, 2021

The error encountered when upgrading mdast-util-to-string is:

Error [ERR_REQUIRE_ESM]: Must use import to load ES Module

I've started refreshing on the different module systems to understand why this is occurring, as well as looking for quick fixes that other people may have already come up with.

@ghost
Copy link
Author

ghost commented May 18, 2021

The offending line of code is:

module.exports = require("mdast-util-to-string");;

It occurs in the generated "[tutorial].js" (located at .next/server/pages/resources/[tutorial].js). I'll look into why nextjs isn't generating .mjs files.... Update: I believe nextjs currently doesn't support output .mjs or any ESM format.

@ghost
Copy link
Author

ghost commented May 18, 2021

My understanding of this error is still weak, but the next place to research might be figuring out how to tweak the webpack build configuration to convert mdast-util-to-string into common js format. I'm surprised that this is the first library encountering this error. Are all other libraries distributed in common js format originally?

@ghost
Copy link
Author

ghost commented May 18, 2021

This open issue may be relevant: vercel/next.js#9607.

@ghost ghost mentioned this issue May 18, 2021
@ghost
Copy link
Author

ghost commented May 18, 2021

I am not making any progress. It might be best to regroup and start from a small nextjs site, trace through everything that is happening during the build, and then add back the offending library. My concern is that even if I have a smaller reproducing example, I may not have a solution to the better understood problem.

@ghost
Copy link
Author

ghost commented May 19, 2021

I am moving discussion of troubleshooting mdast-util-to-string to #298.

@ghost
Copy link
Author

ghost commented May 19, 2021

mdast-util-to-string was upgraded in PR #358.

@ghost ghost closed this as completed May 19, 2021
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants