expo-font 11.10.2 → 11.10.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -10,6 +10,12 @@
10
10
 
11
11
  ### 💡 Others
12
12
 
13
+ ## 11.10.3 — 2024-02-16
14
+
15
+ ### 🐛 Bug fixes
16
+
17
+ - Only include supported font files when using the plugin. ([#27002](https://github.com/expo/expo/pull/27002) by [@alanjhughes](https://github.com/alanjhughes))
18
+
13
19
  ## 11.10.2 — 2024-01-18
14
20
 
15
21
  _This version does not introduce any user-facing changes._
@@ -3,7 +3,7 @@ apply plugin: 'kotlin-android'
3
3
  apply plugin: 'maven-publish'
4
4
 
5
5
  group = 'host.exp.exponent'
6
- version = '11.10.2'
6
+ version = '11.10.3'
7
7
 
8
8
  def expoModulesCorePlugin = new File(project(":expo-modules-core").projectDir.absolutePath, "ExpoModulesCorePlugin.gradle")
9
9
  if (expoModulesCorePlugin.exists()) {
@@ -94,7 +94,7 @@ android {
94
94
  namespace "expo.modules.font"
95
95
  defaultConfig {
96
96
  versionCode 29
97
- versionName "11.10.2"
97
+ versionName "11.10.3"
98
98
  }
99
99
  }
100
100
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expo-font",
3
- "version": "11.10.2",
3
+ "version": "11.10.3",
4
4
  "description": "Load fonts at runtime and use them in React Native components.",
5
5
  "main": "build/index.js",
6
6
  "types": "build/index.d.ts",
@@ -42,5 +42,5 @@
42
42
  "peerDependencies": {
43
43
  "expo": "*"
44
44
  },
45
- "gitHead": "102899632731658eecba006c0d1c79b98ba8f5f7"
45
+ "gitHead": "6ceeb37fe2ccd9b290f9d717d9792c68487118b1"
46
46
  }
@@ -16,6 +16,8 @@ async function resolveFontPaths(fonts, projectRoot) {
16
16
  }
17
17
  return [resolvedPath];
18
18
  });
19
- return (await Promise.all(promises)).flat();
19
+ return (await Promise.all(promises))
20
+ .flat()
21
+ .filter((p) => p.endsWith('.ttf') || p.endsWith('.otf'));
20
22
  }
21
23
  exports.resolveFontPaths = resolveFontPaths;
@@ -17,7 +17,9 @@ const withFontsAndroid = (config, fonts) => {
17
17
  const fontsDir = path_1.default.join(config.modRequest.platformProjectRoot, 'app/src/main/assets/fonts');
18
18
  await promises_1.default.mkdir(fontsDir, { recursive: true });
19
19
  const output = path_1.default.join(fontsDir, path_1.default.basename(asset));
20
- await promises_1.default.copyFile(asset, output);
20
+ if (output.endsWith('.ttf') || output.endsWith('.otf')) {
21
+ await promises_1.default.copyFile(asset, output);
22
+ }
21
23
  }));
22
24
  return config;
23
25
  },
@@ -12,5 +12,7 @@ export async function resolveFontPaths(fonts: string[], projectRoot: string) {
12
12
  }
13
13
  return [resolvedPath];
14
14
  });
15
- return (await Promise.all(promises)).flat();
15
+ return (await Promise.all(promises))
16
+ .flat()
17
+ .filter((p) => p.endsWith('.ttf') || p.endsWith('.otf'));
16
18
  }
@@ -17,7 +17,9 @@ export const withFontsAndroid: ConfigPlugin<string[]> = (config, fonts) => {
17
17
  );
18
18
  await fs.mkdir(fontsDir, { recursive: true });
19
19
  const output = path.join(fontsDir, path.basename(asset));
20
- await fs.copyFile(asset, output);
20
+ if (output.endsWith('.ttf') || output.endsWith('.otf')) {
21
+ await fs.copyFile(asset, output);
22
+ }
21
23
  })
22
24
  );
23
25
  return config;