react-native-legal 1.6.3 → 1.6.5

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.
@@ -13,7 +13,7 @@ const utils_1 = require("./utils");
13
13
  async function addListActivity(androidProjectPath) {
14
14
  const androidManifestPath = path_1.default.join(androidProjectPath, 'app', 'src', 'main', 'AndroidManifest.xml');
15
15
  await (0, utils_1.modifyXMLFileContent)(androidManifestPath, (manifestObj) => {
16
- if (manifestObj.manifest.application?.[0].activity) {
16
+ if (manifestObj.manifest.application?.[0]?.activity) {
17
17
  manifestObj.manifest.application[0].activity = (0, android_1.addListActivityUtil)(manifestObj.manifest.application?.[0].activity);
18
18
  }
19
19
  return manifestObj;
@@ -9,7 +9,7 @@ exports.addToAllPbxResourcesBuildPhases = addToAllPbxResourcesBuildPhases;
9
9
  exports.getIOSProjectName = getIOSProjectName;
10
10
  exports.getIOSPbxProj = getIOSPbxProj;
11
11
  const node_path_1 = __importDefault(require("node:path"));
12
- const glob_1 = __importDefault(require("glob"));
12
+ const glob_1 = require("glob");
13
13
  const xcode_1 = __importDefault(require("xcode"));
14
14
  const ignoredPaths = ['**/@(Carthage|Pods|vendor|node_modules)/**'];
15
15
  /**
@@ -68,7 +68,7 @@ function addToAllPbxResourcesBuildPhases(pbxproj, pbxFile) {
68
68
  * Returns the name of the main group in the project (the main folder where `AppDelegate` usually lives)
69
69
  */
70
70
  function getIOSProjectName(iosProjectPath) {
71
- const [appDelegatePath] = glob_1.default.sync('*/AppDelegate.@(m|mm|swift)', {
71
+ const [appDelegatePath] = glob_1.glob.sync('*/AppDelegate.@(m|mm|swift)', {
72
72
  cwd: iosProjectPath,
73
73
  absolute: true,
74
74
  nocase: true,
@@ -81,7 +81,7 @@ function getIOSProjectName(iosProjectPath) {
81
81
  * Used to grab the XcodeProject instance
82
82
  */
83
83
  function getIOSPbxProj(iosProjectPath) {
84
- const [xcodeprojPath] = glob_1.default.sync('*.xcodeproj', {
84
+ const [xcodeprojPath] = glob_1.glob.sync('*.xcodeproj', {
85
85
  cwd: iosProjectPath,
86
86
  absolute: true,
87
87
  nocase: true,
@@ -11,7 +11,7 @@ export async function addListActivity(androidProjectPath: string) {
11
11
  const androidManifestPath = path.join(androidProjectPath, 'app', 'src', 'main', 'AndroidManifest.xml');
12
12
 
13
13
  await modifyXMLFileContent(androidManifestPath, (manifestObj) => {
14
- if (manifestObj.manifest.application?.[0].activity) {
14
+ if (manifestObj.manifest.application?.[0]?.activity) {
15
15
  manifestObj.manifest.application[0].activity = addListActivityUtil(
16
16
  manifestObj.manifest.application?.[0].activity,
17
17
  );
@@ -1,6 +1,6 @@
1
1
  import path from 'node:path';
2
2
 
3
- import glob from 'glob';
3
+ import { glob } from 'glob';
4
4
  import type { XcodeProject } from 'xcode';
5
5
  import xcode from 'xcode';
6
6
 
@@ -101,13 +101,13 @@ public class ReactNativeLegalModuleImpl: NSObject {
101
101
  .appendingPathExtension("plist")
102
102
 
103
103
  guard
104
- let data = parsePlistToDictArray(fileUrl: fileUrl),
105
- let item = data.first(where: { $0["FooterText"] != nil }),
106
- let footerText = item["FooterText"] as? String
104
+ let data = parsePlistToDictArray(fileUrl: fileUrl)
107
105
  else {
108
106
  return ReactNativeLegalLicenseMetadata(name: title)
109
107
  }
110
108
 
109
+ let footerText = data.compactMap { $0["FooterText"] as? String }.joined(separator: "\n")
110
+
111
111
  return ReactNativeLegalLicenseMetadata(name: title, content: footerText)
112
112
  }
113
113
  .filter { $0.name != nil }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-legal",
3
- "version": "1.6.3",
3
+ "version": "1.6.5",
4
4
  "description": "Acknowledge OSS libraries used in your React Native app",
5
5
  "keywords": [
6
6
  "react-native",
@@ -50,16 +50,17 @@
50
50
  },
51
51
  "devDependencies": {
52
52
  "@types/glob": "^8.1.0",
53
+ "@types/node": "^24",
53
54
  "@types/xml2js": "^0.4.11",
54
- "expo": "^54.0.0",
55
- "expo-module-scripts": "^5.0.7",
56
- "react": "19.1.0",
57
- "react-native": "0.81.4",
58
- "react-native-builder-bob": "0.40.13"
55
+ "expo": "^56.0.0",
56
+ "expo-module-scripts": "^56.0.0",
57
+ "react": "19.2.3",
58
+ "react-native": "0.85.3",
59
+ "react-native-builder-bob": "0.42.1"
59
60
  },
60
61
  "dependencies": {
61
- "@callstack/licenses": "^0.3.1",
62
- "glob": "^7.1.3",
62
+ "@callstack/licenses": "^0.3.3",
63
+ "glob": "^13.0.0",
63
64
  "xcode": "^3.0.1",
64
65
  "xml2js": "^0.6.2"
65
66
  },
@@ -8,7 +8,7 @@ const android_1 = require("../../../plugin-utils/build/android");
8
8
  */
9
9
  function addListActivity(config) {
10
10
  return (0, config_plugins_1.withAndroidManifest)(config, (exportedConfig) => {
11
- if (exportedConfig.modResults.manifest.application?.[0].activity) {
11
+ if (exportedConfig.modResults.manifest.application?.[0]?.activity) {
12
12
  exportedConfig.modResults.manifest.application[0].activity = (0, android_1.addListActivityUtil)(exportedConfig.modResults.manifest.application[0].activity);
13
13
  }
14
14
  return exportedConfig;
@@ -8,7 +8,7 @@ import { addListActivityUtil } from '../../../plugin-utils/build/android';
8
8
  */
9
9
  export function addListActivity(config: ExpoConfig): ExpoConfig {
10
10
  return withAndroidManifest(config, (exportedConfig) => {
11
- if (exportedConfig.modResults.manifest.application?.[0].activity) {
11
+ if (exportedConfig.modResults.manifest.application?.[0]?.activity) {
12
12
  exportedConfig.modResults.manifest.application[0].activity = addListActivityUtil(
13
13
  exportedConfig.modResults.manifest.application[0].activity,
14
14
  );
@@ -2,7 +2,8 @@
2
2
  "extends": "expo-module-scripts/tsconfig.plugin",
3
3
  "compilerOptions": {
4
4
  "outDir": "build",
5
- "rootDir": "src"
5
+ "rootDir": "src",
6
+ "types": ["node"]
6
7
  },
7
8
  "include": ["./src"],
8
9
  "exclude": ["**/__mocks__/*", "**/__tests__/*"]