Skip to content

Commit

Permalink
Mvb (#289)
Browse files Browse the repository at this point in the history
* prune and linx

* update to mvb

* fix improper watch usage in VPLPluginItems

* linx

* linx2

* linx3
  • Loading branch information
pirog authored Oct 2, 2024
1 parent b8f6f0e commit 0ba2ece
Show file tree
Hide file tree
Showing 15 changed files with 1,126 additions and 462 deletions.
19 changes: 13 additions & 6 deletions .github/workflows/pr-docs-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,33 @@ on:
jobs:
docs-tests:
runs-on: ${{ matrix.os }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
strategy:
matrix:
os:
- ubuntu-22.04
- ubuntu-24.04
node-version:
- '18'
steps:
# Install deps and cache
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Cache version builds
uses: actions/cache@v4
with:
key: lando-mvb-docs
path: docs/.vitepress/cache/@lando/mvb
save-always: true
- name: Install node ${{ matrix.node-version }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: npm
- name: Install dependencies
run: npm clean-install --prefer-offline --frozen-lockfile

# Run tests
- name: Run linter
run: npm run lint
- name: Test mvb
run: npm run mvb
- name: Test build
run: npm run build
9 changes: 3 additions & 6 deletions .github/workflows/pr-linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,18 @@ jobs:
strategy:
matrix:
os:
- ubuntu-22.04
- ubuntu-24.04
node-version:
- '18'
steps:
# Install deps and cache
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Install node ${{ matrix.node-version }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: npm
- name: Install dependencies
run: npm clean-install --prefer-offline --frozen-lockfile

# Run the linter
- name: Run code linter
run: npm run lint
13 changes: 3 additions & 10 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,29 +13,22 @@ jobs:
strategy:
matrix:
os:
- ubuntu-22.04
- ubuntu-24.04
node-version:
- '18'
steps:
# Install deps and cache
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Install node ${{ matrix.node-version }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
registry-url: https://registry.npmjs.org
cache: npm
- name: Install dependencies
run: npm clean-install --prefer-offline --frozen-lockfile

# Let's do tests rq just to make sure we dont push something that is fundamentally broken
- name: Lint code
run: npm run lint
- name: Run unit tests
run: npm run test:unit

# Prepare release.
- name: Prepare release
uses: lando/prepare-release-action@v3
with:
Expand Down
3 changes: 3 additions & 0 deletions .vitepress/config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ export default defineConfig({
editLink: {
pattern: 'https://github.com/lando/docs/edit/main/:path',
},
multiVersionBuild: {
satisfies: '>=4.1.0',
},
collections: {
guide: {
frontmatter: {
Expand Down
20 changes: 10 additions & 10 deletions .vitepress/theme/VPLPluginItems.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
>
<Plugin
:plugin="plugin"
:type="type"
:type="props.type"
/>
</div>
</div>
Expand Down Expand Up @@ -43,7 +43,7 @@ const Plugin = defineAsyncComponent({
loader: async () => VPLPluginItem,
});
const {items, pager, type, tags} = defineProps({
const props = defineProps({
items: {
type: Array,
required: true,
Expand All @@ -63,19 +63,19 @@ const {items, pager, type, tags} = defineProps({
});
// Hardcoded pager value for now
const amount = ref(pager);
const amount = ref(props.pager);
const key = ref(0);
// normalize data and sort
let pages = items
let pages = props.items
.map(item => Object.assign(item, {show: true, timestamp: item.date ? item.date : item.timestamp}))
.sort((a, b) => a.title > b.title ? 1 : -1);
const adder = () => amount.value += pager;
const adder = () => amount.value += props.pager;
const grid = computed(() => {
const length = amount.value;
if (type === 'icon') return 'grid-icon';
if (props.type === 'icon') return 'grid-icon';
if (!length) {
return;
Expand All @@ -95,13 +95,13 @@ const grid = computed(() => {
const pagination = () => pages.slice(0, amount.value);
const filter = () => {
const tagList = Object.entries(tags).filter(pair => pair[1].selected === true).map(pair => pair[0]);
if (tagList.length === 0) return items;
return items.filter(item => Array.isArray(item.tags) && tagList.every(tag => item.tags.includes(tag)));
const tagList = Object.entries(props.tags).filter(pair => pair[1].selected === true).map(pair => pair[0]);
if (tagList.length === 0) return props.items;
return props.items.filter(item => Array.isArray(item.tags) && tagList.every(tag => item.tags.includes(tag)));
};
// recompute filter when tags change
watch(tags, () => {
watch(props.tags, () => {
pages = filter();
key.value++;
});
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ However, it's best to just search for the repo you are looking for in the main [

## Issues, Questions and Support

If you have a question or would like some community support we recommend you [join us on Slack](https://launchpass.com/devwithlando). Note that this is the Slack community for [Lando](https://lando.dev) but we are more than happy to help with this module as well!
If you have a question or would like some community support we recommend you [join us on Slack](https://www.launchpass.com/devwithlando). Note that this is the Slack community for [Lando](https://lando.dev) but we are more than happy to help with this module as well!

If you'd like to report a bug or submit a feature request then please [use the issue queue](https://github.com/lando/docs/issues/new/choose) in this repo.

Expand Down
6 changes: 3 additions & 3 deletions contrib/coder.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ We are pretty [wild west](https://www.youtube.com/watch?v=_zXKtfKnfT8) on accept

* Create branches named something like `ISSUE-NUMBER-BRIEF-DESCRIPTION` for example `35-ssh-agent-feature`
* Create commit message named something like `#ISSUE-NUMBER: description` for example `#35: ensure socket is owned by you`
* [Associate your issue or issues with the PR](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue)
* [Associate your issue or issues with the PR](https://docs.github.com/en/issues/tracking-your-work-with-issues/using-issues/linking-a-pull-request-to-an-issue)

GitHub is able to do some magic with the above and provide better context around commits, issues, PRs and projects.

Expand Down Expand Up @@ -210,13 +210,13 @@ module.exports = lando => ({
More details about each key are listed as follows:
**command** - This is required and follows the [same syntax](https://yargs.js.org/docs/#api-reference-commandcmd-desc-builder-handler) as in [yargs](http://yargs.js.org/)
**command** - This is required and follows the same syntax as the `command` in [yargs](https://yargs.js.org/docs/)
**describe** - Just a basic string to describe your command
**level** - This corresponds to the needed Lando bootstrap level. Generally, it's fine to omit this but it's *safest* to set it to `app` if you are unsure about what to do.
**options** - Options follows the [same interface](https://yargs.js.org/docs/#api-reference-optionskey-opt) as in [yargs](http://yargs.js.org/) with one exception: `interactive`. `interactive` follows the [inquirer interface](https://github.com/SBoudrias/Inquirer.js) and does include the [autocomplete plugin](https://github.com/mokkabonna/inquirer-autocomplete-prompt). Lando also adds a `weight` property to `interface` so you can control the order with which interactive questions are asked.
**options** - Options follows the syntax as `options` as in [yargs](https://yargs.js.org/docs) with one exception: `interactive`. `interactive` follows the [inquirer interface](https://github.com/SBoudrias/Inquirer.js) and does include the [autocomplete plugin](https://github.com/mokkabonna/inquirer-autocomplete-prompt). Lando also adds a `weight` property to `interface` so you can control the order with which interactive questions are asked.
**run** - This is the function that will run when the task is invoked. Note that you have access to both `options` and `lando` here.
Expand Down
4 changes: 2 additions & 2 deletions contrib/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,12 @@ If you don't already have a GitHub issue or two in mind you can go through them

* [By maintainer projects](https://github.com/orgs/lando/projects)
* [By individual repo](https://github.com/orgs/lando/repositories)
* [By all issues in the org](https://github.com/issues?q=is%3Aopen+is%3Aissue+org%3Alando)
* [By all issues in the org](https://github.com/issues?q=is:open+is:issue+org:lando)

If you don't see one you can also [create your own](https://github.com/lando/lando/issues/new/choose). However once you have an issue or two in mind you will want to do possibly both of the below:

* **Label the issue with <Badge type="flag">flag</Badge>** - This will add it into the relevant contributor project board so a maintainer knows to discuss it in their next meeting.
* **Assign the issue to yourself** - If it's an issue you want to take on then [assign it](https://docs.github.com/en/issues/tracking-your-work-with-issues/assigning-issues-and-pull-requests-to-other-github-users) to yourself.
* **Assign the issue to yourself** - If it's an issue you want to take on then [assign it](https://docs.github.com/en/issues/tracking-your-work-with-issues/using-issues/assigning-issues-and-pull-requests-to-other-github-users) to yourself.

If you cannot label or assign an issue then we probably need to invite you to collaborate. To do that jump in the `#contributors` channel in Slack, post your issue and indicate you want to self-assign it and a maintainer will send you an invite.

Expand Down
4 changes: 2 additions & 2 deletions contrib/sponsoring.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@ Our highest two tiers are fairly customizable based around your needs. If you wo

We rely on third party sponsorship platforms to manage your sponsorship so you will want to terminate your sponsorship with them! For convenience, the relevant docs on how to do so for each of the platforms we support are shown below:

* [Cancel GitHub Sponsors Sponsorship](https://docs.github.com/en/billing/managing-billing-for-github-sponsors/downgrading-a-sponsorship)
* [Cancel Patreon Sponsorship](https://support.patreon.com/hc/en-us/articles/360000126286-How-to-edit-your-membership)
* [Cancel GitHub Sponsors Sponsorship](https://docs.github.com/en/billing/managing-billing-for-your-products/managing-billing-for-github-sponsors/downgrading-a-sponsorship)
* [Cancel Patreon Sponsorship](https://support.patreon.com/hc/en-us/articles/360000126286-Changing-your-tier)
* [Cancel OpenCollective Sponsorship](https://docs.opencollective.com/help/financial-contributors/organizations/organization-faq#can-i-cancel-or-change-my-contribution)

### How can I convince my boss or org to sponsor?
Expand Down
6 changes: 3 additions & 3 deletions guides/updating-to-rc2.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ services:
- '80'
```

Check out [this example](https://github.com/lando/core/tree/main/examples/services) which is tested on every build for some examples of new override syntax.
Check out [these examples](https://github.com/lando/core/tree/main/examples) which are tested on every build for some examples of new override syntax.

## Internal Service Name Changes

Expand Down Expand Up @@ -356,7 +356,7 @@ run:
- if [ ! -z $LANDO_MOUNT ]; then do-stuff; fi
```
Check out [this example](https://github.com/lando/core/tree/main/examples/services) which is tested on every build for some examples of new build step syntax.
Check out [theses examples](https://github.com/lando/core/tree/main/examples) which are tested on every build for some examples of new build step syntax.
## Global Environment Variables
Expand Down Expand Up @@ -489,7 +489,7 @@ WP_HOME=http://wpb4.test
WP_SITEURL=http://wpb4.test/wp
```

Check out [this example](https://github.com/lando/core/tree/main/examples/base) which is tested on every build for some examples of the new environment file syntax.
Check out [these example](https://github.com/lando/core/tree/main/examples) which are tested on every build for some examples of the new environment file syntax.

## Drush Handling

Expand Down
38 changes: 0 additions & 38 deletions guides/updating-to-v3.21.md

This file was deleted.

4 changes: 2 additions & 2 deletions help/proxy.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@ It is also a good practice to `.gitignore` the `env` file so you can set `proxy`

## Potential Docker driven solutions

* https://docs.docker.com/config/daemon/systemd/
* https://docs.docker.com/engine/daemon/proxy/
* https://www.cloudbees.com/blog/using-docker-behind-a-proxy
* https://docs.docker.com/network/proxy/
* https://docs.docker.com/engine/cli/proxy/
30 changes: 22 additions & 8 deletions netlify.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,28 @@
publish = ".vitepress/dist"
command = "npm run build"

[context.deploy-preview]
command = "npm run build"

# https://github.com/munter/netlify-plugin-checklinks#readme
[[context.deploy-preview.plugins]]
package = "netlify-plugin-checklinks"
[context.deploy-preview.plugins.inputs]
todoPatterns = [
"load",
"CHANGELOG.html",
"x.com",
"twitter.com",
"yargs.js.org/docs",
"https://github.com/issues",
"https://support.patreon.com",
"docs.google.com/document",
"docs.google.com/forms",
"/v/"
]
skipPatterns = [ ".rss", ".gif", ".jpg" ]
checkExternal = true

# Sets our asset optimization
[build.processing.css]
bundle = true
Expand All @@ -28,14 +50,6 @@
[plugins.inputs.audits]
output_path = "reports/lighthouse.html"

# https://github.com/munter/netlify-plugin-checklinks#readme
[[plugins]]
package = "netlify-plugin-checklinks"
[plugins.inputs]
todoPatterns = [ "load", "CHANGELOG.html", "x.com", "twitter.com", "302", "https://github.com/issues?q=" ]
skipPatterns = [ ".rss", ".gif", ".jpg" , "https://apps.microsoft.com", "https://github.com/lando/docs/edit", "https://yargs.js.org/docs", "https://support.patreon.com" ]
checkExternal = true

# REDIRECTS
# NOTE THAT REDIRECTS ARE EXECUTED FIRST COME FIRST SERVE
# Domain redirects
Expand Down
Loading

0 comments on commit 0ba2ece

Please sign in to comment.