#52030: test: use node16 moduleResolution in tsconfig and clean up imports
Description of Change
Moves our tsconfig.spec.json file to using node16 for moduleResolution and nodenext for module settings. This aligns us with the defaults from @tsconfig/node22, and should let us start consuming newer versions of our ecosystem packages like @electron/fuses and @electron/packager in our tests.
This also throws in skipLibCheck too so that yarn tsc -p tsconfig.spec.json runs clean.
Small change needed in spec/modules-spec.ts as after this change the ESM exports in the test include default and module.exports (which aligns better with what you get in Fiddle if you dynamic import electron), so check that the CJS exports are all included in the ESM exports but not strictly equal.
Checklist
- I have built and tested this change
- I have filled out the PR description
Release Notes
Notes: none
Backports
Semver Impact
Semantic Versioning helps users understand the impact of updates:
- Major (X.y.z): Breaking changes that may require code modifications
- Minor (x.Y.z): New features that maintain backward compatibility
- Patch (x.y.Z): Bug fixes that don't change the API
- None: Changes that don't affect using facing parts of Electron