-
Notifications
You must be signed in to change notification settings - Fork 2
[mercury] The Mercury implementation is divided into the @genexus/mercury-build and @genexus/mercury-cli packages. Additionally, the @genexus/vite-plugin-mercury package has been added to facilitate configuration in Vite-based environments
#646
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
Open
ncamera
wants to merge
79
commits into
main
Choose a base branch
from
feat/vite-plugin
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+4,368
−2,079
Open
Changes from all commits
Commits
Show all changes
79 commits
Select commit
Hold shift + click to select a range
4ae1e30
Set bundle mappings in the window
ncamera 6a435b7
Add an utility to calculate the gzip size of files that are downloade…
ncamera 7cb9bcd
Improve how the bundle sizes are printed to the output
ncamera 92589fa
Add the `viteMercury` plugin for Vite environments
ncamera 8f4630f
Add tests for validating the bundle size
ncamera 7a692c1
Add tests for validating the gzipped size
ncamera 665b6a7
Add support to inline css bundles in the html head
ncamera fcf8945
Improve path normalization
ncamera c68cf6a
Add support to preload CSS bundles
ncamera 183007b
Add support to specify the fetch priority
ncamera d4be7f6
Add comment for an upcoming feature (lightningcss)
ncamera 91cbaff
Inline the "resets/box-sizing" css bundle by default
ncamera 5a2e6dc
Split the Mercury DS implementation into the mercury-build, mercury-c…
ncamera e811a8a
Add support to build the Mercury CSS bundles
ncamera 8caf560
Fix Mercury build
ncamera 1c91be7
More fixes for the Mercury build
ncamera c0a7776
Update eslint.config.js
ncamera 3cd3f7f
Remove comments
ncamera 075fab4
Copy assets when building the css
ncamera 8f64647
Improve build output style
ncamera 9d12bbf
Improve script names
ncamera 22f178f
Fixes for building the dist for Mercury
ncamera ba46e27
Update validate-args.ts
ncamera 3cbcae1
Remove bulding scripts for the showcase in the Mercury package
ncamera 528113c
Move assets file to the src folder
ncamera 83e6644
Update tsconfig.json
ncamera 564bec1
New dev server for the showcase
ncamera 1ac34e8
Add missing commits
ncamera 98c3efd
Fix wrong placeholder values
ncamera ccd3c6e
Add missing commit
ncamera c4a6477
Refresh the showcase when rebuilding Mercury
ncamera ddcc13b
Improve main readme for local development
ncamera ebc10a8
Avoid memory leaks when the build crashes
ncamera aff4ed4
Fix dev server not working properly
ncamera 00f218b
Build Mercury for usage
ncamera ebb2ba8
Remove no longer required code for the mercury-cli package
ncamera 9a23e65
Merge branch 'main' into feat/vite-plugin
ncamera 4ef9b16
Properly build mercury for the distribution of the showcase
ncamera fe518aa
Merge branch 'main' into feat/vite-plugin
ncamera 38ea7a0
Remove --outDir argument
ncamera 6b68f42
Merge branch 'main' into feat/vite-plugin
ncamera 55fe7b6
Copy the fonts and icons when building Mercury for usage
ncamera 1595f11
Move Mercury plugins to the mercury-plugins folder
ncamera 7d99fda
Use TS GO for faster dev builds
ncamera b89d072
Force "hoisted" installs by adding bunfig.toml file
ncamera 5cb2bfe
Complete the implementation for vite-mercury-plugin
ncamera 638a725
Fix conflicts between NodeJS' threads and Vite's build process
ncamera 58ed674
Don't clear fonts and icons folders to let multiple plugins add asset…
ncamera 0a0863f
Improvements for the React installation docs
ncamera 8159fc0
Add readme for the @genexus/mercury-build package
ncamera b36e9a1
Improve package.json description
ncamera 924a3a3
Fix ESM only export not working for require
ncamera 4792457
Delete unused script
ncamera d227f1d
Use bun for running build-scss-and-copy-assets script and delete unus…
ncamera 292973e
Fix showcase dev server
ncamera 348906d
Fix tests not working in common package
ncamera 13a317f
More fixes for running tests in the common package
ncamera 0008179
Rename "vite-mercury-plugin" to "vite-plugin-mercury"
ncamera 86fa0d1
Try to fix workflows
ncamera 3085582
Fix missing "bun" runner in workflows
ncamera 91fd48d
Try to fix workflow
ncamera 9ac788a
Try to fix workflows again
ncamera 0e19e6d
Comment out workflow to test ci
ncamera 96abffa
Comment out workflow step
ncamera ebbd975
Update install-and-deploy.yml
ncamera be619c7
Fix tests
ncamera d7d585c
Fix code scanning result issue
ncamera d82898d
Remove unused "start.watch" script
ncamera 9639e58
Fix typo in react docs
ncamera 53a917a
Use TS and bun for all scripts
ncamera 9e91bfc
Update NextJS installation guide
ncamera 75b0c4a
Update installation-for-react.md
ncamera 621af5b
Move the bundle-to-hash-mapping.ts file to the "node_modules/.genexus…
ncamera cf2c0c8
Improve all installation readmes
ncamera e5a794d
Improve/add readmes for the new packages
ncamera 2f92c40
Fix image path
ncamera 4f62375
More improvements for readmes
ncamera 92f83c5
Fix typo
ncamera 173b274
Add workflows for the new packages
ncamera File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 |
|---|---|---|
|
|
@@ -24,16 +24,10 @@ To see the documentation and examples of how to use Mercury, visit the [showcase | |
| npm i bun -g | ||
| ``` | ||
|
|
||
| - To start the showcase, run: | ||
| - To start the showcase which automatically rebuilds Mercury, run: | ||
|
|
||
| ```bash | ||
| bun start.watch | ||
| ``` | ||
|
|
||
| - To automatically build Mercury, run: | ||
|
|
||
| ```bash | ||
| bun build.mer.watch | ||
| bun start | ||
| ``` | ||
|
|
||
| - To automatically build Unanimo, run: | ||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium
Copilot Autofix
AI 22 minutes ago
To address the issue, you should add a
permissionsblock specifying the minimal required privileges for the workflow. The best practice is to add this block at the root of the workflow file, so that all jobs inherit it unless they explicitly override it. If your jobs only need to read source files and pull packages,contents: readis usually safe and minimal. If jobs need to publish to npm/GitHub Packages, consider addingpackages: write. For workflows that only need to check versions and publish, the most conservative permissions would becontents: read, but if you know that publishing jobs require write access to packages or contents, you can increase the permission for just those jobs as needed.In this case, adding the following at the top level (just below
name:but aboveon:), is the best fix:If you know that jobs which do publishing need to write to the
packages, you may additionally grantpackages: write– but since you can only change what you see, and the minimal fix is to add acontents: readblock at the workflow level.File/Region to change:
.github/workflows/npmpublish.ymlname: Node.js Package), beforeon: