Skip to content

Commit

Permalink
Merge branch 'trunk' into add/error-logs-url-media-import
Browse files Browse the repository at this point in the history
  • Loading branch information
ariskataoka authored May 3, 2024
2 parents 92c9ed5 + 1f4c9ee commit e9970c2
Show file tree
Hide file tree
Showing 12 changed files with 276 additions and 304 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
name: Review Dependencies
steps:
- name: Harden Runner
uses: step-security/[email protected].0
uses: step-security/[email protected].1
with:
egress-policy: block
allowed-endpoints: >
Expand All @@ -26,7 +26,7 @@ jobs:
uses: actions/[email protected]

- name: Review dependencies
uses: actions/dependency-review-action@v4.2.5
uses: actions/dependency-review-action@v4.3.2
with:
comment-summary-in-pr: true
show-openssf-scorecard: true
Expand Down
2 changes: 1 addition & 1 deletion __fixtures__/dev-env-e2e/instance_data_mariadb.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"wpTitle":"VIP Dev","multisite":false,"elasticsearch":false,"php":"ghcr.io/automattic/vip-container-images/php-fpm:8.0","mariadb":"10.3","mediaRedirectDomain":"","wordpress":{"mode":"image","tag":"6.1"},"muPlugins":{"mode":"image"},"appCode":{"mode":"image"},"phpmyadmin":false,"xdebug":false,"xdebugConfig":"","siteSlug":"vip-local","mailhog":false}
{"wpTitle":"VIP Dev","multisite":false,"elasticsearch":false,"php":"ghcr.io/automattic/vip-container-images/php-fpm:8.0","mariadb":"10.3","mediaRedirectDomain":"","wordpress":{"mode":"image","tag":"6.1"},"muPlugins":{"mode":"image"},"appCode":{"mode":"image"},"phpmyadmin":false,"xdebug":false,"xdebugConfig":"","siteSlug":"vip-local"}
10 changes: 10 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
## Changelog

### 2.39.5
* Custom Deploys: Pass in deploy token to StartCustomDeploy mutation and allow `getSignedUploadRequestData()` to accept another bearer token

**Full Changelog**: https://github.com/Automattic/vip-cli/compare/2.39.4...2.39.5

### 2.39.4
* Dev-env: Hotfix mysql 8.4 being incompatible due to auth plugin deprecation

**Full Changelog**: https://github.com/Automattic/vip-cli/compare/2.39.3...2.39.4

### 2.39.3

* Update/docs pt vip config
Expand Down
510 changes: 255 additions & 255 deletions npm-shrinkwrap.json

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@automattic/vip",
"version": "2.39.4",
"version": "2.39.6-dev.0",
"description": "The VIP Javascript library & CLI",
"main": "index.js",
"bin": {
Expand Down Expand Up @@ -107,9 +107,9 @@
"homepage": "https://github.com/Automattic/vip#readme",
"devDependencies": {
"@automattic/eslint-plugin-wpvip": "0.9.1",
"@babel/cli": "7.24.1",
"@babel/core": "7.24.4",
"@babel/preset-env": "7.24.4",
"@babel/cli": "7.24.5",
"@babel/core": "7.24.5",
"@babel/preset-env": "7.24.5",
"@babel/preset-typescript": "7.24.1",
"@jest/globals": "^29.7.0",
"@jest/test-sequencer": "^29.7.0",
Expand Down
3 changes: 0 additions & 3 deletions src/bin/vip-dev-env-create.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import {
handleCLIException,
validateDependencies,
processStringOrBooleanOption,
handleDeprecatedOptions,
processSlug,
} from '../lib/dev-environment/dev-environment-cli';
import {
Expand Down Expand Up @@ -99,8 +98,6 @@ cmd.argv( process.argv, async ( arg, opt ) => {

debug( 'Args: ', arg, 'Options: ', opt );

handleDeprecatedOptions( opt );

const trackingInfo = {
slug,
app: opt.app,
Expand Down
1 change: 0 additions & 1 deletion src/bin/vip-dev-env-shell.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ const userMap = {
memcached: 'memcache',
elasticsearch: 'elasticsearch',
phpmyadmin: 'www-data',
mailhog: 'mailhog',
mailpit: 'root',
photon: 'root',
};
Expand Down
5 changes: 1 addition & 4 deletions src/bin/vip-dev-env-update.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import {
getEnvTrackingInfo,
getEnvironmentName,
handleCLIException,
handleDeprecatedOptions,
processSlug,
promptForArguments,
validateDependencies,
Expand Down Expand Up @@ -53,8 +52,6 @@ cmd.examples( examples );
cmd.argv( process.argv, async ( arg, opt ) => {
const slug = await getEnvironmentName( opt );

handleDeprecatedOptions( opt );

const lando = await bootstrapLando();
await validateDependencies( lando, slug );

Expand Down Expand Up @@ -97,7 +94,7 @@ cmd.argv( process.argv, async ( arg, opt ) => {
mariadb: currentInstanceData.mariadb,
phpmyadmin: currentInstanceData.phpmyadmin,
xdebug: currentInstanceData.xdebug,
mailpit: currentInstanceData.mailpit ?? currentInstanceData.mailhog,
mailpit: currentInstanceData.mailpit,
photon: currentInstanceData.photon,
mediaRedirectDomain: currentInstanceData.mediaRedirectDomain,
multisite: false,
Expand Down
21 changes: 0 additions & 21 deletions src/lib/dev-environment/dev-environment-cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -857,12 +857,6 @@ export function addDevEnvConfigurationOptions( command: Args ): Args {
'Domain to redirect for missing media files. This can be used to still have images without the need to import them locally.'
)
.option( 'php', 'Explicitly choose PHP version to use', undefined, processVersionOption )
.option(
[ 'G', 'mailhog' ],
'Enable Mailpit. By default it is disabled (deprecated option, please use --mailpit instead)',
undefined,
processBooleanOption
)
.option(
[ 'A', 'mailpit' ],
'Enable Mailpit. By default it is disabled',
Expand Down Expand Up @@ -995,18 +989,3 @@ const getVSCodeExecutable = () => {
}
return null;
};

export function handleDeprecatedOptions( opts: Record< string, unknown > ): void {
if ( opts.mailhog ) {
console.warn(
chalk.yellow(
'Warning: --mailhog is deprecated and will be removed in a future release. Please use --mailpit instead.'
)
);
if ( opts.mailpit === undefined ) {
opts.mailpit = opts.mailhog;
}

delete opts.mailhog;
}
}
4 changes: 2 additions & 2 deletions src/lib/dev-environment/dev-environment-configuration-file.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ function sanitizeConfiguration(
elasticsearch: stringToBooleanIfDefined( configuration.elasticsearch ),
phpmyadmin: stringToBooleanIfDefined( configuration.phpmyadmin ),
xdebug: stringToBooleanIfDefined( configuration.xdebug ),
mailpit: stringToBooleanIfDefined( configuration.mailpit ?? configuration.mailhog ),
mailpit: stringToBooleanIfDefined( configuration.mailpit ),
'media-redirect-domain': configuration[ 'media-redirect-domain' ]?.toString(),
photon: stringToBooleanIfDefined( configuration.photon ),
meta: configurationMeta,
Expand Down Expand Up @@ -166,7 +166,7 @@ export function mergeConfigurationFileOptions(
phpmyadmin: configurationFileOptions.phpmyadmin,
xdebug: configurationFileOptions.xdebug,
xdebugConfig: configurationFileOptions[ 'xdebug-config' ],
mailpit: configurationFileOptions.mailpit ?? configurationFileOptions.mailhog,
mailpit: configurationFileOptions.mailpit,
mediaRedirectDomain: configurationFileOptions[ 'media-redirect-domain' ],
photon: configurationFileOptions.photon,
};
Expand Down
9 changes: 1 addition & 8 deletions src/lib/dev-environment/dev-environment-core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -224,9 +224,7 @@ function preProcessInstanceData( instanceData: InstanceData ): InstanceData {
}

// Mailpit migration
if ( ! newInstanceData.mailpit ) {
newInstanceData.mailpit = newInstanceData.mailhog ?? false;
}
newInstanceData.mailpit ??= false;

// MariaDB migration
if ( ! newInstanceData.mariadb ) {
Expand Down Expand Up @@ -447,11 +445,6 @@ export function readEnvironmentData( slug: string ): InstanceData {
instanceData.appCode = instanceData.clientCode as ComponentConfig;
}

if ( instanceData.mailhog ) {
instanceData.mailpit = instanceData.mailhog;
delete instanceData.mailhog;
}

return instanceData;
}

Expand Down
3 changes: 0 additions & 3 deletions src/lib/dev-environment/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ export interface InstanceOptions {
phpmyadmin?: boolean;
xdebug?: boolean;
xdebugConfig?: string;
mailhog?: boolean; // Legacy
mailpit?: boolean;
photon?: boolean;

Expand Down Expand Up @@ -69,7 +68,6 @@ export interface ConfigurationFileOptions {
phpmyadmin?: boolean;
xdebug?: boolean;
'xdebug-config'?: string;
mailhog?: boolean; // Legacy
mailpit?: boolean;
'media-redirect-domain'?: string;
photon?: boolean;
Expand Down Expand Up @@ -97,7 +95,6 @@ export interface InstanceData {
mariadb?: string; // Legacy
php: string;
elasticsearch?: string | boolean;
mailhog?: boolean; // Legacy
mailpit: boolean;
photon: boolean;
pullAfter?: number;
Expand Down

0 comments on commit e9970c2

Please sign in to comment.