react-native-legal 1.3.0 → 1.3.1

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/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  <a href="https://www.callstack.com/open-source?utm_campaign=generic&utm_source=github&utm_medium=referral&utm_content=react-native-legal" align="center">
2
2
  <picture>
3
- <img alt="React Native Legal" src="./images/banner.jpg">
3
+ <img alt="React Native Legal" src="https://github.com/callstackincubator/react-native-legal/raw/refs/heads/main/images/rn-legal-banner.jpg">
4
4
  </picture>
5
5
  </a>
6
6
 
@@ -13,7 +13,7 @@
13
13
  ![Release](https://github.com/callstackincubator/react-native-legal/actions/workflows/release.yml/badge.svg)
14
14
  ![Deploy Docs](https://github.com/callstackincubator/react-native-legal/actions/workflows/deploy-docs.yml/badge.svg)
15
15
  ![Integration tests - License Kit (Node)](https://github.com/callstackincubator/react-native-legal/actions/workflows/test-integration-node.yml/badge.svg)
16
- ![Unit tests - React Native Legal Shared](https://github.com/callstackincubator/react-native-legal/actions/workflows/test-unit-shared.yml/badge.svg)
16
+ ![Unit tests - @callstack/licenses](https://github.com/callstackincubator/react-native-legal/actions/workflows/test-unit-licenses-api.yml/badge.svg)
17
17
  ![E2E tests - Android](https://github.com/callstackincubator/react-native-legal/actions/workflows/test-e2e-android.yaml/badge.svg)
18
18
  ![E2E tests - iOS](https://github.com/callstackincubator/react-native-legal/actions/workflows/test-e2e-ios.yaml/badge.svg)
19
19
 
@@ -71,13 +71,13 @@ npm i --save-dev license-kit
71
71
  ### Node.js - API
72
72
 
73
73
  ```sh
74
- yarn add -D @callstack/react-native-legal-shared
74
+ yarn add -D @callstack/licenses
75
75
  ```
76
76
 
77
77
  or
78
78
 
79
79
  ```sh
80
- npm i --save-dev @callstack/react-native-legal-shared
80
+ npm i --save-dev @callstack/licenses
81
81
  ```
82
82
 
83
83
  ## Usage
@@ -86,8 +86,8 @@ This tool is split into 4 parts:
86
86
 
87
87
  - a React Native library that lets you display native screen with a list of all dependencies and their licenses
88
88
  - an [Expo config plugin](https://docs.expo.dev/config-plugins/introduction/?redirected) (for Expo projects) and a [custom community cli plugin](https://github.com/react-native-community/cli/blob/main/docs/plugins.md) (for bare RN projects)
89
- - a standalone CLI tool that can be used in any Node.js project to generate license metadata
90
- - a shared package that exposes the core functionality of the license management tool, allowing customization of presentation logic in your Node.js scripts
89
+ - a standalone CLI tool that can be used in any Node.js project to generate license metadata (`license-kit`)
90
+ - a shared package that exposes the core functionality of the license management tool, allowing customization of presentation logic in your Node.js scripts (`@callstack/licenses`)
91
91
 
92
92
  ### I want to generate licenses in my Expo project <a name="usage-expo"></a>
93
93
 
@@ -181,7 +181,7 @@ For a list of supported flags and the default values, run `npx license-kit --hel
181
181
 
182
182
  ### I want to customize the presentation of the licenses in my JS/TS project
183
183
 
184
- You can use the `@callstack/react-native-legal-shared` package to access the core functionalities of the license management tool. To do so, please read the [programmatic usage documentation](https://callstackincubator.github.io/react-native-legal/docs/programmatic-usage#usage).
184
+ You can use the `@callstack/licenses` package to access the core functionalities of the license management tool. To do so, please read the [programmatic usage documentation](https://callstackincubator.github.io/react-native-legal/docs/programmatic-usage#usage).
185
185
 
186
186
  ## Expo
187
187
 
@@ -5,7 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.androidCommand = void 0;
7
7
  const path_1 = __importDefault(require("path"));
8
- const react_native_legal_shared_1 = require("@callstack/react-native-legal-shared");
8
+ const licenses_1 = require("@callstack/licenses");
9
9
  const addListActivity_1 = require("./addListActivity");
10
10
  const applyAndConfigureAboutLibrariesPlugin_1 = require("./applyAndConfigureAboutLibrariesPlugin");
11
11
  const declareAboutLibrariesPlugin_1 = require("./declareAboutLibrariesPlugin");
@@ -16,8 +16,8 @@ const declareAboutLibrariesPlugin_1 = require("./declareAboutLibrariesPlugin");
16
16
  * installs & configures AboutLibraries Gradle plugin and adds Android Activity with a list of dependencies and their licenses
17
17
  */
18
18
  function androidCommand(androidProjectPath) {
19
- const licenses = (0, react_native_legal_shared_1.scanDependencies)(path_1.default.join(path_1.default.resolve(androidProjectPath, '..'), 'package.json'));
20
- (0, react_native_legal_shared_1.writeAboutLibrariesNPMOutput)(licenses, androidProjectPath);
19
+ const licenses = (0, licenses_1.scanDependencies)(path_1.default.join(path_1.default.resolve(androidProjectPath, '..'), 'package.json'));
20
+ (0, licenses_1.writeAboutLibrariesNPMOutput)(licenses, androidProjectPath);
21
21
  (0, declareAboutLibrariesPlugin_1.declareAboutLibrariesPlugin)(androidProjectPath);
22
22
  (0, applyAndConfigureAboutLibrariesPlugin_1.applyAndConfigureAboutLibrariesPlugin)(androidProjectPath);
23
23
  (0, addListActivity_1.addListActivity)(androidProjectPath);
@@ -5,7 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.iosCommand = void 0;
7
7
  const path_1 = __importDefault(require("path"));
8
- const react_native_legal_shared_1 = require("@callstack/react-native-legal-shared");
8
+ const licenses_1 = require("@callstack/licenses");
9
9
  const addSettingsBundle_1 = require("./addSettingsBundle");
10
10
  const registerLicensePlistBuildPhase_1 = require("./registerLicensePlistBuildPhase");
11
11
  /**
@@ -15,8 +15,8 @@ const registerLicensePlistBuildPhase_1 = require("./registerLicensePlistBuildPha
15
15
  * configures Settings.bundle and registers a shell script generating LicensePlist metadata for iOS dependencies
16
16
  */
17
17
  function iosCommand(iosProjectPath) {
18
- const licenses = (0, react_native_legal_shared_1.scanDependencies)(path_1.default.join(path_1.default.resolve(iosProjectPath, '..'), 'package.json'));
19
- (0, react_native_legal_shared_1.writeLicensePlistNPMOutput)(licenses, iosProjectPath);
18
+ const licenses = (0, licenses_1.scanDependencies)(path_1.default.join(path_1.default.resolve(iosProjectPath, '..'), 'package.json'));
19
+ (0, licenses_1.writeLicensePlistNPMOutput)(licenses, iosProjectPath);
20
20
  (0, addSettingsBundle_1.addSettingsBundle)(iosProjectPath);
21
21
  (0, registerLicensePlistBuildPhase_1.registerLicensePlistBuildPhase)(iosProjectPath);
22
22
  }
@@ -1,6 +1,6 @@
1
1
  import path from 'path';
2
2
 
3
- import { scanDependencies, writeAboutLibrariesNPMOutput } from '@callstack/react-native-legal-shared';
3
+ import { scanDependencies, writeAboutLibrariesNPMOutput } from '@callstack/licenses';
4
4
 
5
5
  import { addListActivity } from './addListActivity';
6
6
  import { applyAndConfigureAboutLibrariesPlugin } from './applyAndConfigureAboutLibrariesPlugin';
@@ -1,6 +1,6 @@
1
1
  import path from 'path';
2
2
 
3
- import { scanDependencies, writeLicensePlistNPMOutput } from '@callstack/react-native-legal-shared';
3
+ import { scanDependencies, writeLicensePlistNPMOutput } from '@callstack/licenses';
4
4
 
5
5
  import { addSettingsBundle } from './addSettingsBundle';
6
6
  import { registerLicensePlistBuildPhase } from './registerLicensePlistBuildPhase';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-legal",
3
- "version": "1.3.0",
3
+ "version": "1.3.1",
4
4
  "description": "Acknowledge OSS libraries used in your React Native app",
5
5
  "keywords": [
6
6
  "react-native",
@@ -58,7 +58,7 @@
58
58
  "react-native-builder-bob": "0.23.1"
59
59
  },
60
60
  "dependencies": {
61
- "@callstack/react-native-legal-shared": "^0.2.0",
61
+ "@callstack/licenses": "^0.2.1",
62
62
  "glob": "^7.1.3",
63
63
  "xcode": "^3.0.1",
64
64
  "xml2js": "^0.6.2"
@@ -5,7 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.withAndroidLegal = void 0;
7
7
  const path_1 = __importDefault(require("path"));
8
- const react_native_legal_shared_1 = require("@callstack/react-native-legal-shared");
8
+ const licenses_1 = require("@callstack/licenses");
9
9
  const config_plugins_1 = require("expo/config-plugins");
10
10
  const addListActivity_1 = require("./addListActivity");
11
11
  const applyAndConfigureAboutLibrariesPlugin_1 = require("./applyAndConfigureAboutLibrariesPlugin");
@@ -18,8 +18,8 @@ const declareAboutLibrariesPlugin_1 = require("./declareAboutLibrariesPlugin");
18
18
  */
19
19
  const withAndroidLegal = (config) => {
20
20
  (0, config_plugins_1.withAndroidManifest)(config, async (exportedConfig) => {
21
- const licenses = (0, react_native_legal_shared_1.scanDependencies)(path_1.default.join(exportedConfig.modRequest.projectRoot, 'package.json'));
22
- (0, react_native_legal_shared_1.writeAboutLibrariesNPMOutput)(licenses, exportedConfig.modRequest.platformProjectRoot);
21
+ const licenses = (0, licenses_1.scanDependencies)(path_1.default.join(exportedConfig.modRequest.projectRoot, 'package.json'));
22
+ (0, licenses_1.writeAboutLibrariesNPMOutput)(licenses, exportedConfig.modRequest.platformProjectRoot);
23
23
  return exportedConfig;
24
24
  });
25
25
  config = (0, declareAboutLibrariesPlugin_1.declareAboutLibrariesPlugin)(config);
@@ -5,7 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.withIosLegal = void 0;
7
7
  const path_1 = __importDefault(require("path"));
8
- const react_native_legal_shared_1 = require("@callstack/react-native-legal-shared");
8
+ const licenses_1 = require("@callstack/licenses");
9
9
  const config_plugins_1 = require("expo/config-plugins");
10
10
  const addSettingsBundle_1 = require("./addSettingsBundle");
11
11
  const registerLicensePlistBuildPhase_1 = require("./registerLicensePlistBuildPhase");
@@ -17,8 +17,8 @@ const registerLicensePlistBuildPhase_1 = require("./registerLicensePlistBuildPha
17
17
  */
18
18
  const withIosLegal = (config) => {
19
19
  (0, config_plugins_1.withXcodeProject)(config, async (exportedConfig) => {
20
- const licenses = (0, react_native_legal_shared_1.scanDependencies)(path_1.default.join(exportedConfig.modRequest.projectRoot, 'package.json'));
21
- (0, react_native_legal_shared_1.writeLicensePlistNPMOutput)(licenses, exportedConfig.modRequest.platformProjectRoot);
20
+ const licenses = (0, licenses_1.scanDependencies)(path_1.default.join(exportedConfig.modRequest.projectRoot, 'package.json'));
21
+ (0, licenses_1.writeLicensePlistNPMOutput)(licenses, exportedConfig.modRequest.platformProjectRoot);
22
22
  return exportedConfig;
23
23
  });
24
24
  config = (0, addSettingsBundle_1.addSettingsBundle)(config);
@@ -1,6 +1,6 @@
1
1
  import path from 'path';
2
2
 
3
- import { scanDependencies, writeAboutLibrariesNPMOutput } from '@callstack/react-native-legal-shared';
3
+ import { scanDependencies, writeAboutLibrariesNPMOutput } from '@callstack/licenses';
4
4
  import { type ConfigPlugin, withAndroidManifest } from 'expo/config-plugins';
5
5
 
6
6
  import { addListActivity } from './addListActivity';
@@ -1,6 +1,6 @@
1
1
  import path from 'path';
2
2
 
3
- import { scanDependencies, writeLicensePlistNPMOutput } from '@callstack/react-native-legal-shared';
3
+ import { scanDependencies, writeLicensePlistNPMOutput } from '@callstack/licenses';
4
4
  import { type ConfigPlugin, withXcodeProject } from 'expo/config-plugins';
5
5
 
6
6
  import { addSettingsBundle } from './addSettingsBundle';
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.addListActivityUtil = exports.applyAndConfigureAboutLibrariesPluginUtil = exports.declareAboutLibrariesPluginUtil = void 0;
4
- const react_native_legal_shared_1 = require("@callstack/react-native-legal-shared");
4
+ const licenses_1 = require("@callstack/licenses");
5
5
  /**
6
6
  * Applies Gradle Plugin Portal & AboutLibraries Gradle plugin repositories (if needed) inside root build.gradle
7
7
  */
@@ -55,7 +55,7 @@ exports.applyAndConfigureAboutLibrariesPluginUtil = applyAndConfigureAboutLibrar
55
55
  */
56
56
  function addListActivityUtil(activities) {
57
57
  const listActivity = prepareListActivity();
58
- if (!react_native_legal_shared_1.MiscUtils.arrayIncludesObject(activities, listActivity)) {
58
+ if (!licenses_1.MiscUtils.arrayIncludesObject(activities, listActivity)) {
59
59
  activities?.push(listActivity);
60
60
  console.log('About Libraries activity - ADDED');
61
61
  }
@@ -1,4 +1,4 @@
1
- import { MiscUtils } from '@callstack/react-native-legal-shared';
1
+ import { MiscUtils } from '@callstack/licenses';
2
2
 
3
3
  /**
4
4
  * Applies Gradle Plugin Portal & AboutLibraries Gradle plugin repositories (if needed) inside root build.gradle