Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 15 additions & 15 deletions package-lock.json

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

1 change: 1 addition & 0 deletions packages/env/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
### Internal

- Update `@wp-playground/cli` to 3.1.56, which replaces the `fs-ext` optional dependency, compiled with `node-gyp` at install time, with `fs-ext-extra-prebuilt`, which ships prebuilt binaries and works without running install scripts ([#84012](https://github.com/WordPress/gutenberg/pull/84012)).
- Update `simple-git` to v4, which has better TypeScript support ([#84137](https://github.com/WordPress/gutenberg/pull/84137)).

## 11.16.0 (2026-09-23)

Expand Down
4 changes: 2 additions & 2 deletions packages/env/lib/download-sources.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const util = require( 'util' );
const pipeline = util.promisify( require( 'stream' ).pipeline );
const got = require( 'got' );
const AdmZip = require( 'adm-zip' );
const SimpleGit = require( 'simple-git' );
const { simpleGit } = require( 'simple-git' );
const { rimraf } = require( 'rimraf' );

/**
Expand Down Expand Up @@ -54,7 +54,7 @@ async function downloadGitSource( source, { onProgress, spinner, debug } ) {
};

log( 'Cloning or getting the repo.' );
const git = SimpleGit( { progress: progressHandler } );
const git = simpleGit( { progress: progressHandler } );

const isRepo =
fs.existsSync( source.clonePath ) &&
Expand Down
4 changes: 2 additions & 2 deletions packages/env/lib/runtime/docker/download-wp-phpunit.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';
const fs = require( 'fs' );
const path = require( 'path' );
const SimpleGit = require( 'simple-git' );
const { simpleGit } = require( 'simple-git' );

/**
* @typedef {import('./config').WPConfig} WPConfig
Expand Down Expand Up @@ -94,7 +94,7 @@ async function downloadTestSuite(
}

log( 'Cloning or getting the PHPUnit suite from GitHub.' );
const git = SimpleGit( { progress: progressHandler } );
const git = simpleGit( { progress: progressHandler } );

const isRepo =
fs.existsSync( directory ) &&
Expand Down
2 changes: 1 addition & 1 deletion packages/env/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
"js-yaml": "^3.15.2",
"ora": "^4.0.2",
"rimraf": "^5.0.10",
"simple-git": "^3.32.3",
"simple-git": "^4.0.2",
"yargs": "^17.3.0"
},
"devDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions tools/release/commands/common.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const semver = require( 'semver' );
const SimpleGit = require( 'simple-git' );
const { simpleGit } = require( 'simple-git' );
const { readJSONFile } = require( '../lib/utils' );

/**
Expand All @@ -11,7 +11,7 @@ const { readJSONFile } = require( '../lib/utils' );
* @return {string} Name of the plugin release branch.
*/
async function findPluginReleaseBranchName( gitWorkingDirectoryPath ) {
await SimpleGit( gitWorkingDirectoryPath )
await simpleGit( gitWorkingDirectoryPath )
.fetch( 'origin', 'trunk' )
.checkout( 'trunk' );

Expand Down
46 changes: 23 additions & 23 deletions tools/release/commands/packages.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const { command } = require( 'execa' );
const glob = require( 'fast-glob' );
const { inc: semverInc, parse: semverParse } = require( 'semver' );
const { rimraf } = require( 'rimraf' );
const SimpleGit = require( 'simple-git' );
const { simpleGit } = require( 'simple-git' );
const { log, formats } = require( '../lib/logger' );
const {
askForConfirmation,
Expand Down Expand Up @@ -95,7 +95,7 @@ async function checkoutNpmReleaseBranch( {
* Lerna assumes that all packages need publishing if it can't access
* the necessary information.
*/
await SimpleGit( gitWorkingDirectoryPath )
await simpleGit( gitWorkingDirectoryPath )
.fetch( 'origin', npmReleaseBranch, [ '--depth=999' ] )
.checkout( npmReleaseBranch );
log(
Expand Down Expand Up @@ -136,7 +136,7 @@ async function runNpmReleaseBranchSyncStep( pluginReleaseBranch, config ) {
`>> Syncing the latest plugin release to "${ pluginReleaseBranch }".`
);

const repo = SimpleGit( gitWorkingDirectoryPath );
const repo = simpleGit( gitWorkingDirectoryPath );

/*
* Replace content from remote branch.
Expand Down Expand Up @@ -316,7 +316,7 @@ async function updatePackages( config ) {
);
}

const { commit: commitHash } = await SimpleGit( gitWorkingDirectoryPath )
const { commit: commitHash } = await simpleGit( gitWorkingDirectoryPath )
.add( [ './*' ] )
.commit( 'Update changelog files' );

Expand Down Expand Up @@ -348,7 +348,7 @@ async function runPushGitChangesStep( {
abortMessage
);
}
await SimpleGit( gitWorkingDirectoryPath ).push(
await simpleGit( gitWorkingDirectoryPath ).push(
'origin',
npmReleaseBranch
);
Expand All @@ -368,7 +368,7 @@ async function runPushGitChangesStep( {
*/
async function getNpmReleasePackages( gitWorkingDirectoryPath, deps = {} ) {
const {
git = SimpleGit( gitWorkingDirectoryPath ),
git = simpleGit( gitWorkingDirectoryPath ),
globFn = glob,
readJSON = readJSONFile,
} = deps;
Expand Down Expand Up @@ -550,7 +550,7 @@ async function getRemoteBranchSha(
branchName,
deps = {}
) {
const { git = SimpleGit( gitWorkingDirectoryPath ) } = deps;
const { git = simpleGit( gitWorkingDirectoryPath ) } = deps;
const branchRef = `refs/heads/${ branchName }`;
const output = await git.raw( 'ls-remote', '--heads', 'origin', branchRef );
const matchingLine = output
Expand Down Expand Up @@ -580,7 +580,7 @@ async function isCommitOnRemoteBranch(
) {
const {
getRemoteBranchShaFn = getRemoteBranchSha,
git = SimpleGit( gitWorkingDirectoryPath ),
git = simpleGit( gitWorkingDirectoryPath ),
} = deps;
const remoteSha = await getRemoteBranchShaFn(
gitWorkingDirectoryPath,
Expand Down Expand Up @@ -612,7 +612,7 @@ async function isCommitOnRemoteBranch(
async function getRemoteTagShas(
gitWorkingDirectoryPath,
tagNames,
{ git = SimpleGit( gitWorkingDirectoryPath ) } = {}
{ git = simpleGit( gitWorkingDirectoryPath ) } = {}
) {
if ( tagNames.length === 0 ) {
return new Map();
Expand Down Expand Up @@ -864,7 +864,7 @@ async function pushNpmReleaseGitMetadata(
deps = {}
) {
const {
git = SimpleGit( gitWorkingDirectoryPath ),
git = simpleGit( gitWorkingDirectoryPath ),
isCommitOnRemoteBranchFn = isCommitOnRemoteBranch,
runPhase = runNpmReleasePhase,
verifyRemoteNpmReleaseBranchFn = verifyRemoteNpmReleaseBranch,
Expand Down Expand Up @@ -1000,7 +1000,7 @@ async function pushNpmReleasePreparedCommit(
},
deps = {}
) {
const { git = SimpleGit( gitWorkingDirectoryPath ) } = deps;
const { git = simpleGit( gitWorkingDirectoryPath ) } = deps;
const refs = getNpmReleasePreparedRefs( npmReleaseBranch );
log( '>> Persisting the prepared release state before publishing.' );
for ( const packageTagChunk of chunk(
Expand Down Expand Up @@ -1064,7 +1064,7 @@ async function getNpmReleasePreparedState(
preparedCommit,
deps = {}
) {
const { git = SimpleGit( gitWorkingDirectoryPath ) } = deps;
const { git = simpleGit( gitWorkingDirectoryPath ) } = deps;
const refs = getNpmReleasePreparedRefs( npmReleaseBranch );
const output = await git.raw(
'ls-remote',
Expand Down Expand Up @@ -1114,7 +1114,7 @@ async function getNpmReleasePreparedCommit(
npmReleaseBranch,
deps = {}
) {
const { git = SimpleGit( gitWorkingDirectoryPath ) } = deps;
const { git = simpleGit( gitWorkingDirectoryPath ) } = deps;
const refs = getNpmReleasePreparedRefs( npmReleaseBranch );
const output = await git.raw( 'ls-remote', 'origin', refs.commit );
const [ sha ] = output.trim().split( /\s+/ );
Expand All @@ -1136,7 +1136,7 @@ async function getNpmReleasePreparedTagNames(
npmReleaseBranch,
deps = {}
) {
const { git = SimpleGit( gitWorkingDirectoryPath ) } = deps;
const { git = simpleGit( gitWorkingDirectoryPath ) } = deps;
const refs = getNpmReleasePreparedRefs( npmReleaseBranch );
const output = await git.raw(
'ls-remote',
Expand Down Expand Up @@ -1164,7 +1164,7 @@ async function restoreNpmReleasePreparedTags(
npmReleaseBranch,
deps = {}
) {
const { git = SimpleGit( gitWorkingDirectoryPath ) } = deps;
const { git = simpleGit( gitWorkingDirectoryPath ) } = deps;
const refs = getNpmReleasePreparedRefs( npmReleaseBranch );
log( '>> Restoring the package tags prepared by the previous run.' );
await git.raw(
Expand All @@ -1188,7 +1188,7 @@ async function deleteNpmReleasePreparedCommit(
npmReleaseBranch,
deps = {}
) {
const { git = SimpleGit( gitWorkingDirectoryPath ) } = deps;
const { git = simpleGit( gitWorkingDirectoryPath ) } = deps;
const refs = getNpmReleasePreparedRefs( npmReleaseBranch );
const output = await git.raw(
'ls-remote',
Expand Down Expand Up @@ -1271,7 +1271,7 @@ async function isNpmReleaseGitMetadataPublished(
const {
getPreparedTagNamesFn = getNpmReleasePreparedTagNames,
getRemoteBranchShaFn = getRemoteBranchSha,
git = SimpleGit( gitWorkingDirectoryPath ),
git = simpleGit( gitWorkingDirectoryPath ),
isCommitOnRemoteBranchFn = isCommitOnRemoteBranch,
verifyRemotePackageTagsFn = verifyRemotePackageTags,
} = deps;
Expand Down Expand Up @@ -1356,7 +1356,7 @@ async function getNpmReleasePreparedChangelogCommit(
preparedCommit,
deps = {}
) {
const { git = SimpleGit( gitWorkingDirectoryPath ) } = deps;
const { git = simpleGit( gitWorkingDirectoryPath ) } = deps;
const output = await git.raw(
'show',
'--no-patch',
Expand Down Expand Up @@ -1404,7 +1404,7 @@ async function resumePreparedNpmRelease( config, deps = {} ) {
getPreparedCommitFn = getNpmReleasePreparedCommit,
getPreparedPluginReleaseBranchFn = getNpmReleasePreparedPluginBranch,
getPreparedStateFn = getNpmReleasePreparedState,
git = SimpleGit( config.gitWorkingDirectoryPath ),
git = simpleGit( config.gitWorkingDirectoryPath ),
isGitMetadataPublishedFn = isNpmReleaseGitMetadataPublished,
publishVersionedPackagesToNpmFn = publishVersionedPackagesToNpm,
restorePreparedTagsFn = restoreNpmReleasePreparedTags,
Expand Down Expand Up @@ -1548,7 +1548,7 @@ async function publishVersionedPackagesToNpm(
) {
const {
commandFn = command,
git = SimpleGit( gitWorkingDirectoryPath ),
git = simpleGit( gitWorkingDirectoryPath ),
getNpmReleasePackagesFn = getNpmReleasePackages,
pushNpmReleaseGitMetadataFn = pushNpmReleaseGitMetadata,
pushPreparedCommitFn = pushNpmReleasePreparedCommit,
Expand Down Expand Up @@ -1704,7 +1704,7 @@ async function publishPackagesToNpm(
) {
const {
commandFn = command,
git = SimpleGit( gitWorkingDirectoryPath ),
git = simpleGit( gitWorkingDirectoryPath ),
publishVersionedPackagesToNpmFn = publishVersionedPackagesToNpm,
} = deps;
await installNpmReleaseDependencies(
Expand Down Expand Up @@ -1908,7 +1908,7 @@ async function backportCommitsToBranch(

log( `>> Backporting commits to "${ branchName }".` );

const repo = SimpleGit( gitWorkingDirectoryPath );
const repo = simpleGit( gitWorkingDirectoryPath );

/*
* Reset any local changes and replace them with the origin branch's copy.
Expand Down Expand Up @@ -1996,7 +1996,7 @@ async function runPackagesRelease( config, customMessages, deps = {} ) {
config.abortMessage,
async () => {
log( '>> Cloning the Git repository' );
await SimpleGit().clone(
await simpleGit().clone(
pluginConfig.gitRepositoryURL,
gitPath,
[ '--depth=1', '--no-single-branch' ]
Expand Down
11 changes: 4 additions & 7 deletions tools/release/commands/performance.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const os = require( 'os' );
const fs = require( 'fs' );
const path = require( 'path' );
const SimpleGit = require( 'simple-git' );
const { simpleGit } = require( 'simple-git' );
const { formats, log } = require( '../lib/logger' );
const {
runShellScript,
Expand Down Expand Up @@ -320,8 +320,7 @@ async function runPerformanceTests( branches, options ) {
logAtIndent( 2, 'Creating directory:', formats.success( sourceDir ) );
fs.mkdirSync( sourceDir );

// @ts-expect-error The `simple-git` module namespace has no call signatures.
const sourceGit = SimpleGit( sourceDir );
const sourceGit = simpleGit( sourceDir );
logAtIndent(
2,
'Initializing:',
Expand Down Expand Up @@ -380,8 +379,7 @@ async function runPerformanceTests( branches, options ) {
'Checking out branch:',
formats.success( testRunnerBranch )
);
// @ts-expect-error The `simple-git` module namespace has no call signatures.
await SimpleGit( testRunnerDir ).raw( 'checkout', testRunnerBranch );
await simpleGit( testRunnerDir ).raw( 'checkout', testRunnerBranch );

logAtIndent( 2, 'Installing dependencies and building' );
await runShellScript(
Expand Down Expand Up @@ -466,8 +464,7 @@ async function runPerformanceTests( branches, options ) {
await runShellScript( `cp -R ${ sourceDir } ${ buildDir }` );

logAtIndent( 3, 'Checking out:', formats.success( branch ) );
// @ts-expect-error The `simple-git` module namespace has no call signatures.
await SimpleGit( buildDir ).raw( 'checkout', branch );
await simpleGit( buildDir ).raw( 'checkout', branch );

logAtIndent( 3, 'Installing dependencies and building' );
await runShellScript(
Expand Down
Loading
Loading