forked from getodk/web-forms
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Post-release (0.2.0) dependency updates & related (getodk#163)
* Bump Node version matrix Manually verified on 22.4.1 (in case `tree-sitter` et al have issues): - clean install - monorepo-wide build and test * Bump Yarn to v1 latest Manually verified again (in case `tree-sitter` et al have issues): - clean install - monorepo-wide build and test * Dependency updates Includes (automated via codemod) update to `turbo.json`, which was necessary to validate build & test. Note that this was a semver major update. Seems to have gone smoothly (after rolling back the dep update and re-updating with the codemod). The release notes hype an improved CLI experience, but I don’t think we’ll benefit from it unless/until we embrace Turborepo more fully (i.e. moving more of the task orchestration from package scripts into turbo.json). - - - After install in dev environments, you’ll likely need to run `yarn playwright install` to update the browsers used by Playwright (both directly, and in VItest browser mode) - - - For the most part, this is just latest of everything that has updates, except: - Vue, which we have currently pinned to the version in central-frontend. That should really be updated: IIRC it hadn’t been for 10mo when we last did updates, and it’s now one of our two most error-prone/manual intervention driving deps. If not careful, lockfile-only updates can cause build failures in `@getodk/web-forms`! - Primevue, which I expect we’ll want to update separately with dedicated effort to address its semver-major changes. - Sass, which only has a patch release, but it introduces some [deprecation warnings](https://sass-lang.com/documentation/breaking-changes/mixed-decls/). We should definitely heed these warnings! But as far as I could tell, they’re out of our control (all coming from Primevue styles). We’ll likely want to update Sass and Primevue together when ready. - To further reduce error-prone/manual intervention of the other (tree-sitter &co), more of its *implied peer dependencies* have been pinned to exact versions (or done so consistently across root/sub-packages). This includes `nan` and `node-gyp`. Hopefully this will reduce the risk of weird succeed-then-fail installs as I’ve seen in previous passes on this set of updates. - - - One dependency was removed from xforms-engine which was missed when we broke out the ui-solid package. - - - The most significant semver major update I saw was Vitest &co. From reading their release notes, this doesn’t seem like a risky update. There will be some adjustments in a a later commit. - - - Not everything follows semver! We continue to pin `typescript` with ~ (accounting for the fact that TS x.y updates are typically where breaking changes are introduced). * Fix: Adapt Node runtime detection to account for Vitest browser mode changes * Vitest config updates… 1. In browser mode, Vitest now captures screenshots of failing tests by default. First of all, this is not useful for us, for the vast majority of our browser testing scenarios (if any!). Second of all, it apparently does this even for **expected failures**! We override this default across all packages. 2. In addressing (1), it became clear that some of the Vitest config types are not available (if importing `defineConfig` from 'vite') or cause conflicts with plugins (if importing `defineConfig` from 'vitest/config’). As a stopgap to unblock this set of dependency updates, a shared type for the `test` field is introduced, and `satisfies VitestTestConfig` is used to allow the TS language server to infer the config’s types. This was helpful for discovering the `screenshotFailures` option, as well as prompting the next change… 3. For the most part, we’ve removed `transformMode` configs as Vite-/Vitest-related tooling stabilized earlier in Web Forms exploratory development. The cases where the config remained were no longer consistent with the updated Vitest config types. I first updated them to match the new types, but then I discovered that the options are no longer necessary in any cases that remained. So they’ve been removed completely. * Format update Thanks Prettier 🙃 * Add no-op `test` script to `scripts` package This package was originally going to be removed on this branch. It had never been used, and its presence made it a much bigger hassle to validate dependency updates and other project-wide changes. Despite mentioning plans to remove the package a couple days ago, removing it now will be in conflict with getodk#162. In the interest of unblocking many substantial improvements downstream, some of which have been in limbo for a couple weeks, I’ve reverted the removal. Instead, adding this script provides a small quality of life improvement for future project-wide improvements by eliminating impediments to running all tests across all packages that actually have tests (`yarn workspaces run test` fails unless every workspace has a `test` script).
- Loading branch information
1 parent
19b31f5
commit 8348215
Showing
23 changed files
with
1,465 additions
and
1,672 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,13 +8,14 @@ | |
"type": "module", | ||
"version": "0.1.0", | ||
"engines": { | ||
"node": "^18.20.3 || ^20.13.1 || ^22.2.0", | ||
"yarn": "1.22.19" | ||
"node": "^18.20.4 || ^20.15.1 || ^22.4.1", | ||
"yarn": "1.22.22" | ||
}, | ||
"volta": { | ||
"node": "22.2.0", | ||
"yarn": "1.22.19" | ||
"node": "22.4.1", | ||
"yarn": "1.22.22" | ||
}, | ||
"packageManager": "[email protected]", | ||
"workspaces": [ | ||
"packages/*", | ||
"scripts" | ||
|
@@ -31,36 +32,36 @@ | |
}, | ||
"dependencies": { | ||
"@changesets/changelog-github": "^0.5.0", | ||
"@changesets/cli": "^2.27.3", | ||
"@eslint/js": "^9.3.0", | ||
"@changesets/cli": "^2.27.7", | ||
"@eslint/js": "^9.6.0", | ||
"@eslint/eslintrc": "^3.1.0", | ||
"@tsconfig/node20": "^20.1.2", | ||
"@tsconfig/node20": "^20.1.4", | ||
"@types/eslint__js": "^8.42.3", | ||
"@types/eslint": "^8.56.10", | ||
"@types/eslint-config-prettier": "^6.11.3", | ||
"@types/jsdom": "^21.1.6", | ||
"@types/node": "^20.12.12", | ||
"@typescript-eslint/eslint-plugin": "^7.10.0", | ||
"@typescript-eslint/parser": "^7.10.0", | ||
"@types/jsdom": "^21.1.7", | ||
"@types/node": "^20.14.10", | ||
"@typescript-eslint/eslint-plugin": "^7.16.0", | ||
"@typescript-eslint/parser": "^7.16.0", | ||
"@vue/eslint-config-prettier": "^9.0.0", | ||
"@vue/eslint-config-typescript": "^13.0.0", | ||
"@vue/tsconfig": "^0.5.1", | ||
"eslint": "^9.3.0", | ||
"eslint": "^9.6.0", | ||
"eslint-config-prettier": "^9.1.0", | ||
"eslint-plugin-jsdoc": "^48.2.6", | ||
"eslint-plugin-jsdoc": "^48.7.0", | ||
"eslint-plugin-no-only-tests": "^3.1.0", | ||
"eslint-plugin-prettier": "^5.1.3", | ||
"eslint-plugin-vue": "^9.26.0", | ||
"nan": "^2.19.0", | ||
"node-gyp": "^10.1.0", | ||
"npm-run-all2": "^6.2.0", | ||
"eslint-plugin-vue": "^9.27.0", | ||
"nan": "2.20.0", | ||
"node-gyp": "10.2.0", | ||
"npm-run-all2": "^6.2.2", | ||
"only-allow": "^1.2.1", | ||
"organize-imports-cli": "^0.10.0", | ||
"prettier": "^3.2.5", | ||
"rimraf": "^5.0.7", | ||
"turbo": "^1.13.3", | ||
"typescript": "~5.4.5", | ||
"typescript-eslint": "^7.10.0", | ||
"prettier": "^3.3.2", | ||
"rimraf": "^5.0.9", | ||
"turbo": "^2.0.6", | ||
"typescript": "~5.5.3", | ||
"typescript-eslint": "^7.16.0", | ||
"vue": "3.3.4", | ||
"vue-tsc": "^2.0.19" | ||
}, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
/** | ||
* Specifies detection of Node runtime environment. | ||
*/ | ||
// This is a heuristic which, unfortunately, may need to evolve as tooling | ||
// packages are updated (hence it now being shared across packages). Details of | ||
// its evolution will be noted as they're added or modified. | ||
// prettier-ignore | ||
export const IS_NODE_RUNTIME = | ||
// Previously we only checked that this global object is defined... | ||
typeof process === 'object' && process !== null && | ||
|
||
// ... we have added this heuristic to adapt to a change in Vitest's browser | ||
// mode, which began poulating `process.env` (via Vite's `define` config) with | ||
// some conditions apparently used to mollify `testing-library`. It isn't | ||
// exactly clear why any `testing-library` packages are installed by Vitest | ||
// itself (though it appears there is some guidance to use it and/or its | ||
// framework-specific variants for certain browser testing scenarios since | ||
// @vitest/browser v2). | ||
typeof (process as Partial<NodeJS.Process>).versions?.node === 'string'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import type { UserConfig } from 'vitest/config'; | ||
|
||
export type VitestTestConfig = NonNullable<UserConfig['test']>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.