Skip to content

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

Closed
Show file tree
Hide file tree
Changes from 5 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
7 changes: 6 additions & 1 deletion .github/actions/ci-setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,16 @@ name: Setup CI
runs:
using: composite
steps:
- name: Enable corepack
shell: bash
run: corepack enable

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: ".node-version"
cache: "yarn"

- name: Install dependencies
shell: bash
run: yarn install --frozen-lockfile
run: yarn install --immutable
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,12 @@ dist/
.cache
public
scratchings.js

# Yarn - https://yarnpkg.com/getting-started/qa#which-files-should-be-gitignored
.pnp.*
**/.yarn/*
!**/.yarn/patches
!**/.yarn/plugins
!**/.yarn/releases
!**/.yarn/sdks
!**/.yarn/versions
1 change: 1 addition & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
nodeLinker: node-modules
30 changes: 30 additions & 0 deletions __fixtures__/basic-with-scripts/yarn.lock
Copy link
Contributor Author

@spanishpear spanishpear Apr 26, 2025

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

Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# This file is generated by running "yarn install" inside your project.
# Manual changes might be lost - proceed with caution!

__metadata:
version: 8
cacheKey: 10c0

"@manypkg/basic-fixture-pkg-one@workspace:packages/package-one":
version: 0.0.0-use.local
resolution: "@manypkg/basic-fixture-pkg-one@workspace:packages/package-one"
languageName: unknown
linkType: soft

"@manypkg/basic-fixture-pkg-two-one@workspace:packages/package-two-one":
version: 0.0.0-use.local
resolution: "@manypkg/basic-fixture-pkg-two-one@workspace:packages/package-two-one"
languageName: unknown
linkType: soft

"@manypkg/basic-fixture-pkg-two@workspace:packages/package-two":
version: 0.0.0-use.local
resolution: "@manypkg/basic-fixture-pkg-two@workspace:packages/package-two"
languageName: unknown
linkType: soft

"@manypkg/basic-fixture@workspace:.":
version: 0.0.0-use.local
resolution: "@manypkg/basic-fixture@workspace:."
languageName: unknown
linkType: soft
9 changes: 8 additions & 1 deletion knip.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,12 @@
"ignoreBinaries": ["gatsby", "packages/cli/bin.js"]
}
},
"ignore": ["__fixtures__/**"]
"jest": {
"config": ["package.json"],
"entry": [
"**/__tests__/**/*.ts",
"**/?(*.)+(test).ts",
"**/__fixtures__/**/*.[jt]s"
]
}
Comment on lines +9 to +16
Copy link
Collaborator

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?

Copy link
Contributor Author

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.

}
36 changes: 20 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Copy link
Contributor Author

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

"test-gatsby": "cd test-gatsby && gatsby develop"
},
"jest": {
"extensionsToTreatAsEsm": [
".ts"
],
"watchPlugins": [
"jest-watch-typeahead/filename",
"jest-watch-typeahead/testname"
]
},
"devDependencies": {
"@babel/core": "^7.20.5",
"@babel/plugin-transform-runtime": "^7.19.6",
"@babel/preset-env": "^7.20.2",
"@babel/preset-typescript": "^7.18.6",
"@changesets/changelog-github": "^0.4.8",
"@changesets/cli": "^2.26.0",
"@babel/core": "^7.26.10",
"@babel/plugin-transform-runtime": "^7.26.10",
"@babel/preset-env": "^7.26.9",
"@babel/preset-typescript": "^7.27.0",
"@changesets/changelog-github": "^0.5.1",
"@changesets/cli": "^2.29.2",
"@preconstruct/cli": "^2.8.12",
"@types/jest": "^29.2.4",
"@types/normalize-path": "^3.0.0",
"@types/parse-github-url": "^1.0.0",
"@types/semver": "^6.0.1",
"jest": "^29.3.1",
"jest-watch-typeahead": "^2.2.1",
"knip": "^5.33.3",
"@types/jest": "^29.5.14",
"@types/node": "^22.15.2",
"@types/normalize-path": "^3.0.2",
"@types/parse-github-url": "^1.0.3",
"@types/semver": "^7.7.0",
"jest": "^29.7.0",
"jest-watch-typeahead": "^2.2.2",
"knip": "^5.50.5",
"prettier": "^3.5.3",
"prettier-plugin-packagejson": "^2.5.10",
"typescript": "^5.3.2"
"typescript": "^5.8.3"
},
"packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e",
"packageManager": "yarn@4.9.1+sha512.f95ce356460e05be48d66401c1ae64ef84d163dd689964962c6888a9810865e39097a5e9de748876c2e0bf89b232d583c33982773e9903ae7a76257270986538",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

SHA generated via corepack upnodejs/corepack#231 (comment)

"preconstruct": {
"packages": [
"packages/!(gatsby)*"
Expand Down
14 changes: 7 additions & 7 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,22 @@
},
"dependencies": {
"@manypkg/get-packages": "^2.2.1",
"detect-indent": "^6.0.0",
"detect-indent": "^7.0.1",
"normalize-path": "^3.0.0",
"p-limit": "^6.2.0",
"package-json": "^10.0.1",
"parse-github-url": "^1.0.2",
"picocolors": "^1.1.0",
"parse-github-url": "^1.0.3",
"picocolors": "^1.1.1",
"sembear": "^0.7.0",
"semver": "^7.6.3",
"tinyexec": "^0.3.1",
"semver": "^7.7.1",
"tinyexec": "^1.0.1",
"validate-npm-package-name": "^6.0.0"
},
"devDependencies": {
"@changesets/types": "^5.2.1",
"@changesets/types": "^6.1.0",
"@types/validate-npm-package-name": "^4.0.2",
"fixturez": "^1.1.0",
"strip-ansi": "^6.0.0"
"strip-ansi": "^7.1.0"
},
"engines": {
"node": ">=18.0.0"
Expand Down
74 changes: 18 additions & 56 deletions packages/cli/src/__snapshots__/run.test.ts.snap
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`Run command should execute "@manypkg/basic-fixture-pkg-two start" and exit with 0: stderr 1`] = `
"warning package.json: No license field
warning ../../package.json: No license field
"
`;
exports[`Run command should execute "@manypkg/basic-fixture-pkg-two start" and exit with 0: stderr 1`] = `""`;

exports[`Run command should execute "@manypkg/basic-fixture-pkg-two start" and exit with 0: stdout 1`] = `
"$ echo hello start
hello start
"hello start
"
`;

Expand All @@ -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
Copy link
Contributor Author

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 😆

warning ../../package.json: No license field
"
`;
exports[`Run command should execute "package-one start" and exit with 0: stderr 1`] = `""`;

exports[`Run command should execute "package-one start" and exit with 0: stdout 1`] = `
"$ echo hello start
hello start
"hello start
"
`;

exports[`Run command should execute "package-one test" and exit with 0: stderr 1`] = `
"warning package.json: No license field
warning ../../package.json: No license field
"
`;
exports[`Run command should execute "package-one test" and exit with 0: stderr 1`] = `""`;

exports[`Run command should execute "package-one test" and exit with 0: stdout 1`] = `
"$ echo testing
testing
"testing
"
`;

Expand All @@ -62,51 +47,33 @@ exports[`Run command should execute "package-two start" and exit with 1: stderr

exports[`Run command should execute "package-two start" and exit with 1: stdout 1`] = `""`;

exports[`Run command should execute "package-two-one something" and exit with 1: stderr 1`] = `
"warning package.json: No license field
warning ../../package.json: No license field
error Command "something" not found.
"
`;
exports[`Run command should execute "package-two-one something" and exit with 1: stderr 1`] = `""`;

exports[`Run command should execute "package-two-one something" and exit with 1: stdout 1`] = `
"info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
"
`;
"Usage Error: Couldn't find a script named "something".

exports[`Run command should execute "package-two-one start" and exit with 0: stderr 1`] = `
"warning package.json: No license field
warning ../../package.json: No license field
$ yarn run [--inspect] [--inspect-brk] [-T,--top-level] [-B,--binaries-only] [--require #0] <scriptName> ...
"
`;

exports[`Run command should execute "package-two-one start" and exit with 0: stderr 1`] = `""`;

exports[`Run command should execute "package-two-one start" and exit with 0: stdout 1`] = `
"$ echo hello start
hello start
"hello start
"
`;

exports[`Run command should execute "packages/package-two start" and exit with 0: stderr 1`] = `
"warning package.json: No license field
warning ../../package.json: No license field
"
`;
exports[`Run command should execute "packages/package-two start" and exit with 0: stderr 1`] = `""`;

exports[`Run command should execute "packages/package-two start" and exit with 0: stdout 1`] = `
"$ echo hello start
hello start
"hello start
"
`;

exports[`Run command should execute "pkg-one start" and exit with 0: stderr 1`] = `
"warning package.json: No license field
warning ../../package.json: No license field
"
`;
exports[`Run command should execute "pkg-one start" and exit with 0: stderr 1`] = `""`;

exports[`Run command should execute "pkg-one start" and exit with 0: stdout 1`] = `
"$ echo hello start
hello start
"hello start
"
`;

Expand All @@ -119,14 +86,9 @@ exports[`Run command should execute "pkg-two start" and exit with 1: stderr 1`]

exports[`Run command should execute "pkg-two start" and exit with 1: stdout 1`] = `""`;

exports[`Run command should execute "pkg-two-one start" and exit with 0: stderr 1`] = `
"warning package.json: No license field
warning ../../package.json: No license field
"
`;
exports[`Run command should execute "pkg-two-one start" and exit with 0: stderr 1`] = `""`;

exports[`Run command should execute "pkg-two-one start" and exit with 0: stdout 1`] = `
"$ echo hello start
hello start
"hello start
"
`;
2 changes: 1 addition & 1 deletion packages/cli/src/checks/__tests__/INTERNAL_MISMATCH.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { getFakeWS, getRootWS, getWS } from "../../test-helpers.ts";
import makeCheck, { ErrorType } from "../INTERNAL_MISMATCH.ts";
import makeCheck, { type ErrorType } from "../INTERNAL_MISMATCH.ts";

let rootWorkspace = getRootWS();

Expand Down
7 changes: 5 additions & 2 deletions packages/cli/src/run.test.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import fixturez from "fixturez";
import stripAnsi from "strip-ansi";
import { exec } from "tinyexec";
import { createRequire } from "node:module";
Copy link
Collaborator

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


const f = fixturez(__dirname);
const f = fixturez(import.meta.url);
const require = createRequire(import.meta.url);
Copy link
Contributor Author

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


function stripNodeWarnings(str: string) {
return str
Expand Down Expand Up @@ -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",
Copy link
Collaborator

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?

},
},
}
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/test-helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//
// Who can say? ¯\_(ツ)_/¯

import { Package } from "@manypkg/get-packages";
import type { Package } from "@manypkg/get-packages";
Copy link
Collaborator

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

Copy link
Collaborator

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 👍

import crypto from "node:crypto";

export let getRootWS = (): Package => {
Expand Down
2 changes: 1 addition & 1 deletion packages/find-root/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"@manypkg/tools": "^1.1.2"
},
"devDependencies": {
"@types/node": "^16.11.7",
"@types/node": "^22.15.2",
"fixturez": "^1.1.0"
},
"engines": {
Expand Down
2 changes: 1 addition & 1 deletion packages/find-root/src/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { findRoot, findRootSync } from "./index.ts";

import { LernaTool, PnpmTool, RootTool, YarnTool } from "@manypkg/tools";

let f = fixturez(__dirname);
const f = fixturez(import.meta.url);

type FindRoot = typeof findRoot | typeof findRootSync;

Expand Down
12 changes: 6 additions & 6 deletions packages/gatsby-source-workspace/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@
],
"dependencies": {
"find-workspaces-root": "^0.2.0",
"fs-extra": "^8.1.0",
"get-workspaces": "^0.6.0"
"fs-extra": "^11.3.0",
"get-workspaces": "^1.0.11"
},
"devDependencies": {
"gatsby": "^2.15.28",
"react": "^16.10.1",
"react-dom": "^16.10.1"
"gatsby": "^5.14.3",
"react": "^19.1.0",
"react-dom": "^19.1.0"
},
"peerDependencies": {
"gatsby": "^2.15.28"
"gatsby": "^5.14.3"
},
"engines": {
"node": ">=14.18.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/get-packages/src/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import fixturez from "fixturez";
import path from "node:path";
import { getPackages, getPackagesSync } from "./index.ts";

const f = fixturez(__dirname);
const f = fixturez(import.meta.url);

type GetPackages = typeof getPackages | typeof getPackagesSync;

Expand Down
2 changes: 1 addition & 1 deletion packages/tools/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"tinyglobby": "^0.2.13"
},
"devDependencies": {
"@types/jju": "^1.4.2",
"@types/jju": "^1.4.5",
"@types/js-yaml": "^4.0.9"
},
"engines": {
Expand Down
2 changes: 1 addition & 1 deletion packages/tools/src/BoltTool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
} from "./expandPackageGlobs.ts";
import { readJson, readJsonSync } from "./utils.ts";

export interface BoltPackageJSON extends PackageJSON {
interface BoltPackageJSON extends PackageJSON {
bolt?: {
workspaces?: string[];
};
Expand Down
Loading