-
Notifications
You must be signed in to change notification settings - Fork 53
chore(dev deps) - Upgrade all remaining dependencies #246
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
chore(dev deps) - Upgrade all remaining dependencies #246
Conversation
🦋 Changeset detectedLatest commit: c580241 The changes in this PR will be included in the next version bump. This PR includes changesets to release 6 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
@@ -41,7 +41,7 @@ | |||
"prettier-plugin-packagejson": "^2.5.10", | |||
"typescript": "^5.3.2" | |||
}, | |||
"packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e", | |||
"packageManager": "yarn@4.9.1+sha512.f95ce356460e05be48d66401c1ae64ef84d163dd689964962c6888a9810865e39097a5e9de748876c2e0bf89b232d583c33982773e9903ae7a76257270986538", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SHA generated via corepack up
nodejs/corepack#231 (comment)
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need a basic yarn lock, else the tests will fail when running yarn
scripts - as they will all error with "this package isn't part of the yarn workspace of manypkg
@@ -22,27 +17,17 @@ exports[`Run command should execute "package start" and exit with 1: stderr 1`] | |||
|
|||
exports[`Run command should execute "package start" and exit with 1: stdout 1`] = `""`; | |||
|
|||
exports[`Run command should execute "package-one start" and exit with 0: stderr 1`] = ` | |||
"warning package.json: No license field |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This error doesn't exist anymore in yarn berry - https://github.com/search?q=repo%3Ayarnpkg%2Fberry++%22No+license+field%22&type=code
Was not fun to debug that 😆
|
||
const f = fixturez(__dirname); | ||
const f = fixturez(import.meta.url); | ||
const require = createRequire(import.meta.url); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added in order to get tests running with ESM
"allowImportingTsExtensions": true, | ||
"skipLibCheck": true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
skipLibCheck to avoid typechecking external .d.ts
files - that have errors in them - mostly due to gatsby/react/JSX upstream issues :(
fix: typo with corepack (2) feat: basic yarn cache, and correct args fix: remove yarn cache, action requires different orderings fix: attempt cache with differrent orderings fix: attempt to remove chicken egg problem with cache formatting
b6fd466
to
db89e4d
Compare
@@ -13,35 +13,39 @@ | |||
"postinstall": "preconstruct dev && NODE_OPTIONS=--experimental-strip-types packages/cli/bin.js check", | |||
"knip": "knip", | |||
"release": "preconstruct build && changeset publish", | |||
"test": "jest", | |||
"test": "NODE_OPTIONS='--disable-warning=ExperimentalWarning --experimental-vm-modules' jest", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tell jest to run with ESM as per https://jestjs.io/docs/ecmascript-modules
"jest": { | ||
"config": ["package.json"], | ||
"entry": [ | ||
"**/__tests__/**/*.ts", | ||
"**/?(*.)+(test).ts", | ||
"**/__fixtures__/**/*.[jt]s" | ||
] | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
q: what do we need this for?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For some reason knip was failing to automaticaly detect our jest usage, and hence marking most of the test files as unused files.
@@ -35,7 +37,8 @@ describe("Run command", () => { | |||
cwd: f.find("basic-with-scripts"), | |||
env: { | |||
...process.env, | |||
NODE_OPTIONS: "--experimental-strip-types", | |||
NODE_OPTIONS: | |||
"--experimental-strip-types --disable-warning=ExperimentalWarning", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does this make stripNodeWarnings
obsolete?
@@ -1,8 +1,10 @@ | |||
import fixturez from "fixturez"; | |||
import stripAnsi from "strip-ansi"; | |||
import { exec } from "tinyexec"; | |||
import { createRequire } from "node:module"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could replace this with https://www.npmjs.com/package/import-meta-resolve , but honestly using either is just equally fine given this is a test file anyway
@@ -4,7 +4,7 @@ | |||
// | |||
// Who can say? ¯\_(ツ)_/¯ | |||
|
|||
import { Package } from "@manypkg/get-packages"; | |||
import type { Package } from "@manypkg/get-packages"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should use erasableSyntaxOnly
+ verbatimModuleSyntax
to catch issues like this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see you have already enabled both 👍
@@ -3,9 +3,11 @@ | |||
/* Basic Options */ | |||
// "incremental": true, /* Enable incremental compilation */ | |||
"target": "esnext" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */, | |||
"module": "Node16" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */, | |||
//"erasableSyntaxOnly": true, - we need TS 5.8 first | |||
"module": "nodenext" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Node16 (or Node18) is, kind of, a safer value
@@ -26,7 +28,8 @@ | |||
|
|||
/* Strict Type-Checking Options */ | |||
"strict": true /* Enable all strict type-checking options. */, | |||
// "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */ | |||
"noImplicitOverride": true /* Ensure overriding members in derived classes are marked with an explicit override modifier. */, | |||
"noImplicitAny": true /* Raise error on expressions and declarations with an implied 'any' type. */, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is already enabled through strict: true
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh, it is too!
Given @bluwy's migration to Vitest... I think I'd close this one and split the work into slightly smaller pieces. I'm in favor of migrating the repo to pnpm so migrating (temporarily) to yarn 4 doesn't bring much value. With that migration in - we should then bump all the dependencies. |
Yarn v1 is frozen, and not receiving bugfixes or features anymore!
This PR migrates manypkg internally to use yarn 4 instead :)
There should be no breaking changes to the usages.
Will have to fix some things in CI 🕸️