Skip to content

Conversation

@thescientist13
Copy link
Member

@thescientist13 thescientist13 commented Oct 14, 2025

Related Issue

related to #1315

Documentation

N / A

Summary of Changes

  1. Adopt PNPM workspaces

TODO

  1. Puppeteer prerendering kind of flaky (even locally) - could be due to new version of Puppeteer dep getting installed? - I think shamefully-hoist worked for this

    Details
         TypeError: html.replace is not a function
         at file:///Users/owenbuckley/Workspace/project-evergreen/greenwood/packages/plugin-renderer-puppeteer/src/puppeteer-handler.js:17:23
         at async file:///Users/owenbuckley/Workspace/project-evergreen/greenwood/packages/plugin-renderer-puppeteer/src/puppeteer-handler.js:13:16
         at async Promise.all (index 0)
         at async asyncMap (file:///Users/owenbuckley/Workspace/project-evergreen/greenwood/packages/cli/src/lib/async-utils.js:26:10)
         at async default (file:///Users/owenbuckley/Workspace/project-evergreen/greenwood/packages/plugin-renderer-puppeteer/src/puppeteer-handler.js:57:3)
         at async preRenderCompilationCustom (file:///Users/owenbuckley/Workspace/project-evergreen/greenwood/packages/cli/src/lifecycles/prerender.js:160:3)
         at async Module.runProductionBuild (file:///Users/owenbuckley/Workspace/project-evergreen/greenwood/packages/cli/src/commands/build.js:46:7)
         at async run (file:///Users/owenbuckley/Workspace/project-evergreen/greenwood/packages/cli/src/index.js:12:9)
     /Users/owenbuckley/Workspace/project-evergreen/greenwood/www:
    

    Error: Execution context was destroyed, most likely because of a navigation.
    at rewriteError (file:///Users/owenbuckley/Workspace/project-evergreen/greenwood/node_modules/.pnpm/[email protected]/node_modules/puppeteer-core/lib/esm/puppeteer/cdp/ExecutionContext.js:453:15)
    at async #evaluate (file:///Users/owenbuckley/Workspace/project-evergreen/greenwood/node_modules/.pnpm/[email protected]/node_modules/puppeteer-core/lib/esm/puppeteer/cdp/ExecutionContext.js:386:60)
    at async ExecutionContext.evaluate (file:///Users/owenbuckley/Workspace/project-evergreen/greenwood/node_modules/.pnpm/[email protected]/node_modules/puppeteer-core/lib/esm/puppeteer/cdp/ExecutionContext.js:274:16)
    at async IsolatedWorld.evaluate (file:///Users/owenbuckley/Workspace/project-evergreen/greenwood/node_modules/.pnpm/[email protected]/node_modules/puppeteer-core/lib/esm/puppeteer/cdp/IsolatedWorld.js:97:16)
    at async CdpFrame.evaluate (file:///Users/owenbuckley/Workspace/project-evergreen/greenwood/node_modules/.pnpm/[email protected]/node_modules/puppeteer-core/lib/esm/puppeteer/api/Frame.js:359:20)
    at async CdpFrame.content (file:///Users/owenbuckley/Workspace/project-evergreen/greenwood/node_modules/.pnpm/[email protected]/node_modules/puppeteer-core/lib/esm/puppeteer/api/Frame.js:586:20)
    at async CdpPage.content (file:///Users/owenbuckley/Workspace/project-evergreen/greenwood/node_modules/.pnpm/[email protected]/node_modules/puppeteer-core/lib/esm/puppeteer/api/Page.js:553:20)
    at async BrowserRunner.serialize (file:///Users/owenbuckley/Workspace/project-evergreen/greenwood/packages/plugin-renderer-puppeteer/src/lib/browser.js:71:21)
    at async file:///Users/owenbuckley/Workspace/project-evergreen/greenwood/packages/plugin-renderer-puppeteer/src/puppeteer-handler.js:13:16
    at async Promise.all (index 0)
    /Users/owenbuckley/Workspace/project-evergreen/greenwood/www:

  2. validate test command (somehow pulling in other test cases?) and running loaders tests even when only running yarn test - this seems to be an issue with PNPM and how it handles globs, still an issue even after upgrading to Mocha 11 - try after chore(workspace): bump mocha v12 for esm config file #1626 (comment)

    Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'vitest' imported from /Users/owenbuckley/Workspace/project-evergreen/greenwood/node_modules/.pnpm/@[email protected]/node_modules/@uswds/web-components/src/components/usa-link/usa-link.spec.js
    at Object.getPackageJSONURL (node:internal/modules/package_json_reader:255:9)
    at packageResolve (node:internal/modules/esm/resolve:767:81)
    at moduleResolve (node:internal/modules/esm/resolve:853:18)
    at defaultResolve (node:internal/modules/esm/resolve:983:11)
    at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:801:12)
    at #cachedDefaultResolve (node:internal/modules/esm/loader:725:25)
    at ModuleLoader.resolve (node:internal/modules/esm/loader:708:38)
    at ModuleLoader.getModuleJobForImport (node:internal/modules/esm/loader:309:38)
    at #link (node:internal/modules/esm/module_job:208:49)
  3. Some HASH_REGEX related test cases are failing because the import name changed, likely due to a bunch of version bumps from regenerating the lock file

    • ideally should make that a regex as well, but that can be a standalone issue
  4. Update GitHub Actions

  5. on the off chance this "fixes" the change we had to make here - enhancement(plugins): #1463 refactor lit ssr plugin hydration script setup #1632

  6. Scrub all references to yarn

    • husky / precommit hooks
    • package.json files
    • CONTRIBUTING.md docs
  7. Validate publishing w/ Lerna

  8. update root package.json engines?

  9. (nice to have) fix chai import

        /Users/owenbuckley/Workspace/project-evergreen/greenwood/packages/cli/test/cases/build.config.active-frontmatter/build.config.active-frontmatter.spec.js
      34:16  warning  Caution: `chai` also has a named export `expect`. Check if you meant to write `import {expect} from 'chai'` instead  import/no-named-as-default-member

@thescientist13 thescientist13 self-assigned this Oct 14, 2025
@thescientist13 thescientist13 added help wanted Extra attention is needed chore unit testing, maintenance, etc labels Oct 14, 2025
@thescientist13 thescientist13 changed the title chore(workspace): PNPM workspaceS chore(workspace): PNPM workspaces Oct 14, 2025
@thescientist13 thescientist13 changed the title chore(workspace): PNPM workspaces chore(workspace): #1315 PNPM workspaces Oct 15, 2025
@thescientist13 thescientist13 force-pushed the chore/issue-1315-pnpm-workspaces branch from f4211e0 to 8abbffb Compare October 22, 2025 01:51
@thescientist13
Copy link
Member Author

Actually, the issue with the test cases seems to be a mocha issue, as observed in #1626 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore unit testing, maintenance, etc help wanted Extra attention is needed

Projects

Status: 🏗 In progress

Development

Successfully merging this pull request may close these issues.

2 participants