mirror of
https://gitcode.com/github-mirrors/react-native-update-cli.git
synced 2025-09-16 09:41:38 +08:00
fix number format
This commit is contained in:
@@ -1,5 +1,17 @@
|
|||||||
export default {
|
export default {
|
||||||
updateNotifier:
|
updateNotifier:
|
||||||
'Run `{updateCommand}` to update the CLI to get continuous improvements in features, performance, and security.',
|
'Run `{updateCommand}` to update the CLI to get continuous improvements in features, performance, and security.',
|
||||||
loginFirst: 'Not logged in.\nPlease run `cresc login` in the project directory to login.',
|
loginFirst:
|
||||||
|
'Not logged in.\nPlease run `cresc login` in the project directory to login.',
|
||||||
|
lockNotFound:
|
||||||
|
'No lock file detected, which may cause inconsistent dependencies and hot-updating issues.',
|
||||||
|
multipleLocksFound:
|
||||||
|
'Multiple lock files detected ({lockFiles}), which may cause inconsistent dependencies and hot-updating issues.',
|
||||||
|
lockBestPractice: `
|
||||||
|
Best practices for lock files:
|
||||||
|
1. All members of the development team should use the same package manager to maintain a single lock file.
|
||||||
|
2. Add the lock file to version control (but do not commit multiple lock files of different formats).
|
||||||
|
3. Pay attention to changes in the lock file during code review.
|
||||||
|
This can reduce the risk of inconsistent dependencies and supply chain attacks.
|
||||||
|
`,
|
||||||
};
|
};
|
||||||
|
@@ -2,4 +2,15 @@ export default {
|
|||||||
updateNotifier:
|
updateNotifier:
|
||||||
'建议运行 `{updateCommand}` 来更新命令行工具以获得功能、性能和安全性的持续改进',
|
'建议运行 `{updateCommand}` 来更新命令行工具以获得功能、性能和安全性的持续改进',
|
||||||
loginFirst: '尚未登录。\n请在项目目录中运行`pushy login`命令来登录',
|
loginFirst: '尚未登录。\n请在项目目录中运行`pushy login`命令来登录',
|
||||||
|
lockNotFound:
|
||||||
|
'没有检测到任何 lock 文件,这可能导致依赖关系不一致而使热更异常。',
|
||||||
|
lockBestPractice: `
|
||||||
|
关于 lock 文件的最佳实践:
|
||||||
|
1. 开发团队中的所有成员应该使用相同的包管理器,维护同一份 lock 文件。
|
||||||
|
2. 将 lock 文件添加到版本控制中(但不要同时提交多种不同格式的 lock 文件)。
|
||||||
|
3. 代码审核时应关注 lock 文件的变化。
|
||||||
|
这样可以最大限度避免因依赖关系不一致而导致的热更异常,也降低供应链攻击等安全隐患。
|
||||||
|
`,
|
||||||
|
multipleLocksFound:
|
||||||
|
'检测到多种不同格式的锁文件({lockFiles}),这可能导致依赖关系不一致而使热更异常。',
|
||||||
};
|
};
|
||||||
|
@@ -6,7 +6,7 @@ export interface CommitInfo {
|
|||||||
hash: string;
|
hash: string;
|
||||||
message: string;
|
message: string;
|
||||||
author: string;
|
author: string;
|
||||||
date: number;
|
date: string;
|
||||||
origin: string;
|
origin: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -40,7 +40,7 @@ export async function getCommitInfo(): Promise<CommitInfo | undefined> {
|
|||||||
hash: oid,
|
hash: oid,
|
||||||
message: commit.message,
|
message: commit.message,
|
||||||
author: commit.author.name || commit.committer.name,
|
author: commit.author.name || commit.committer.name,
|
||||||
date: commit.committer.timestamp,
|
date: String(commit.committer.timestamp),
|
||||||
origin: origin.url,
|
origin: origin.url,
|
||||||
};
|
};
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
@@ -5,20 +5,3 @@ const lockFiles = [
|
|||||||
'bun.lockb',
|
'bun.lockb',
|
||||||
'bun.lock',
|
'bun.lock',
|
||||||
];
|
];
|
||||||
|
|
||||||
const lockNotFound = `
|
|
||||||
没有检测到任何 lock 文件,这可能导致依赖关系不一致而使热更异常。
|
|
||||||
`;
|
|
||||||
|
|
||||||
const multipleLocksFound = `
|
|
||||||
检测到多个锁文件(),这可能导致依赖关系不一致而使热更异常。
|
|
||||||
`;
|
|
||||||
|
|
||||||
|
|
||||||
const lockBestPractice = `
|
|
||||||
关于 lock 文件的最佳实践:
|
|
||||||
1. 开发团队中的所有成员应该使用相同的包管理器,维护同一份 lock 文件。
|
|
||||||
2. 将 lock 文件添加到版本控制中(但不要同时提交多种不同格式的 lock 文件)。
|
|
||||||
3. 代码审核时应关注 lock 文件的变化。
|
|
||||||
这样可以最大限度避免因依赖关系不一致而导致的热更异常,也降低供应链攻击等安全隐患。
|
|
||||||
`;
|
|
||||||
|
Reference in New Issue
Block a user