Skip to content
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

Modernize codebase #307

Merged
merged 3 commits into from
Nov 9, 2023
Merged

Modernize codebase #307

merged 3 commits into from
Nov 9, 2023

Conversation

djahandarie
Copy link
Collaborator

  • Use ES modules
  • Remove vendored libs and build them from npm using esbuild (except for handlebars-kbn, which is not available on npm and I have included in dev/lib/handlebars)
  • Switch from JSZip to zip.js

- Use ES modules
- Remove vendored libs and build them from npm using esbuild
- Switch from JSZip to zip.js
@djahandarie djahandarie requested a review from a team as a code owner November 4, 2023 09:48
themoeway-bot
themoeway-bot previously approved these changes Nov 4, 2023
Copy link

github-actions bot commented Nov 4, 2023

✔️ No visual differences introduced by this PR.

View Playwright Report (note: open the "playwright-report" artifact)

ext/js/display/display.js Outdated Show resolved Hide resolved
ext/js/templates/sandbox/template-renderer.js Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
@praschke
Copy link
Collaborator

praschke commented Nov 4, 2023

Logger defined in core.js references chrome, which is a polyfill global that is set in yomichan.js. yomichan.js now includes from core.js. can globals be set in ES modules?

i think i'm seeing this error purely in the dictionary worker, which doesn't have browser defined either. i think this is irrelevant.

@praschke
Copy link
Collaborator

praschke commented Nov 4, 2023

i submitted a PR against this branch addressing my review and Firefox issues. there are two more problems i found but i've run out of time for now:

  • jszip was still used in tests, so those are currently broken
  • eslint error: setup() is unused in test/data/html/test-document2-script.js

package.json Show resolved Hide resolved
@praschke
Copy link
Collaborator

praschke commented Nov 5, 2023

legal.html and the readme also don't reflect the change from jszip to @zip.js. additionally, as we're now building the extension dependencies from npm, referencing snapshots is no longer relevant.

themoeway-bot
themoeway-bot previously approved these changes Nov 7, 2023
themoeway-bot
themoeway-bot previously approved these changes Nov 7, 2023
themoeway-bot
themoeway-bot previously approved these changes Nov 7, 2023
@praschke
Copy link
Collaborator

praschke commented Nov 7, 2023

LGTM. thank you for undertaking this slog.

@djahandarie djahandarie added this pull request to the merge queue Nov 9, 2023
Merged via the queue into master with commit 5c5a167 Nov 9, 2023
7 checks passed
@djahandarie djahandarie deleted the modernize branch November 9, 2023 13:32
@djahandarie djahandarie added the kind/enhancement The issue or PR is a new feature or request label Nov 10, 2023
@Casheeew
Copy link
Member

Is there any reason for still using jszip as opposed to zip.js in tests?

@Casheeew
Copy link
Member

Is there any reason for still using jszip as opposed to zip.js in tests?
@djahandarie

@djahandarie
Copy link
Collaborator Author

I tried to get zip.js to work but I couldn't get it working in Node for some reason. It certainly would be better to unify if possible.

@Casheeew
Copy link
Member

thanks for the confirmation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement The issue or PR is a new feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants