Skip to content

Commit

Permalink
Merge branch 'main' into feature/mysql-8-versions
Browse files Browse the repository at this point in the history
  • Loading branch information
lefte committed Dec 23, 2024
2 parents 6ad4c37 + 17df26a commit 169be13
Show file tree
Hide file tree
Showing 21 changed files with 71 additions and 72 deletions.
19 changes: 16 additions & 3 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,23 +1,36 @@
{
"env": {
"node": true,
"mocha": true
"mocha": true,
"es2021": true
},
"parser": "@babel/eslint-parser",
"parserOptions": {
"sourceType": "module",
"ecmaVersion": 8,
"requireConfigFile": false
},
"extends": "google",
"extends": [
"eslint:recommended",
"google"
],
"rules": {
"arrow-parens": ["error",
"as-needed"
],
"max-len": ["error", {
"code": 120,
"code": 140,
"ignoreComments": true
}],
"no-empty": ["error", {
"allowEmptyCatch": true
}],
"no-unused-vars": ["error", {
"vars": "all",
"args": "after-used",
"ignoreRestSiblings": false
}],

"require-jsdoc": ["error", {
"require": {
"FunctionDeclaration": true,
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr-docs-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
os:
- ubuntu-24.04
node-version:
- '18'
- '20'
steps:
# Install deps and cache
- name: Checkout code
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr-linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
os:
- ubuntu-24.04
node-version:
- '18'
- '20'
steps:
# Install deps and cache
- name: Checkout code
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pr-mysql-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ jobs:
os:
- ubuntu-24.04
node-version:
- '18'
- '20'
lando-version:
- 3-edge-slim
- 3-edge
leia-test:
- examples/5.7
- examples/8.0
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pr-unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ jobs:
os:
- windows-2022
- ubuntu-24.04
- macos-12
- macos-14
node-version:
- '18'
- '20'
steps:
# Install deps and cache
- name: Checkout code
Expand Down
2 changes: 1 addition & 1 deletion .node-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
18
20
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,18 @@
* Added support for MySQL 8.4
* Updated 8.0 to patch 40

## v1.4.4 - [December 7, 2024](https://github.com/lando/mysql/releases/tag/v1.4.4)

* Optimized for `midcore`

## v1.4.3 - [December 6, 2024](https://github.com/lando/mysql/releases/tag/v1.4.3)

* Updated the version index.md to get Docuverse page to build correctly.

## v1.4.2 - [December 4, 2024](https://github.com/lando/mysql/releases/tag/v1.4.2)

* Updated to [@lando/vitepress-theme-default-plus@v1.1.0-beta.24](https://github.com/lando/vitepress-theme-default-plus/releases/tag/v1.1.0-beta.24).

## v1.4.1 - [November 4, 2024](https://github.com/lando/mysql/releases/tag/v1.4.1)

* Updated to [@lando/vitepress-theme-default-plus@v1.1.0-beta.18](https://github.com/lando/vitepress-theme-default-plus/releases/tag/v1.1.0-beta.18).
Expand Down
3 changes: 1 addition & 2 deletions builders/mysql.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,8 @@ module.exports = {
],
};


// Send it downstream
super(id, options, {services: _.set({}, options.name, mysql)});
};
}
},
};
6 changes: 3 additions & 3 deletions docs/.vitepress/config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ const {name, version} = require('../../package.json');
const landoPlugin = name.replace('@lando/', '');

export default defineConfig({
title: 'Lando Mysql Plugin',
description: 'The offical Lando plugin for Mysql.',
title: 'Lando MySQL Plugin',
description: 'The offical Lando plugin for MySQL.',
landoDocs: 3,
landoPlugin,
version,
Expand All @@ -20,7 +20,7 @@ export default defineConfig({
],
themeConfig: {
multiVersionBuild: {
satisfies: '>=1.0.0',
satisfies: '>=1.4.0',
},
sidebar: sidebar(),
},
Expand Down
8 changes: 4 additions & 4 deletions docs/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ description: Learn how to configure the Lando MySQL service.

# Configuration

Here are the configuration options, set to the default values, for this service. If you are unsure about where this goes or what this means, we *highly recommend* scanning the [services documentation](https://docs.lando.dev/core/v3/services/lando.html) to get a good handle on how the magicks work.
Here are the configuration options, set to the default values, for this service. If you are unsure about where this goes or what this means, we *highly recommend* scanning the [services documentation](https://docs.lando.dev/services/lando-3.html) to get a good handle on how the magicks work.

Also note that options, in addition to the [build steps](https://docs.lando.dev/core/v3/services/lando.html#build-steps) and [overrides](https://docs.lando.dev/core/v3/services/lando.html#overrides) that are available to every service, are shown below:
Also note that options, in addition to the [build steps](https://docs.lando.dev/services/lando-3.html#build-steps) and [overrides](https://docs.lando.dev/services/lando-3.html#overrides) that are available to every service, are shown below:

::: warning Be careful when switching database type, version or credentials!
You should be careful switching database `type`, `version` or `creds`.
Expand Down Expand Up @@ -134,7 +134,7 @@ You can then invoke them on the command line.
lando dotnet
```

Lando tooling is actually pretty powerful so definitely check out [the rest](https://docs.lando.dev/core/v3/tooling.html) of its cool features.
Lando tooling is actually pretty powerful so definitely check out [the rest](https://docs.lando.dev/landofile/tooling.html) of its cool features.

## Adding routing

Expand All @@ -147,4 +147,4 @@ proxy:
- something.else.local
```

Lando proxying is actually pretty powerful so definitely check out [the rest](https://docs.lando.dev/core/v3/proxy.html) of its cool features.
Lando proxying is actually pretty powerful so definitely check out [the rest](https://docs.lando.dev/landofile/proxy.html) of its cool features.
6 changes: 3 additions & 3 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,20 @@ next: ./config.html

[MySQL](https://www.mysql.com/) is a very common database server.

You can easily add it to your Lando app by adding an entry to the [services](https://docs.lando.dev/core/v3/services/lando.html) top-level config in your [Landofile](https://docs.lando.dev/core/v3).
You can easily add it to your Lando app by adding an entry to the [services](https://docs.lando.dev/services/lando-3.html) top-level config in your [Landofile](https://docs.lando.dev/landofile/).

```yaml
services:
myservice:
type: mysql
type: mysql:8.0
```
## Supported versions
* [8.4](https://hub.docker.com/r/bitnami/mysql/tags?name=8.4.)
* [8.0](https://hub.docker.com/r/bitnami/mysql/tags?name=8.0.)
* **[5.7](https://hub.docker.com/r/bitnami/mysql/tags?name=5.7.)** **(default)**
* [custom](https://docs.lando.dev/core/v3/services/lando.html#overrides)
* [custom](https://docs.lando.dev/services/lando-3.html#overrides)
## Patch versions
Expand Down
5 changes: 2 additions & 3 deletions docs/v/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ prev: false
class="version-link"
>
<VPLVersionLink
:text="link.text"
:href="link.href"
:version="link.text"
:prerelease="link.prerelease"
:stable="link.stable"
:edge="link.edge"
Expand All @@ -29,7 +28,7 @@ prev: false
<br />

<div>
<VPLVersionLink :dev="true" :text="aliases.dev" :href="aliasLinks.dev" />
<VPLVersionLink :dev="true" :version="aliases.dev" />
</div>

<script setup>
Expand Down
2 changes: 1 addition & 1 deletion examples/5.7/.lando.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ services:
defaults:
type: mysql
patch:
type: mysql:5.7.24
type: mysql:5.7.41

# This is important because it lets lando know to test against the plugin in this repo
# DO NOT REMOVE THIS!
Expand Down
8 changes: 4 additions & 4 deletions examples/5.7/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ Verification commands
Run the following commands to validate things are rolling as they should.

```bash
# Should use 5.7.29 as the default version
lando ssh -s defaults -c "mysql --version | grep 5.7.43"
# Should use 5.7.43 as the default version
lando exec defaults -- mysql --version | grep 5.7.43

# Should use the patch version when set by the user
lando ssh -s patch -c "mysql --version | grep 5.7.24"
lando exec patch -- mysql --version | grep 5.7.41

# Should use the correct default user pass db
lando ssh -s defaults -c "mysql -umysql -pmysql database -e quit"
lando exec defaults -- mysql -umysql -pmysql database -e quit

# Should still be running even after a restart
lando restart
Expand Down
8 changes: 4 additions & 4 deletions examples/8.0/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,17 @@ Run the following commands to validate things are rolling as they should.

```bash
# Should use 8.4 as the default version
lando ssh -s defaults -c "mysql --version | grep 8.4.3"
lando exec defaults -- mysql --version | grep 8.4.3

# Should use the patch version when set by the user
lando ssh -s patch -c "mysql --version | grep 8.0.24"
lando exec patch -- mysql --version | grep 8.0.24

# Should use the correct default user pass db
lando ssh -s defaults -c "mysql -umysql -pmysql database -e quit"
lando exec defaults -- mysql -umysql -pmysql database -e quit

# Should still be running even after a restart
lando restart
lando ssh -s defaults -c "mysql -umysql -pmysql database -e quit"
lando exec defaults -- mysql -umysql -pmysql database -e quit
```

Destroy tests
Expand Down
6 changes: 3 additions & 3 deletions examples/custom/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ Verification commands
Run the following commands to validate things are rolling as they should.

```bash
# Should use the specified version when set by the user
lando ssh -s custom -c "mysql --version" | grep "8.0"
# Should use the specfied version when set by the user
lando exec custom -- mysql --version | grep "8.0"

# Should use the caching_sha2_password auth plugin by default for mysql8
lando mysql -u root -e "SELECT user,plugin FROM mysql.user;" | grep pirog | grep caching_sha2_password
Expand All @@ -32,7 +32,7 @@ lando mysql -u root -e "SELECT user,plugin FROM mysql.user;" | grep pirog | grep
lando mysql -u root -h custom_auth -e "SELECT user,plugin FROM mysql.user;" | grep mysql | grep mysql_native_password

# Should use the user provided creds if given
lando ssh -s custom -c "mysql -upirog -ppassword stuff -e quit"
lando exec custom -- mysql -upirog -ppassword stuff -e quit

# Should use a custom config file if specified
lando mysql -u root -e "show variables;" | grep table_open_cache | grep 513
Expand Down
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
'use strict';

module.exports = lando => {};
module.exports = () => {};
4 changes: 0 additions & 4 deletions netlify.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
skipPatterns = [ ".rss", ".gif", ".jpg" ]
checkExternal = true



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



# We need this so preview environments and the base site look ok on their own
[[redirects]]
from = "/"
Expand Down
35 changes: 8 additions & 27 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@lando/mysql",
"description": "A Lando plugin that provides a tight integration with MySQL.",
"version": "1.4.1",
"version": "1.4.4",
"author": "Mike Pirog @pirog",
"license": "GPL-3.0",
"repository": "lando/mysql",
Expand Down Expand Up @@ -43,13 +43,12 @@
"test": "npm run lint && npm run test:unit"
},
"dependencies": {
"@lando/mysql": "^1.1.0",
"lodash": "^4.17.21"
},
"devDependencies": {
"@babel/eslint-parser": "^7.16.0",
"@lando/leia": "^1.0.0-beta.3",
"@lando/vitepress-theme-default-plus": "^1.1.0-beta.23",
"@lando/vitepress-theme-default-plus": "^1.1.0-beta.24",
"chai": "^4.3.4",
"command-line-test": "^1.0.10",
"eslint": "^7.32.0",
Expand Down
Empty file removed tmpfile
Empty file.

0 comments on commit 169be13

Please sign in to comment.