Skip to content

Commit f1b15b1

Browse files
committed
Merge branch 'trunk' into release/1.78.1
# Conflicts: # bundle/ios/App.js # bundle/ios/App.js.map # gutenberg
2 parents 47ab53e + f94206c commit f1b15b1

File tree

10 files changed

+1092
-984
lines changed

10 files changed

+1092
-984
lines changed

RELEASE-NOTES.txt

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
Unreleased
22
---
3+
* [*] Add 'Insert from URL' option to Video block [https://github.com/wordpress-mobile/gutenberg-mobile/pull/4941]
34

45
## 1.78.1
5-
6-
- [**] 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]
7-
- [**] Fix missing translations for locales that include region (only on Android) [https://github.com/wordpress-mobile/gutenberg-mobile/pull/4950]
6+
---
7+
* [**] 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]
8+
* [**] Fix missing translations for locales that include region (only on Android) [https://github.com/wordpress-mobile/gutenberg-mobile/pull/4950]
89

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

23+
## 1.76.3
24+
---
25+
* [***] Fix crash on iOS related to JSI and Reanimated [https://github.com/WordPress/gutenberg/pull/41482]
26+
27+
## 1.76.2
28+
---
29+
* [*] Ensure post title gets focused when is notified from native side [https://github.com/WordPress/gutenberg/pull/41371]
30+
2231
## 1.76.1
2332
---
2433
* [*] BlockList - Add internal onLayout from CellRendererComponent to BlockListItemCell [https://github.com/wordpress-mobile/gutenberg-mobile/pull/4865]

bin/install-jetpack.sh

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#!/bin/bash
2+
set -Eeuo pipefail
3+
4+
# Check if nvm is installed
5+
[ -z "$NVM_DIR" ] && NVM_DIR="$HOME/.nvm"
6+
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
7+
8+
command -v nvm >/dev/null 2>&1 || {
9+
echo "nvm is not installed or cannot be sourced from $NVM_DIR/nvm.sh. Please verify that "'$NVM_DIR'" points to the .nvm directory."
10+
exit 1
11+
}
12+
13+
pushd jetpack
14+
15+
# Set up node requirement for Jetpack
16+
nvm install
17+
18+
# Set up required pnpm version
19+
listed_pnpm_version=$(npx -c 'echo $npm_package_engines_pnpm')
20+
pnpm_version=$(npx semver -c "$listed_pnpm_version")
21+
22+
cd projects/plugins/jetpack
23+
24+
# npx might prompt to install pnpm at the requested version. Let's just agree and carry on.
25+
( yes || true ) | npx --cache /tmp/empty-cache pnpm@"$pnpm_version" install
26+
27+
popd

bundle/android/strings.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -346,6 +346,8 @@ translators: %s: Select control option value e.g: "Auto, 25%". -->
346346
<string name="gutenberg_native_ungroup" tools:ignore="UnusedResources">Ungroup</string>
347347
<string name="gutenberg_native_unsupported" tools:ignore="UnusedResources">Unsupported</string>
348348
<string name="gutenberg_native_updates_the_title" tools:ignore="UnusedResources">Updates the title.</string>
349+
<string name="gutenberg_native_upgrade_your_plan_to_upload_audio" tools:ignore="UnusedResources">Upgrade your plan to upload audio</string>
350+
<string name="gutenberg_native_upgrade_your_plan_to_use_video_covers" tools:ignore="UnusedResources">Upgrade your plan to use video covers</string>
349351
<string name="gutenberg_native_uploading" tools:ignore="UnusedResources">Uploading…</string>
350352
<string name="gutenberg_native_use_icon_button" tools:ignore="UnusedResources">Use icon button</string>
351353
<!-- translators: accessibility text. Empty video caption. -->

bundle/ios/App.js

Lines changed: 956 additions & 947 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bundle/ios/App.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bundle/ios/GutenbergNativeTranslations.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,8 @@ private func dummy() {
293293
_ = NSLocalizedString("Ungroup", comment: "")
294294
_ = NSLocalizedString("Unsupported", comment: "")
295295
_ = NSLocalizedString("Updates the title.", comment: "")
296+
_ = NSLocalizedString("Upgrade your plan to upload audio", comment: "")
297+
_ = NSLocalizedString("Upgrade your plan to use video covers", comment: "")
296298
_ = NSLocalizedString("Uploading…", comment: "")
297299
_ = NSLocalizedString("Use icon button", comment: "")
298300
_ = NSLocalizedString("Video caption. %s", comment: "translators: accessibility text. %s: video caption.")

jetpack

Submodule jetpack updated 4427 files

metro.config.js

Lines changed: 57 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,77 @@
11
const path = require( 'path' );
22
const fs = require( 'fs' );
3+
const metroResolver = require( 'metro-resolver' );
34

45
const gutenbergMetroConfig = require( './gutenberg/packages/react-native-editor/metro.config.js' );
6+
const extraNodeModules = {};
57
const gutenbergMetroConfigCopy = {
68
...gutenbergMetroConfig,
79
resolver: {
810
...gutenbergMetroConfig.resolver,
911
sourceExts: [ 'js', 'jsx', 'json', 'scss', 'sass', 'ts', 'tsx' ],
12+
extraNodeModules,
1013
},
1114
};
1215

13-
gutenbergMetroConfigCopy.resolver.extraNodeModules = new Proxy(
14-
{},
15-
{
16-
get: ( target, name ) => {
17-
// Try to find the module in the Gutenberg submodule.
18-
const gutenbergFolder = path.join(
19-
process.cwd(),
20-
`gutenberg/node_modules/${ name }`
21-
);
22-
if ( fs.existsSync( gutenbergFolder ) ) {
23-
return gutenbergFolder;
24-
}
16+
const nodeModulePaths = [
17+
'gutenberg/node_modules',
18+
'jetpack/projects/plugins/jetpack/node_modules',
19+
];
20+
21+
const possibleModulePaths = ( name ) =>
22+
nodeModulePaths.map( ( dir ) => path.join( process.cwd(), dir, name ) );
23+
24+
gutenbergMetroConfigCopy.resolver.resolveRequest = (
25+
context,
26+
moduleName,
27+
platform
28+
) => {
29+
// Add the module to the extra node modules object if the module is not on a local path.
30+
if ( ! ( moduleName.startsWith( '.' ) || moduleName.startsWith( '/' ) ) ) {
31+
const [ namespace, module = '' ] = moduleName.split( '/' );
32+
const name = path.join( namespace, module );
2533

26-
// Try to find the module in Jetpack's .pnpm folder.
27-
const moduleFolderPnpm = path.join(
28-
process.cwd(),
29-
`./jetpack/node_modules/.pnpm/node_modules/${ name }`
34+
if ( ! extraNodeModules[ name ] ) {
35+
let extraNodeModulePath;
36+
37+
const modulePath = possibleModulePaths( name ).find(
38+
fs.existsSync
3039
);
3140

32-
if ( fs.existsSync( moduleFolderPnpm ) ) {
33-
// pnpm uses symlinks so, let's find the target
34-
const symlinkTarget = fs.readlinkSync( moduleFolderPnpm );
41+
extraNodeModulePath = modulePath && fs.realpathSync( modulePath );
42+
43+
// If we haven't resolved the module yet, check if the module is managed by pnpm.
44+
if (
45+
! extraNodeModulePath &&
46+
context.originModulePath.includes( '.pnpm' )
47+
) {
48+
const filePath = require.resolve( name, {
49+
paths: [ path.dirname( context.originModulePath ) ],
50+
} );
51+
52+
const innerNodeModules = filePath.match(
53+
/.*node_modules/
54+
)?.[ 0 ];
3555

36-
// the target is still using paths relative to the parent folder of the module, let's find the real path.
37-
return path.resolve(
38-
moduleFolderPnpm + '/../' + symlinkTarget
39-
);
56+
extraNodeModulePath =
57+
innerNodeModules && path.join( innerNodeModules, name );
4058
}
41-
},
59+
60+
if ( extraNodeModulePath ) {
61+
extraNodeModules[ name ] = extraNodeModulePath;
62+
}
63+
}
4264
}
43-
);
65+
66+
// Restore the original resolver
67+
return metroResolver.resolve(
68+
{
69+
...context,
70+
resolveRequest: null,
71+
},
72+
moduleName,
73+
platform
74+
);
75+
};
4476

4577
module.exports = gutenbergMetroConfigCopy;

package-lock.json

Lines changed: 30 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,11 @@
5050
"rungen": "^0.3.2",
5151
"sprintf-js": "^1.1.1",
5252
"typescript": "4.1.3",
53-
"wd": "^1.11.1"
53+
"wd": "^1.11.1",
54+
"metro-resolver": "^0.70.3"
5455
},
5556
"scripts": {
56-
"postinstall": "patch-package && npm ci --prefix gutenberg && npm run i18n:check-cache && cd jetpack/projects/plugins/jetpack && npx pnpm@6 install",
57+
"postinstall": "patch-package && npm ci --prefix gutenberg && npm run i18n:check-cache && ./bin/install-jetpack.sh",
5758
"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\"",
5859
"start:reset": "npm run core clean:runtime && npm run start:quick -- --reset-cache",
5960
"start:quick": "react-native start --config ./metro.config.js",
@@ -93,6 +94,5 @@
9394
"lint": "eslint . --ext .js",
9495
"lint:fix": "npm run lint -- --fix",
9596
"version": "npm run bundle && git add -A bundle"
96-
},
97-
"dependencies": {}
97+
}
9898
}

0 commit comments

Comments
 (0)