ci: bump Node to v20 to satisfy Yarn (#3007)

This commit is contained in:
Tommy Nguyen 2024-03-18 13:19:51 +01:00 коммит произвёл GitHub
Родитель b612239e10
Коммит b9625034ad
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
54 изменённых файлов: 278 добавлений и 78 удалений

Просмотреть файл

@ -0,0 +1,6 @@
---
"@rnx-kit/cli": patch
"@rnx-kit/react-native-test-app-msal": patch
---
Removed unused files from the published package

7
.github/workflows/build.yml поставляемый
Просмотреть файл

@ -17,12 +17,11 @@ jobs:
fetch-depth: 0
- name: Setup the toolchain
uses: ./.github/actions/setup-toolchain
with:
# `npm pack` fails in pnpm mode when using npm 9+ (bundled with Node 18+)
# See also: https://github.com/npm/cli/issues/5007
node-version: "16"
- name: Install package dependencies
run: |
# `npm pack` fails in pnpm mode when using npm 9+ (bundled with Node 18+)
# because of symlinks. See: https://github.com/npm/cli/issues/5007
yarn config set nodeLinker node-modules
yarn
- name: Build and test packages
run: |

Просмотреть файл

@ -2,7 +2,7 @@ compressionLevel: 0
enableGlobalCache: false
enableScripts: false
enableTelemetry: false
globalFolder: ".yarn/berry" # Workaround for 'EXDEV: cross-device link not permitted' errors on GHA
globalFolder: .yarn/berry # Workaround for 'EXDEV: cross-device link not permitted' errors on GHA
logFilters:
- code: YN0007 # X must be built because it never has been before or the last one failed
level: discard

Просмотреть файл

@ -12,11 +12,11 @@
"RNWBatteryStatus.podspec",
"android/build.gradle",
"android/gradle.properties",
"android/src/*",
"ios/*",
"lib/*",
"macos/*",
"windows/*",
"android/src",
"ios",
"lib",
"macos",
"windows",
"react-native.config.js"
],
"main": "lib/index.js",

Просмотреть файл

@ -12,13 +12,13 @@
"RNWWebStorage.podspec",
"android/build.gradle",
"android/gradle.properties",
"android/src/*",
"ios/*",
"lib/*",
"macos/*",
"android/src",
"ios",
"lib",
"macos",
"react-native.config.js",
"src/*",
"windows/*"
"src",
"windows"
],
"main": "lib/index.js",
"types": "lib/index.d.ts",

Просмотреть файл

@ -10,7 +10,8 @@
"email": "microsoftopensource@users.noreply.github.com"
},
"files": [
"lib/**/*.{d.ts,js}"
"lib/**/*.d.ts",
"lib/**/*.js"
],
"type": "module",
"exports": {

Просмотреть файл

@ -10,9 +10,10 @@
"email": "microsoftopensource@users.noreply.github.com"
},
"files": [
"lib/**/*.{d.ts,js}",
"scripts/*",
"workflows/*"
"lib/**/*.d.ts",
"lib/**/*.js",
"scripts",
"workflows"
],
"type": "module",
"exports": {

Просмотреть файл

@ -9,7 +9,8 @@
"email": "microsoftopensource@users.noreply.github.com"
},
"files": [
"lib/*"
"lib/**/*.d.ts",
"lib/**/*.js"
],
"type": "module",
"exports": {

Просмотреть файл

@ -9,7 +9,8 @@
"email": "microsoftopensource@users.noreply.github.com"
},
"files": [
"lib/*"
"lib/**/*.d.ts",
"lib/**/*.js"
],
"main": "lib/index.js",
"types": "lib/index.d.ts",

Просмотреть файл

@ -5,6 +5,10 @@
"description": "Meta package for preventing packages from being installed",
"homepage": "https://github.com/microsoft/rnx-kit/tree/main/incubator/ignore#readme",
"license": "MIT",
"author": {
"name": "Microsoft Open Source",
"email": "microsoftopensource@users.noreply.github.com"
},
"files": [
"index.js"
],

Просмотреть файл

@ -10,7 +10,8 @@
"email": "microsoftopensource@users.noreply.github.com"
},
"files": [
"lib/*"
"lib/**/*.d.ts",
"lib/**/*.js"
],
"main": "lib/index.js",
"types": "lib/index.d.ts",

Просмотреть файл

@ -9,7 +9,8 @@
"email": "microsoftopensource@users.noreply.github.com"
},
"files": [
"lib/*"
"lib/**/*.d.ts",
"lib/**/*.js"
],
"main": "lib/index.js",
"types": "lib/index.d.ts",

Просмотреть файл

@ -9,7 +9,8 @@
"email": "microsoftopensource@users.noreply.github.com"
},
"files": [
"lib/*"
"lib/**/*.d.ts",
"lib/**/*.js"
],
"main": "lib/index.js",
"types": "lib/index.d.ts",

Просмотреть файл

@ -8,6 +8,13 @@
"name": "Microsoft Open Source",
"email": "microsoftopensource@users.noreply.github.com"
},
"files": [
"ReactTestApp-MSAL.podspec",
"android/build.gradle",
"android/gradle.properties",
"android/src",
"ios"
],
"repository": {
"type": "git",
"url": "https://github.com/microsoft/rnx-kit",

Просмотреть файл

@ -5,6 +5,10 @@
"description": "EXPERIMENTAL - USE WITH CAUTION - Generate a markdown-formatted list of changes between two version of react-native",
"homepage": "https://github.com/microsoft/rnx-kit/tree/main/incubator/rn-changelog-generator#readme",
"license": "MIT",
"author": {
"name": "Microsoft Open Source",
"email": "microsoftopensource@users.noreply.github.com"
},
"files": [
"lib/**/*.d.ts",
"lib/index.js"

Просмотреть файл

@ -4,6 +4,10 @@
"description": "Manage dependencies within a repository and across many repositories",
"homepage": "https://github.com/microsoft/rnx-kit/tree/main/packages/align-deps#readme",
"license": "MIT",
"author": {
"name": "Microsoft Open Source",
"email": "microsoftopensource@users.noreply.github.com"
},
"files": [
"lib/**/*.d.ts",
"lib/index.js"

Просмотреть файл

@ -4,8 +4,12 @@
"description": "Babel plugin for remapping 'lib/' imports to 'src/'",
"homepage": "https://github.com/microsoft/rnx-kit/tree/main/packages/babel-plugin-import-path-remapper#readme",
"license": "MIT",
"author": {
"name": "Microsoft Open Source",
"email": "microsoftopensource@users.noreply.github.com"
},
"files": [
"src/*"
"src"
],
"main": "src/index.js",
"repository": {

Просмотреть файл

@ -4,8 +4,12 @@
"description": "Babel preset for React Native applications",
"homepage": "https://github.com/microsoft/rnx-kit/tree/main/packages/babel-preset-metro-react-native#readme",
"license": "MIT",
"author": {
"name": "Microsoft Open Source",
"email": "microsoftopensource@users.noreply.github.com"
},
"files": [
"src/*"
"src"
],
"main": "src/index.js",
"repository": {

Просмотреть файл

@ -4,8 +4,13 @@
"description": "Simple tool for diffing the content of two bundles",
"homepage": "https://github.com/microsoft/rnx-kit/tree/main/packages/bundle-diff#readme",
"license": "MIT",
"author": {
"name": "Microsoft Open Source",
"email": "microsoftopensource@users.noreply.github.com"
},
"files": [
"lib/*"
"lib/**/*.d.ts",
"lib/**/*.js"
],
"main": "lib/index.js",
"types": "lib/index.d.ts",

Просмотреть файл

@ -4,6 +4,16 @@
"description": "Command-line interface for working with kit packages in your repo",
"homepage": "https://github.com/microsoft/rnx-kit/tree/main/packages/cli#readme",
"license": "MIT",
"author": {
"name": "Microsoft Open Source",
"email": "microsoftopensource@users.noreply.github.com"
},
"files": [
"lib/**/*.d.ts",
"lib/**/*.js",
"react-native.config.js",
"src"
],
"main": "lib/index.js",
"types": "lib/index.d.ts",
"exports": {

Просмотреть файл

@ -4,9 +4,14 @@
"description": "Define and query information about a kit package",
"homepage": "https://github.com/microsoft/rnx-kit/tree/main/packages/config#readme",
"license": "MIT",
"author": {
"name": "Microsoft Open Source",
"email": "microsoftopensource@users.noreply.github.com"
},
"files": [
"lib/*",
"src/*"
"lib/**/*.d.ts",
"lib/**/*.js",
"src"
],
"main": "lib/index.js",
"types": "lib/index.d.ts",

Просмотреть файл

@ -4,9 +4,14 @@
"description": "Simple console logger",
"homepage": "https://github.com/microsoft/rnx-kit/tree/main/packages/console#readme",
"license": "MIT",
"author": {
"name": "Microsoft Open Source",
"email": "microsoftopensource@users.noreply.github.com"
},
"files": [
"lib/*",
"src/*"
"lib/**/*.d.ts",
"lib/**/*.js",
"src"
],
"main": "lib/index.js",
"types": "lib/index.d.ts",

Просмотреть файл

@ -4,8 +4,13 @@
"description": "Esbuild plugin for remapping 'lib/' imports to 'src/'",
"homepage": "https://github.com/microsoft/rnx-kit/tree/main/packages/esbuild-plugin-import-path-remapper#readme",
"license": "MIT",
"author": {
"name": "Microsoft Open Source",
"email": "microsoftopensource@users.noreply.github.com"
},
"files": [
"lib/*"
"lib/**/*.d.ts",
"lib/**/*.js"
],
"main": "lib/index.js",
"types": "lib/index.d.ts",

Просмотреть файл

@ -5,6 +5,10 @@
"description": "Shareable ESLint config for @rnx-kit",
"homepage": "https://github.com/microsoft/rnx-kit/tree/main/packages/eslint-config#readme",
"license": "MIT",
"author": {
"name": "Microsoft Open Source",
"email": "microsoftopensource@users.noreply.github.com"
},
"files": [
"index.js"
],

Просмотреть файл

@ -11,8 +11,12 @@
],
"homepage": "https://github.com/microsoft/rnx-kit/tree/main/packages/eslint-plugin#readme",
"license": "MIT",
"author": {
"name": "Microsoft Open Source",
"email": "microsoftopensource@users.noreply.github.com"
},
"files": [
"src/*"
"src"
],
"main": "src/index.js",
"exports": {

Просмотреть файл

@ -4,9 +4,13 @@
"description": "Jest preset for React Native code bases",
"homepage": "https://github.com/microsoft/rnx-kit/tree/main/packages/jest-preset#readme",
"license": "MIT",
"author": {
"name": "Microsoft Open Source",
"email": "microsoftopensource@users.noreply.github.com"
},
"files": [
"jest-preset.js",
"src/*.js"
"src"
],
"main": "src/index.js",
"repository": {

Просмотреть файл

@ -7,7 +7,10 @@ function setFixture(name: string): void {
}
describe("jest-preset", () => {
const reactNativePath = path.sep + path.join("node_modules", "react-native");
const isPnpmMode = require
.resolve("react-native/package.json")
.includes(".store");
const reactNativeMacOSPath =
path.sep + path.join("__fixtures__", "react-native-macos");
const reactNativeMultiPlatformPath =
@ -23,15 +26,21 @@ describe("jest-preset", () => {
moduleNameMapper: {},
setupFiles: [
expect.stringMatching(
/[/\\]react-native.*?[/\\]package[/\\]jest[/\\]setup\.js$/
isPnpmMode
? /[/\\]react-native.*?[/\\]package[/\\]jest[/\\]setup\.js$/
: /[/\\]react-native.*?[/\\]jest[/\\]setup\.js$/
),
],
testEnvironment: expect.stringMatching(
/[/\\]react-native.*?[/\\]package[/\\]jest[/\\]react-native-env\.js$/
isPnpmMode
? /[/\\]react-native.*?[/\\]package[/\\]jest[/\\]react-native-env\.js$/
: /[/\\]react-native.*?[/\\]jest[/\\]react-native-env\.js$/
),
transform: {
"\\.(bmp|gif|jpg|jpeg|mp4|png|psd|svg|webp)$": expect.stringMatching(
/[/\\]react-native.*?[/\\]package[/\\]jest[/\\]assetFileTransformer\.js$/
isPnpmMode
? /[/\\]react-native.*?[/\\]package[/\\]jest[/\\]assetFileTransformer\.js$/
: /[/\\]react-native.*?[/\\]jest[/\\]assetFileTransformer\.js$/
),
"\\.[jt]sx?$": "babel-jest",
},
@ -141,7 +150,7 @@ describe("jest-preset", () => {
: "/";
process.chdir(root);
expect(() => jestPreset()).toThrowError(
expect(() => jestPreset()).toThrow(
"Failed to resolve current package root"
);
@ -162,10 +171,18 @@ describe("jest-preset", () => {
{
presets: [
[
expect.stringMatching(/[/\\]@babel-preset-env/),
expect.stringMatching(
isPnpmMode
? /[/\\]@babel-preset-env/
: /[/\\]@babel[/\\]preset-env/
),
{ targets: { node: "current" } },
],
expect.stringMatching(/[/\\]@babel-preset-typescript/),
expect.stringMatching(
isPnpmMode
? /[/\\]@babel-preset-typescript/
: /[/\\]@babel[/\\]preset-typescript/
),
],
},
],
@ -209,7 +226,7 @@ describe("jest-preset", () => {
test("throws if an unknown platform is targeted", () => {
const targetPlatform = "nextstep";
expect(() => jestPreset(targetPlatform)).toThrowError(
expect(() => jestPreset(targetPlatform)).toThrow(
`'${targetPlatform}' was not found`
);
});

Просмотреть файл

@ -4,8 +4,12 @@
"description": "Metro config for monorepos",
"homepage": "https://github.com/microsoft/rnx-kit/tree/main/packages/metro-config#readme",
"license": "MIT",
"author": {
"name": "Microsoft Open Source",
"email": "microsoftopensource@users.noreply.github.com"
},
"files": [
"src/*"
"src"
],
"main": "src/index.js",
"repository": {

Просмотреть файл

@ -4,8 +4,13 @@
"description": "Cyclic dependencies detector for Metro",
"homepage": "https://github.com/microsoft/rnx-kit/tree/main/packages/metro-plugin-cyclic-dependencies-detector#readme",
"license": "MIT",
"author": {
"name": "Microsoft Open Source",
"email": "microsoftopensource@users.noreply.github.com"
},
"files": [
"lib/*"
"lib/**/*.d.ts",
"lib/**/*.js"
],
"main": "lib/index.js",
"types": "lib/index.d.ts",

Просмотреть файл

@ -4,8 +4,13 @@
"description": "Duplicate packages checker",
"homepage": "https://github.com/microsoft/rnx-kit/tree/main/packages/metro-plugin-duplicates-checker#readme",
"license": "MIT",
"author": {
"name": "Microsoft Open Source",
"email": "microsoftopensource@users.noreply.github.com"
},
"files": [
"lib/*"
"lib/**/*.d.ts",
"lib/**/*.js"
],
"main": "lib/index.js",
"types": "lib/index.d.ts",

Просмотреть файл

@ -9,7 +9,8 @@
"email": "microsoftopensource@users.noreply.github.com"
},
"files": [
"lib/*"
"lib/**/*.d.ts",
"lib/**/*.js"
],
"main": "lib/index.js",
"types": "lib/index.d.ts",

Просмотреть файл

@ -4,6 +4,10 @@
"description": "Metro resolver with support for symlinks",
"homepage": "https://github.com/microsoft/rnx-kit/tree/main/packages/metro-resolver-symlinks#readme",
"license": "MIT",
"author": {
"name": "Microsoft Open Source",
"email": "microsoftopensource@users.noreply.github.com"
},
"files": [
"lib/**/*.d.ts",
"lib/**/*.js"

Просмотреть файл

@ -1,4 +1,7 @@
{
"name": "react-native",
"version": "1000.0"
"version": "1000.0",
"dependencies": {
"@react-native/community-cli-plugin": "main"
}
}

Просмотреть файл

@ -3,6 +3,7 @@ const {
makeMetroConfig,
resolveUniqueModule,
} = require("@rnx-kit/metro-config");
const fs = require("node:fs");
const path = require("node:path");
const { MetroSerializer, esbuildTransformerConfig } = require(".");
@ -56,5 +57,9 @@ module.exports = makeMetroConfig({
getPolyfills: () => [],
},
transformer: esbuildTransformerConfig,
watchFolders: [path.resolve("../../node_modules/.store")],
watchFolders: [
fs.existsSync("../../node_modules/.store")
? path.resolve("../../node_modules/.store")
: path.resolve("../../node_modules"),
],
});

Просмотреть файл

@ -4,8 +4,13 @@
"description": "esbuild serializer for Metro",
"homepage": "https://github.com/microsoft/rnx-kit/tree/main/packages/metro-serializer-esbuild#readme",
"license": "MIT",
"author": {
"name": "Microsoft Open Source",
"email": "microsoftopensource@users.noreply.github.com"
},
"files": [
"lib/*"
"lib/**/*.d.ts",
"lib/**/*.js"
],
"main": "lib/index.js",
"types": "lib/index.d.ts",

Просмотреть файл

@ -46,7 +46,9 @@ describe("metro-serializer-esbuild", () => {
},
{
root,
reactNativePath: path.resolve(root, "node_modules", "react-native"),
reactNativePath: path.dirname(
require.resolve("react-native/package.json")
),
dependencies: {},
commands: [],
healthChecks: [],

Просмотреть файл

@ -4,8 +4,13 @@
"description": "Metro's default JavaScript bundle serializer but with plugin support",
"homepage": "https://github.com/microsoft/rnx-kit/tree/main/packages/metro-serializer#readme",
"license": "MIT",
"author": {
"name": "Microsoft Open Source",
"email": "microsoftopensource@users.noreply.github.com"
},
"files": [
"lib/*"
"lib/**/*.d.ts",
"lib/**/*.js"
],
"main": "lib/index.js",
"types": "lib/index.d.ts",

Просмотреть файл

@ -4,8 +4,13 @@
"description": "Metro service for bundling and bundle-serving",
"homepage": "https://github.com/microsoft/rnx-kit/tree/main/packages/metro-service#readme",
"license": "MIT",
"author": {
"name": "Microsoft Open Source",
"email": "microsoftopensource@users.noreply.github.com"
},
"files": [
"lib/*"
"lib/**/*.d.ts",
"lib/**/*.js"
],
"main": "lib/index.js",
"types": "lib/index.d.ts",

Просмотреть файл

@ -10,7 +10,9 @@
},
"files": [
"RNXAuth.podspec",
"android/{build.gradle,gradle.properties,src}",
"android/build.gradle",
"android/gradle.properties",
"android/src",
"ios",
"lib"
],

Просмотреть файл

@ -10,8 +10,10 @@
},
"files": [
"ReactNativeHost.podspec",
"android/",
"cocoa/"
"android/build.gradle",
"android/gradle.properties",
"android/src",
"cocoa"
],
"repository": {
"type": "git",

Просмотреть файл

@ -19,8 +19,12 @@
],
"homepage": "https://github.com/microsoft/rnx-kit/tree/main/packages/react-native-lazy-index#readme",
"license": "MIT",
"author": {
"name": "Microsoft Open Source",
"email": "microsoftopensource@users.noreply.github.com"
},
"files": [
"src/*.js"
"src"
],
"main": "src/index.js",
"repository": {

Просмотреть файл

@ -10,7 +10,8 @@
"email": "microsoftopensource@users.noreply.github.com"
},
"files": [
"lib/*"
"lib/**/*.d.ts",
"lib/**/*.js"
],
"main": "lib/index.js",
"types": "lib/index.d.ts",

Просмотреть файл

@ -4,9 +4,14 @@
"description": "Library and tool to build a third party notices file based on a js bundle's source map",
"homepage": "https://github.com/microsoft/rnx-kit/tree/main/packages/third-party-notices#readme",
"license": "MIT",
"author": {
"name": "Microsoft Open Source",
"email": "microsoftopensource@users.noreply.github.com"
},
"files": [
"bin",
"lib"
"lib/**/*.d.ts",
"lib/**/*.js"
],
"main": "lib/index.js",
"types": "lib/index.d.ts",

Просмотреть файл

@ -95,7 +95,7 @@ describe("license", () => {
expect(JSON.parse(licenseText)).toEqual({
packages: [
{
copyright: "No copyright notice",
copyright: "Microsoft Open Source",
license: "MIT",
name: "@rnx-kit/console",
version: "1.2.3-fixedVersionForTesting",
@ -108,7 +108,7 @@ describe("license", () => {
version: "1.2.3-fixedVersionForTesting",
},
{
copyright: "No copyright notice",
copyright: "Microsoft Open Source",
license: "Unlicensed",
name: "private-package",
version: "1.0.0",

Просмотреть файл

@ -4,11 +4,16 @@
"description": "A collection of supplemental JavaScript functions and types",
"homepage": "https://github.com/microsoft/rnx-kit/tree/main/packages/tools-language#readme",
"license": "MIT",
"author": {
"name": "Microsoft Open Source",
"email": "microsoftopensource@users.noreply.github.com"
},
"files": [
"lib/*",
"lib/**/*.d.ts",
"lib/**/*.js",
"properties.d.ts",
"properties.js",
"src/*"
"src"
],
"main": "lib/index.js",
"types": "lib/index.d.ts",

Просмотреть файл

@ -4,15 +4,20 @@
"description": "A collection of supplemental NodeJS functions and types",
"homepage": "https://github.com/microsoft/rnx-kit/tree/main/packages/tools-node#readme",
"license": "MIT",
"author": {
"name": "Microsoft Open Source",
"email": "microsoftopensource@users.noreply.github.com"
},
"files": [
"lib/*",
"lib/**/*.d.ts",
"lib/**/*.js",
"module.d.ts",
"module.js",
"package.d.ts",
"package.js",
"path.d.ts",
"path.js",
"src/*"
"src"
],
"main": "lib/index.js",
"types": "lib/index.d.ts",

Просмотреть файл

@ -4,13 +4,18 @@
"description": "A collection of supplemental react-native functions and types",
"homepage": "https://github.com/microsoft/rnx-kit/tree/main/packages/tools-react-native#readme",
"license": "MIT",
"author": {
"name": "Microsoft Open Source",
"email": "microsoftopensource@users.noreply.github.com"
},
"files": [
"lib/*",
"lib/**/*.d.ts",
"lib/**/*.js",
"metro.d.ts",
"metro.js",
"platform.d.ts",
"platform.js",
"src/*"
"src"
],
"main": "lib/index.js",
"types": "lib/index.d.ts",

Просмотреть файл

@ -2,6 +2,7 @@ import {
findPackageDependencyDir,
readPackage,
} from "@rnx-kit/tools-node/package";
import * as fs from "fs";
type MetroImport =
| typeof import("metro")
@ -41,11 +42,17 @@ export function findMetroPath(projectRoot = process.cwd()): string | undefined {
return undefined;
}
// `metro` dependency was moved to `@react-native/community-cli-plugin` in 0.73
// https://github.com/facebook/react-native/commit/fdcb94ad1310af6613cfb2a2c3f22f200bfa1c86
const cliPluginDir = resolveFrom("@react-native/community-cli-plugin", rnDir);
if (cliPluginDir) {
return resolveFrom("metro", cliPluginDir);
const pkg = fs.readFileSync(`${rnDir}/package.json`, { encoding: "utf-8" });
if (pkg.includes("@react-native/community-cli-plugin")) {
// `metro` dependency was moved to `@react-native/community-cli-plugin` in 0.73
// https://github.com/facebook/react-native/commit/fdcb94ad1310af6613cfb2a2c3f22f200bfa1c86
const cliPluginDir = resolveFrom(
"@react-native/community-cli-plugin",
rnDir
);
if (cliPluginDir) {
return resolveFrom("metro", cliPluginDir);
}
}
const cliDir = resolveFrom("@react-native-community/cli", rnDir);

Просмотреть файл

@ -43,7 +43,7 @@ describe("requireModuleFromMetro", () => {
test("throws if `metro-resolver` cannot be found", () => {
const cwd = process.cwd();
const root = cwd.substring(0, cwd.indexOf(path.sep) + 1);
expect(() => getMetroResolver(root)(context, "", null)).toThrowError(
expect(() => getMetroResolver(root)(context, "", null)).toThrow(
"Cannot find module"
);
});

Просмотреть файл

@ -72,7 +72,7 @@ describe("React Native > Platform", () => {
});
test("parsePlatform() throws on failure", () => {
expect(() => parsePlatform("invalid")).toThrowError();
expect(() => parsePlatform("invalid")).toThrow();
});
test("platformExtensions() returns extensions", () => {

Просмотреть файл

@ -9,8 +9,9 @@
"email": "microsoftopensource@users.noreply.github.com"
},
"files": [
"lib/*",
"src/*"
"lib/**/*.d.ts",
"lib/**/*.js",
"src"
],
"main": "lib/index.js",
"types": "lib/index.d.ts",

Просмотреть файл

@ -9,6 +9,10 @@
],
"homepage": "https://github.com/microsoft/rnx-kit/tree/main/packages/tsconfig#readme",
"license": "MIT",
"author": {
"name": "Microsoft Open Source",
"email": "microsoftopensource@users.noreply.github.com"
},
"files": [
"tsconfig.esm.json",
"tsconfig.json"

Просмотреть файл

@ -4,8 +4,13 @@
"description": "TypeScript language services with support for custom module resolution",
"homepage": "https://github.com/microsoft/rnx-kit/tree/main/packages/typescript-service#readme",
"license": "MIT",
"author": {
"name": "Microsoft Open Source",
"email": "microsoftopensource@users.noreply.github.com"
},
"files": [
"lib/*"
"lib/**/*.d.ts",
"lib/**/*.js"
],
"main": "lib/index.js",
"types": "lib/index.d.ts",

Просмотреть файл

@ -2,6 +2,10 @@ import { spawnSync } from "node:child_process";
import * as fs from "node:fs";
import * as path from "node:path";
const defaultAuthor = {
name: "Microsoft Open Source",
email: "microsoftopensource@users.noreply.github.com",
};
const ignoredLocations = [".", "packages/test-app", "scripts"];
const options = { encoding: "utf-8" };
@ -28,7 +32,7 @@ fs.readFile("package.json", options, (err, data) => {
}
const manifest = JSON.parse(data);
const { homepage, repository } = manifest;
const { author, homepage, repository } = manifest;
const readmeUrl = `${origin.url}/tree/main/${location}#readme`;
if (homepage !== readmeUrl) {
@ -36,6 +40,14 @@ fs.readFile("package.json", options, (err, data) => {
manifest.homepage = readmeUrl;
}
if (
author?.name !== defaultAuthor.name ||
author?.email !== defaultAuthor.email
) {
needsUpdate = true;
manifest.author = defaultAuthor;
}
if (
repository?.type !== origin.type ||
repository?.url !== origin.url ||