Skip to content

Commit

Permalink
optimized for midcore (#150)
Browse files Browse the repository at this point in the history
* optimized for midcore

* optimized for midcore part 2
  • Loading branch information
pirog authored Dec 7, 2024
1 parent 80ecbc8 commit bad8edd
Show file tree
Hide file tree
Showing 11 changed files with 48 additions and 23 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 .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
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
## {{ UNRELEASED_VERSION }} - [{{ UNRELEASED_DATE }}]({{ UNRELEASED_LINK }})

* Optimized for `midcore`

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

* Updated the version index.md to get Docuverse page to build correctly.
Expand Down
4 changes: 2 additions & 2 deletions builders/php-nginx.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ const LandoNginx = require('@lando/nginx/builders/nginx.js');
module.exports = {
name: 'php-nginx',
parent: '_webserver',
builder: (parent, config) => class PhpNginx extends LandoNginx.builder(parent, LandoNginx.config) {
builder: parent => class PhpNginx extends LandoNginx.builder(parent, LandoNginx.config) {
constructor(id, options = {}) {
super(id, options, {services: _.set({}, options.name)});
};
}
},
};
2 changes: 1 addition & 1 deletion builders/php.js
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,6 @@ module.exports = {
// Add in the php service and push downstream
options.sources.push({services: _.set({}, options.name, php)});
super(id, options, ..._.flatten(options.sources));
};
}
},
};
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.0.0',
satisfies: '>=1.6.0',
},
sidebar: sidebar(),
},
Expand Down
20 changes: 13 additions & 7 deletions docs/development.md
Original file line number Diff line number Diff line change
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
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 = () => {};
14 changes: 8 additions & 6 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"test": "npm run lint && npm run test:unit"
},
"dependencies": {
"@lando/nginx": "^1.4.1",
"@lando/nginx": "^1.4.4",
"lodash": "^4.17.21",
"semver": "^7.6.3"
},
Expand Down

0 comments on commit bad8edd

Please sign in to comment.