Skip to content

Conversation

@SMotaal
Copy link
Contributor

@SMotaal SMotaal commented Aug 28, 2024

This is the first PR to land instead of #37 before #40 and #41:

@SMotaal SMotaal requested a review from a team as a code owner August 28, 2024 17:52
Copy link
Contributor

@grypez grypez left a comment

Choose a reason for hiding this comment

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

LGTM

@SMotaal SMotaal merged commit 31d1836 into main Aug 28, 2024
@SMotaal SMotaal deleted the smotaal/test-endoify-vitest-split branch August 28, 2024 21:04
SMotaal added a commit that referenced this pull request Sep 3, 2024
This is the second PR to land instead of #37 after #39 and before #41:

- Renames `endoify.mjs` to `endoify.js` in `packages/{shims,extension}`
  - For consistency — now all `.mjs` files are renamed to `.js`
- Delegates bundling of `endoify.js` to `bundleSource`
  - For reliability and predictability — avoids making assumptions and resolving paths inside third-party packages
- Optionally subs `ZWJ`-prefixed identifiers introduced by `bundleSource` with conforming `CGJ` alternatives
  - For conformance — makes it possible to [experiment with `rollup`](https://www.smotaal.io/experimental/#/experimental/modules/shim/README.md) until [endojs/endo#2436](endojs/endo#2436) rolls out.
- Explicitly imports `./endoify.js` in `packages/shims/src/*.test.ts`
  - For clarity and flexibility — test files need to be explicit
- Configures `vitest` to use `jsdom` with `vmThreads` for `packages/shims`
  - For consistency and reduced configuration overhead — thanks to @grypez's exploration putting us on this path of least resistance with `vitest`
SMotaal added a commit that referenced this pull request Sep 3, 2024
This is the third PR to land instead of #37 and after #39 and #40:

- Adds `endoify.ts` and `endoify.test.ts` to `packages/extension/src`
  - For clarity — sibling files importing `./endoified.js`
- Explicitly imports `./endoify.js` in
`packages/extension/src/*.test.ts`
  - For clarity and flexibility — test files need to be explicit
- Configures `vitest` to use `jsdom` with `vmThreads` for
`packages/extension`
  - For consistency and reduced configuration overhead
- Adds guards against inlining `script[src="endoify.ts"]` and
`script[src="endoify.js"]` in `packages/extension/src/*.html`
- For efficacy and efficiency — parsing before vs after a failure makes
no difference in speed, only in accuracy

---------

Co-authored-by: grypez <143971198+grypez@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants