forked from buefy/buefy
-
Notifications
You must be signed in to change notification settings - Fork 10
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
Migrate to lerna
and vite
#142
Merged
Merged
Conversation
This file contains 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
Still Buggy
- `static` folder contains assets for the `docs` package.
- Vite expects public assets in `public` folder.
- Installs `pre-commit` package that is triggered when one runs `git commit`. However, it does nothing until we restore `pre-commit` property in `package.json`
- Installs the following packages that `docs` depends on: - `bulma-css-vars` - `cleave.js` - `scrollreveal` - `sortablejs` - `vue-breakpoint-mixin`
- Corrects the relative path to Buefy's `package.json` from `TheNavbar.vue`.
- Removes `server.fs` config in `vite.config.js`, because it is no longer necessary and even harmful as we started migrating to Lerna.
- Corrects the relative path to `buefy-next/utils/color.js` from the examples folder of `Colorpicker`.
- Installs `vite-plugin-commonjs` to import CommonJS files on Vite.
- Fixes the issue that the example of `bulma-css-vars` extension did not work. Problems were two-fold: 1. `bulma-generated/bulma-colors.js` is not an ESM module, and Vite did not like it. Works around this with `vite-plugins-commonjs` plugin. 2. `bulma-css-vars` includes a line that did not work as inteded with Vite. I was not able to figure out a workaround of this issue other than rewriting `bulma-css-vars`. So I decided to configure Vite to patch it with the plugin. There are two different plugins for development and production mode: - "transform-bulma-css-vars" plugin patches `bulma-css-vars` after Vite processes it with esbuild in development mode. - "load-bulma-css-vars" plugin patches `bulma-css-vars` when it is loaded in production mode.
- Fixes the issue that a code snippet of BulmaCssVars extension became "0". Replaces the obsolete `pre` filter syntax with `utils.preformat` call.
- Moves `netlify.toml` to `packages/docs` because it is specific to the docs package.
- Configures Netlify to forward all the traffic that is not resolved to existing files to the root `/` so that the SPA can determine which contents to deliver. This configuration should make pre-rendering unnecessary.
- The `build` script copies `netlify.toml` to `dist` folder.
- Downgrades `@mdi/font` to v6.9.96, because v7.x deprecated and removed the Discord icon. Since other brand icons like GitHub will also go away in v8.x, we should consider other icon sources; e.g., Simple Icons.
- Because we upgraded `@mdi/font`.
- Installs `@mdi/font` v6.9.96.
Co-Authored-By: Kikuo Emoto <kemoto@codemonger.io>
- `highlight.js` v11.9.0 is the latest version as of this commit.
- Because we bumped `highlight.js` to v11.x.
- Fixes the issue that syntax highlighting was not applied to code blocks due to the outdated `highlight` directive define in the Vue 2 manner. Corrects the definition of `highlight` directive so that it works on Vue 3: - renames `bind` → `beforeMount` - renames `componentUpdated` → `updated` See https://v3-migration.vuejs.org/breaking-changes/custom-directives.html Removes `deep` option because it was deprecated and has no effect on Vue 3 (even on Vue 2). See https://v2.vuejs.org/v2/guide/migration#Custom-Directives-simplified - Also fixes the deprecation warnings from the new version of `highlight.js`: - renames `highlightBlock` → `highlightElement`
- Fixes the issue that the text input on the search modal did not work. Replaces "@input" → "@update:model-value" on the `<b-input>` for search terms. The `<b-input>` for the search terms intended to call the `search` method whenever a new text was inputted. It was listening for "input" events to receive inputted texts (model value) and it worked on Vue 2. However, it broke on Vue 3, because Vue 3 changed the name of events triggered when a model value is updated from "input" to "update:modelValue". Since "input" overlaps with events from the underlying `<input>` of `<b-input>`, the `search` method started to receive `InputEvent` objects instead of inputted texts.
- Fixes the version displayed on the Home view.
- Because we upgraded `@mdi/font`.
- Fixes the problem that tests failed due to the discrepancy between `packages/buefy-next` and `packages/docs` over Vue's version. I took the following steps to fix this: 1. Bump `vue` in `packages/docs` → 3.3.7 or above 2. Remove dependency on `@vue/shared` that is indirectly installed by `vue 3. Remove `package-lock.json`, and all the `node_modules` folders 4. Run `npm install`
- I should have updated snapshots in #127.
- Adds `vetur` script that runs `build/vetur.js`. `build` script runs `vetur`. - Installs `esm` package to import ESM scripts from CJS files; e.g, `build/vetur.js`.
MigrateToLerna: restore vetur script
- Removes unnecessary files including: - files related to Webpack - leftovers of the Vite template project
MigrateToLerna: cleanup
- Triggers a GitHub Actions workflow that publishes to the GitHub Packages registry whenever new commits are pushed to the `dev` branch. Commit hashes are appended to the package versions so that they won't overlap with existing or future releases.
- Copies `README.md` in the root folder to `packages/buefy-next` so that published packages have correct README. A symbolic link might work, though, I was not very confident about whether it would work on Windows.
MigrateToLerna: publish dev releases to the GitHub Packages registry
chore: clean up GitHub action for unit testing chore: clean up GitHub action for unit testing fix(action): update commands in GitHub action for unit testing
Create GitHub Action For Unit Testing Upon PR To `dev` And `main`
- `npm ci` command did not accept the workspace option `-w`. Simply runs `npm ci` instead.
- Fixes the issue that the unit testing workflow did not work with Node.js v14 because some of our `devDependencies` required Node.js v16 or higher. Simply drops "14.x" from the build matrix.
…-gha MigrateToLerna: fix the unit testing GitHub Actions workflow
- Updates `npm_deploy.yml`: - Inserts `npm build` before `npm publish`. The `prepare` script used to run `build` at `publish`, but the `prepare` script was removed; I removed it because it was not very useful in the workspace configuration. - Adds the workspace option `-w @ntohq/buefy-next` to `npm` commands except for `npm ci`. - Bumps Node.js to v18. - Bumps `actions/checkout` to v4.
MigrateToLerna: update npm deploy workflow
MigrateToLerna: bump version to 0.1.3
✅ Deploy Preview for buefy-nextdocs ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
kikuomax
approved these changes
Nov 16, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Too many changes to review, though, I am sure we already have reviewed all the changes.
This was
linked to
issues
Nov 16, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Proposed Changes
lerna
monorepo (workspace) containing the following packages:packages/buefy-next
: Buefy-next core library (buefy-next
)packages/docs
: Vue app to deliver the documentation (docs
)vite
build:docs
does not produce CSS files #113dev
branch to the GitHub Packages registry whenever commits are pushed todev
Let's "rebase and merge" if approved.