Skip to content

Commit

Permalink
update deps and optimize for midcore (#150)
Browse files Browse the repository at this point in the history
* update deps and optimize for midcore

* update deps and optimize for midcore part 2

* update deps and optimize for midcore part 3
  • Loading branch information
pirog authored Dec 9, 2024
1 parent 7025ff6 commit 0b9a8f0
Show file tree
Hide file tree
Showing 40 changed files with 2,138 additions and 1,840 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
4 changes: 2 additions & 2 deletions .github/workflows/pr-drupal-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ jobs:
- examples/drupal11
- examples/drupal11-nginx
lando-version:
- 3-edge-slim
- 3-edge
os:
- ubuntu-24.04
node-version:
- '18'
- '20'
steps:
- name: Checkout code
uses: actions/checkout@v4
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
2 changes: 1 addition & 1 deletion .github/workflows/pr-unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- ubuntu-24.04
- 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
2 changes: 2 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
.github
.nyc_output
coverage
docs
examples
guides
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
## {{ UNRELEASED_VERSION }} - [{{ UNRELEASED_DATE }}]({{ UNRELEASED_LINK }})

* Optimized for `midcore`
* Updated to [@lando/mariadb@1.6.3](https://github.com/lando/mariadb/releases/tag/v1.6.3).
* Updated to [@lando/mssql@1.4.3](https://github.com/lando/mssql/releases/tag/v1.4.3).
* Updated to [@lando/mysql@1.4.4](https://github.com/lando/mysql/releases/tag/v1.4.4).
* Updated to [@lando/php@1.6.3](https://github.com/lando/php/releases/tag/v1.6.3).
* Updated to [@lando/postgres@1.4.4](https://github.com/lando/postgres/releases/tag/v1.4.4).

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

* Updated the version index.md to get Docuverse page to build correctly.
Expand Down
2 changes: 1 addition & 1 deletion builders/_drupaly.js
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,6 @@ module.exports = {

// Send downstream
super(id, _.merge({}, config, options));
};
}
},
};
4 changes: 2 additions & 2 deletions builders/drupal-mariadb.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ const LandoMariadb = require('./../node_modules/@lando/mariadb/builders/mariadb.
module.exports = {
name: 'drupal-mariadb',
parent: '_service',
builder: (parent, config) => class DrupalMariadb extends LandoMariadb.builder(parent, LandoMariadb.config) {
builder: parent => class DrupalMariadb extends LandoMariadb.builder(parent, LandoMariadb.config) {
constructor(id, options = {}) {
super(id, options, {services: _.set({}, options.name)});
};
}
},
};
4 changes: 2 additions & 2 deletions builders/drupal-mssql.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ const LandoMssql = require('./../node_modules/@lando/mssql/builders/mssql.js');
module.exports = {
name: 'drupal-mssql',
parent: '_service',
builder: (parent, config) => class DrupalMssql extends LandoMssql.builder(parent, LandoMssql.config) {
builder: parent => class DrupalMssql extends LandoMssql.builder(parent, LandoMssql.config) {
constructor(id, options = {}) {
super(id, options, {services: _.set({}, options.name)});
};
}
},
};
4 changes: 2 additions & 2 deletions builders/drupal-mysql.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ const LandoMysql = require('./../node_modules/@lando/mysql/builders/mysql.js');
module.exports = {
name: 'drupal-mysql',
parent: '_service',
builder: (parent, config) => class DrupalMysql extends LandoMysql.builder(parent, LandoMysql.config) {
builder: parent => class DrupalMysql extends LandoMysql.builder(parent, LandoMysql.config) {
constructor(id, options = {}) {
super(id, options, {services: _.set({}, options.name)});
};
}
},
};
2 changes: 1 addition & 1 deletion builders/drupal-nginx.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ module.exports = {
builder: (parent, config) => class DrupalNginx extends PhpNginx.builder(parent, PhpNginx.config) {
constructor(id, options = {}) {
super(id, _.merge({}, config, options), {services: _.set({}, options.name)});
};
}
},
};
4 changes: 2 additions & 2 deletions builders/drupal-php.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ const loadScripts = options => {
module.exports = {
name: 'drupal-php',
parent: '_appserver',
builder: (parent, config) => class DrupalPhp extends LandoPhp.builder(parent, LandoPhp.config) {
builder: parent => class DrupalPhp extends LandoPhp.builder(parent, LandoPhp.config) {
constructor(id, options = {}, factory) {
loadScripts(options);
options.nginxServiceType = 'drupal-nginx';
super(id, options, factory);
};
}
},
};
4 changes: 2 additions & 2 deletions builders/drupal-postgres.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ const LandoPostgres = require('./../node_modules/@lando/postgres/builders/postgr
module.exports = {
name: 'drupal-postgres',
parent: '_service',
builder: (parent, config) => class DrupalPostgres extends LandoPostgres.builder(parent, LandoPostgres.config) {
builder: parent => class DrupalPostgres extends LandoPostgres.builder(parent, LandoPostgres.config) {
constructor(id, options = {}) {
super(id, options, {services: _.set({}, options.name)});
};
}
},
};
2 changes: 1 addition & 1 deletion builders/drupal10.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,6 @@ module.exports = {
}
// Send it downstream
super(id, options);
};
}
},
};
2 changes: 1 addition & 1 deletion builders/drupal11.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,6 @@ module.exports = {
}
// Send it downstream
super(id, options);
};
}
},
};
2 changes: 1 addition & 1 deletion builders/drupal6.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ module.exports = {
builder: (parent, config) => class LandoDrupal6 extends parent {
constructor(id, options = {}) {
super(id, _.merge({}, config, options));
};
}
},
};
2 changes: 1 addition & 1 deletion builders/drupal7.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ module.exports = {
builder: (parent, config) => class LandoDrupal7 extends parent {
constructor(id, options = {}) {
super(id, _.merge({}, config, options));
};
}
},
};
2 changes: 1 addition & 1 deletion builders/drupal8.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@ module.exports = {
}};
}
super(id, options);
};
}
},
};
2 changes: 1 addition & 1 deletion builders/drupal9.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,6 @@ module.exports = {

// Send it downstream
super(id, options);
};
}
},
};
2 changes: 1 addition & 1 deletion docs/.vitepress/config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export default defineConfig({
],
themeConfig: {
multiVersionBuild: {
satisfies: '>=1.1.0',
satisfies: '>=1.10.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 Drupal recipe.

# Configuration

While Lando [recipes](https://docs.lando.dev/core/v3/recipes.html) set sane defaults so they work out of the box they are also [configurable](https://docs.lando.dev/core/v3/recipes.html#config).
While Lando [recipes](https://docs.lando.dev/landofile/recipes.html) set sane defaults so they work out of the box they are also [configurable](https://docs.lando.dev/landofile/recipes.html#config).

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

```yaml
recipe: drupal9
Expand All @@ -26,7 +26,7 @@ config:
vhosts: SEE BELOW
```
Note that if the above config options are not enough all Lando recipes can be further [extended and overriden](https://docs.lando.dev/core/v3/recipes.html#extending-and-overriding-recipes).
Note that if the above config options are not enough all Lando recipes can be further [extended and overriden](https://docs.lando.dev/landofile/recipes.html#extending-and-overriding-recipes).
## Choosing a Drupal version
Expand All @@ -44,7 +44,7 @@ You can set `php` to any version that is available in our [php service](https://

However, you should consult the [Drupal requirements](https://www.drupal.org/docs/getting-started/system-requirements) to make sure that the version of `php` you choose is actually supported by the version of `drupal` you are running.

Here is the [recipe config](https://docs.lando.dev/core/v3/recipes.html#config) to set the Drupal 9 recipe to use `php` version `7.4`
Here is the [recipe config](https://docs.lando.dev/landofile/recipes.html#config) to set the Drupal 9 recipe to use `php` version `7.4`

```yaml
recipe: drupal9
Expand Down
22 changes: 14 additions & 8 deletions docs/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description: Learn how to develop and contribute to the Lando Drupal service

# Development

This guide contains information to help onboard developers to work on the [drupal](https://www.drupal.org/) integration, hereafter referred to as *the plugin*.
This guide contains information to help onboard developers to work on the [drupal](https://new.drupal.org/home) integration, hereafter referred to as *the plugin*.

## Requirements

Expand Down Expand Up @@ -91,25 +91,31 @@ npm run test:unit

We do end to end testing with our made-just-for-Lando testing framework [Leia](https://github.com/lando/leia). Leia allows us to define tests as a series of commented shell commands in human readable markdown files. Here is a simple example:

```md
Start up tests
--------------
````md
## Start up tests

```bash
# Should start up successfully
lando start
```

Verification commands
---------------------
## Verification commands

```bash
# Should be able to connect to all mariadb relationships
lando mariadb main -e "show tables;"
Destroy tests
-------------
# Should do something else
lando exec appserver -- some-command
```

## Destroy tests

```bash
# Should be able to destroy our app
lando destroy -y
```
````

Note that the headers here are important. The _Start up tests_ header specifies things that should run before the main series of tests. _Verification commands_ is the main body of tests and is required. _Destroy tests_ specifies any needed clean up commands to run.

Expand Down
4 changes: 2 additions & 2 deletions docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ description: Learn how to get started with the Lando Drupal recipe.
Before you get started with this recipe we assume that you have:

1. [Installed Lando](https://docs.lando.dev/getting-started/installation.html) and gotten familiar with [its basics](https://docs.lando.dev/cli/)
2. [Initialized](https://docs.lando.dev/cli/init.html) a [Landofile](https://docs.lando.dev/core/v3) for your codebase for use with this recipe
3. Read about the various [services](https://docs.lando.dev/core/v3/services/lando.html), [tooling](https://docs.lando.dev/core/v3/tooling.html), [events](https://docs.lando.dev/core/v3/events.html) and [routing](https://docs.lando.dev/core/v3/proxy.html) Lando offers.
2. [Initialized](https://docs.lando.dev/cli/init.html) a [Landofile](https://docs.lando.dev/landofile/) for your codebase for use with this recipe
3. Read about the various [services](https://docs.lando.dev/services/lando-3.html), [tooling](https://docs.lando.dev/landofile/tooling.html), [events](https://docs.lando.dev/landofile/events.html) and [routing](https://docs.lando.dev/landofile/proxy.html) Lando offers.

## Quick Start

Expand Down
2 changes: 1 addition & 1 deletion docs/legacy/drupal-6.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ config:

If you are using a webroot besides `.`, you will need to remember to `cd` into that directory and run `lando drush` from there. This is because many site-specific `drush` commands will only run correctly if you run `drush` from a directory that also contains a Drupal site.

If you are annoyed by having to `cd` into that directory every time you run a `drush` command, you can get around it by [overriding](https://docs.lando.dev/core/v3/tooling.html#overriding) the `drush` tooling command in your [Landofile](https://docs.lando.dev/core/v3) so that Drush always runs from your `webroot`.
If you are annoyed by having to `cd` into that directory every time you run a `drush` command, you can get around it by [overriding](https://docs.lando.dev/landofile/tooling.html#overriding) the `drush` tooling command in your [Landofile](https://docs.lando.dev/landofile/) so that Drush always runs from your `webroot`.

**Note that hard coding the `root` like this may have unforeseen and bad consequences for some `drush` commands such as `drush scr`.**

Expand Down
8 changes: 4 additions & 4 deletions docs/legacy/drupal-7.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ Because of how Lando's [php service](https://docs.lando.dev/plugins/php) sets up

Said more explicitly: **if you've required `drush` via `composer` in your application then this recipe will use your `drush` and not the one you've specified in this recipes config.**

If you are using a site-local Drush, it is also recommended to configure a [build step](https://docs.lando.dev/core/v3/services/lando.html#build-steps) to automatically install Drush before your app starts up. This can prevent weird version mismatches and other issues if you are using Drush in other Lando automation like [events](https://docs.lando.dev/core/v3/events.html).
If you are using a site-local Drush, it is also recommended to configure a [build step](https://docs.lando.dev/services/lando-3.html#build-steps) to automatically install Drush before your app starts up. This can prevent weird version mismatches and other issues if you are using Drush in other Lando automation like [events](https://docs.lando.dev/landofile/events.html).

**Automatically composer install before my app starts**

Expand All @@ -93,7 +93,7 @@ services:
- composer install
```

If you find that Lando is not using your `drush` as expected, which can happen if you've modified `composer` to install in a different directory than its normal `vendor` you can take advantage of Lando's [tooling overrides](https://docs.lando.dev/core/v3/tooling.html#overriding) and specify an absolute path to your Drush.
If you find that Lando is not using your `drush` as expected, which can happen if you've modified `composer` to install in a different directory than its normal `vendor` you can take advantage of Lando's [tooling overrides](https://docs.lando.dev/landofile/tooling.html#overriding) and specify an absolute path to your Drush.

```yaml
tooling:
Expand Down Expand Up @@ -132,7 +132,7 @@ Make sure the alias file exists within the drush folder in your app. An example

For info on how to set up your alias, please refer to the following [link](https://www.drupal.org/node/1401522) or see this [example](https://github.com/drush-ops/drush/blob/8.x/examples/example.aliases.drushrc.php).

Then configure the following [build step](https://docs.lando.dev/core/v3/services/lando.html#build-steps) in your [Landofile](https://docs.lando.dev/core/v3) and `lando rebuild`.
Then configure the following [build step](https://docs.lando.dev/services/lando-3.html#build-steps) in your [Landofile](https://docs.lando.dev/landofile/) and `lando rebuild`.

```yml
services:
Expand All @@ -146,7 +146,7 @@ services:

If you are using a webroot besides `.`, you will need to remember to `cd` into that directory and run `lando drush` from there. This is because many site-specific `drush` commands will only run correctly if you run `drush` from a directory that also contains a Drupal site.

If you are annoyed by having to `cd` into that directory every time you run a `drush` command, you can get around it by [overriding](https://docs.lando.dev/core/v3/tooling.html#overriding) the `drush` tooling command in your [Landofile](https://docs.lando.dev/core/v3) so that Drush always runs from your `webroot`.
If you are annoyed by having to `cd` into that directory every time you run a `drush` command, you can get around it by [overriding](https://docs.lando.dev/landofile/tooling.html#overriding) the `drush` tooling command in your [Landofile](https://docs.lando.dev/landofile/) so that Drush always runs from your `webroot`.

**Note that hard coding the `root` like this may have unforeseen and bad consequences for some `drush` commands such as `drush scr`.**

Expand Down
Loading

0 comments on commit 0b9a8f0

Please sign in to comment.