Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Merge branch 'trunk' into release/1.78.1
# Conflicts:
#	bundle/ios/App.js
#	bundle/ios/App.js.map
#	gutenberg
  • Loading branch information
fluiddot committed Jun 17, 2022
commit f1b15b1e58e77fadf0b67765708268db33ede021
15 changes: 12 additions & 3 deletions RELEASE-NOTES.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
Unreleased
---
* [*] Add 'Insert from URL' option to Video block [https://github.com/wordpress-mobile/gutenberg-mobile/pull/4941]

## 1.78.1

- [**] Re-introduce support for v1 of the Gallery block to the native version of the editor [https://github.com/wordpress-mobile/gutenberg-mobile/pull/4928]
- [**] Fix missing translations for locales that include region (only on Android) [https://github.com/wordpress-mobile/gutenberg-mobile/pull/4950]
---
* [**] Re-introduce support for v1 of the Gallery block to the native version of the editor [https://github.com/wordpress-mobile/gutenberg-mobile/pull/4928]
* [**] Fix missing translations for locales that include region (only on Android) [https://github.com/wordpress-mobile/gutenberg-mobile/pull/4950]

## 1.78.0
---
Expand All @@ -19,6 +20,14 @@ Unreleased
* [*] [a11y] Improve text read by screen readers for BottomSheetSelectControl [https://github.com/wordpress-mobile/gutenberg-mobile/pull/4854]
* [*] Add 'Insert from URL' option to Image block [https://github.com/wordpress-mobile/gutenberg-mobile/pull/4779]

## 1.76.3
---
* [***] Fix crash on iOS related to JSI and Reanimated [https://github.com/WordPress/gutenberg/pull/41482]

## 1.76.2
---
* [*] Ensure post title gets focused when is notified from native side [https://github.com/WordPress/gutenberg/pull/41371]

## 1.76.1
---
* [*] BlockList - Add internal onLayout from CellRendererComponent to BlockListItemCell [https://github.com/wordpress-mobile/gutenberg-mobile/pull/4865]
Expand Down
27 changes: 27 additions & 0 deletions bin/install-jetpack.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/bin/bash
set -Eeuo pipefail

# Check if nvm is installed
[ -z "$NVM_DIR" ] && NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"

command -v nvm >/dev/null 2>&1 || {
echo "nvm is not installed or cannot be sourced from $NVM_DIR/nvm.sh. Please verify that "'$NVM_DIR'" points to the .nvm directory."
exit 1
}

pushd jetpack

# Set up node requirement for Jetpack
nvm install

# Set up required pnpm version
listed_pnpm_version=$(npx -c 'echo $npm_package_engines_pnpm')
pnpm_version=$(npx semver -c "$listed_pnpm_version")

cd projects/plugins/jetpack

# npx might prompt to install pnpm at the requested version. Let's just agree and carry on.
( yes || true ) | npx --cache /tmp/empty-cache pnpm@"$pnpm_version" install

popd
2 changes: 2 additions & 0 deletions bundle/android/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,8 @@ translators: %s: Select control option value e.g: "Auto, 25%". -->
<string name="gutenberg_native_ungroup" tools:ignore="UnusedResources">Ungroup</string>
<string name="gutenberg_native_unsupported" tools:ignore="UnusedResources">Unsupported</string>
<string name="gutenberg_native_updates_the_title" tools:ignore="UnusedResources">Updates the title.</string>
<string name="gutenberg_native_upgrade_your_plan_to_upload_audio" tools:ignore="UnusedResources">Upgrade your plan to upload audio</string>
<string name="gutenberg_native_upgrade_your_plan_to_use_video_covers" tools:ignore="UnusedResources">Upgrade your plan to use video covers</string>
<string name="gutenberg_native_uploading" tools:ignore="UnusedResources">Uploading…</string>
<string name="gutenberg_native_use_icon_button" tools:ignore="UnusedResources">Use icon button</string>
<!-- translators: accessibility text. Empty video caption. -->
Expand Down
1,903 changes: 956 additions & 947 deletions bundle/ios/App.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bundle/ios/App.js.map

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions bundle/ios/GutenbergNativeTranslations.swift
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,8 @@ private func dummy() {
_ = NSLocalizedString("Ungroup", comment: "")
_ = NSLocalizedString("Unsupported", comment: "")
_ = NSLocalizedString("Updates the title.", comment: "")
_ = NSLocalizedString("Upgrade your plan to upload audio", comment: "")
_ = NSLocalizedString("Upgrade your plan to use video covers", comment: "")
_ = NSLocalizedString("Uploading…", comment: "")
_ = NSLocalizedString("Use icon button", comment: "")
_ = NSLocalizedString("Video caption. %s", comment: "translators: accessibility text. %s: video caption.")
Expand Down
2 changes: 1 addition & 1 deletion jetpack
Submodule jetpack updated 4427 files
82 changes: 57 additions & 25 deletions metro.config.js
Original file line number Diff line number Diff line change
@@ -1,45 +1,77 @@
const path = require( 'path' );
const fs = require( 'fs' );
const metroResolver = require( 'metro-resolver' );

const gutenbergMetroConfig = require( './gutenberg/packages/react-native-editor/metro.config.js' );
const extraNodeModules = {};
const gutenbergMetroConfigCopy = {
...gutenbergMetroConfig,
resolver: {
...gutenbergMetroConfig.resolver,
sourceExts: [ 'js', 'jsx', 'json', 'scss', 'sass', 'ts', 'tsx' ],
extraNodeModules,
},
};

gutenbergMetroConfigCopy.resolver.extraNodeModules = new Proxy(
{},
{
get: ( target, name ) => {
// Try to find the module in the Gutenberg submodule.
const gutenbergFolder = path.join(
process.cwd(),
`gutenberg/node_modules/${ name }`
);
if ( fs.existsSync( gutenbergFolder ) ) {
return gutenbergFolder;
}
const nodeModulePaths = [
'gutenberg/node_modules',
'jetpack/projects/plugins/jetpack/node_modules',
];

const possibleModulePaths = ( name ) =>
nodeModulePaths.map( ( dir ) => path.join( process.cwd(), dir, name ) );

gutenbergMetroConfigCopy.resolver.resolveRequest = (
context,
moduleName,
platform
) => {
// Add the module to the extra node modules object if the module is not on a local path.
if ( ! ( moduleName.startsWith( '.' ) || moduleName.startsWith( '/' ) ) ) {
const [ namespace, module = '' ] = moduleName.split( '/' );
const name = path.join( namespace, module );

// Try to find the module in Jetpack's .pnpm folder.
const moduleFolderPnpm = path.join(
process.cwd(),
`./jetpack/node_modules/.pnpm/node_modules/${ name }`
if ( ! extraNodeModules[ name ] ) {
let extraNodeModulePath;

const modulePath = possibleModulePaths( name ).find(
fs.existsSync
);

if ( fs.existsSync( moduleFolderPnpm ) ) {
// pnpm uses symlinks so, let's find the target
const symlinkTarget = fs.readlinkSync( moduleFolderPnpm );
extraNodeModulePath = modulePath && fs.realpathSync( modulePath );

// If we haven't resolved the module yet, check if the module is managed by pnpm.
if (
! extraNodeModulePath &&
context.originModulePath.includes( '.pnpm' )
) {
const filePath = require.resolve( name, {
paths: [ path.dirname( context.originModulePath ) ],
} );

const innerNodeModules = filePath.match(
/.*node_modules/
)?.[ 0 ];

// the target is still using paths relative to the parent folder of the module, let's find the real path.
return path.resolve(
moduleFolderPnpm + '/../' + symlinkTarget
);
extraNodeModulePath =
innerNodeModules && path.join( innerNodeModules, name );
}
},

if ( extraNodeModulePath ) {
extraNodeModules[ name ] = extraNodeModulePath;
}
}
}
);

// Restore the original resolver
return metroResolver.resolve(
{
...context,
resolveRequest: null,
},
moduleName,
platform
);
};

module.exports = gutenbergMetroConfigCopy;
33 changes: 30 additions & 3 deletions package-lock.json

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

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,11 @@
"rungen": "^0.3.2",
"sprintf-js": "^1.1.1",
"typescript": "4.1.3",
"wd": "^1.11.1"
"wd": "^1.11.1",
"metro-resolver": "^0.70.3"
},
"scripts": {
"postinstall": "patch-package && npm ci --prefix gutenberg && npm run i18n:check-cache && cd jetpack/projects/plugins/jetpack && npx pnpm@6 install",
"postinstall": "patch-package && npm ci --prefix gutenberg && npm run i18n:check-cache && ./bin/install-jetpack.sh",
"start": "echo \"\\x1b[33mThe start command is not available in this project. It is strongly recommended to use \\x1b[1:33mstart:reset\\x1b[0m\\x1b[33m to perform some cleanup when starting the metro bundler.\nOr you may use \\x1b[1:33mstart:quick\\x1b[0m\\x1b[33m for a quicker startup, but this may lead to unexpected javascript errors when running the app.\\x1b[0m\"",
"start:reset": "npm run core clean:runtime && npm run start:quick -- --reset-cache",
"start:quick": "react-native start --config ./metro.config.js",
Expand Down Expand Up @@ -93,6 +94,5 @@
"lint": "eslint . --ext .js",
"lint:fix": "npm run lint -- --fix",
"version": "npm run bundle && git add -A bundle"
},
"dependencies": {}
}
}
You are viewing a condensed version of this merge commit. You can view the full changes here.