rush.json 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469
  1. /**
  2. * This is the main configuration file for Rush.
  3. * For full documentation, please see https://rushjs.io
  4. */
  5. {
  6. "$schema": "https://developer.microsoft.com/json-schemas/rush/v5/rush.schema.json",
  7. /**
  8. * (Required) This specifies the version of the Rush engine to be used in this repo.
  9. * Rush's "version selector" feature ensures that the globally installed tool will
  10. * behave like this release, regardless of which version is installed globally.
  11. *
  12. * The common/scripts/install-run-rush.js automation script also uses this version.
  13. *
  14. * NOTE: If you upgrade to a new major version of Rush, you should replace the "v5"
  15. * path segment in the "$schema" field for all your Rush config files. This will ensure
  16. * correct error-underlining and tab-completion for editors such as VS Code.
  17. */
  18. "rushVersion": "5.83.1",
  19. /**
  20. * The next field selects which package manager should be installed and determines its version.
  21. * Rush installs its own local copy of the package manager to ensure that your build process
  22. * is fully isolated from whatever tools are present in the local environment.
  23. *
  24. * Specify one of: "pnpmVersion", "npmVersion", or "yarnVersion". See the Rush documentation
  25. * for details about these alternatives.
  26. */
  27. "pnpmVersion": "7.15.0",
  28. // "npmVersion": "6.14.15",
  29. // "yarnVersion": "1.9.4",
  30. /**
  31. * Older releases of the Node.js engine may be missing features required by your system.
  32. * Other releases may have bugs. In particular, the "latest" version will not be a
  33. * Long Term Support (LTS) version and is likely to have regressions.
  34. *
  35. * Specify a SemVer range to ensure developers use a Node.js version that is appropriate
  36. * for your repo.
  37. *
  38. * LTS schedule: https://nodejs.org/en/about/releases/
  39. * LTS versions: https://nodejs.org/en/download/releases/
  40. */
  41. "nodeSupportedVersionRange": ">=16.13.0 <17.0.0 || >= 18.0.0 <19.0.0",
  42. /**
  43. * Odd-numbered major versions of Node.js are experimental. Even-numbered releases
  44. * spend six months in a stabilization period before the first Long Term Support (LTS) version.
  45. * For example, 8.9.0 was the first LTS version of Node.js 8. Pre-LTS versions are not recommended
  46. * for production usage because they frequently have bugs. They may cause Rush itself
  47. * to malfunction.
  48. *
  49. * Rush normally prints a warning if it detects a pre-LTS Node.js version. If you are testing
  50. * pre-LTS versions in preparation for supporting the first LTS version, you can use this setting
  51. * to disable Rush's warning.
  52. */
  53. // "suppressNodeLtsWarning": false,
  54. /**
  55. * If you would like the version specifiers for your dependencies to be consistent, then
  56. * uncomment this line. This is effectively similar to running "rush check" before any
  57. * of the following commands:
  58. *
  59. * rush install, rush update, rush link, rush version, rush publish
  60. *
  61. * In some cases you may want this turned on, but need to allow certain packages to use a different
  62. * version. In those cases, you will need to add an entry to the "allowedAlternativeVersions"
  63. * section of the common-versions.json.
  64. */
  65. "ensureConsistentVersions": true,
  66. /**
  67. * Large monorepos can become intimidating for newcomers if project folder paths don't follow
  68. * a consistent and recognizable pattern. When the system allows nested folder trees,
  69. * we've found that teams will often use subfolders to create islands that isolate
  70. * their work from others ("shipping the org"). This hinders collaboration and code sharing.
  71. *
  72. * The Rush developers recommend a "category folder" model, where buildable project folders
  73. * must always be exactly two levels below the repo root. The parent folder acts as the category.
  74. * This provides a basic facility for grouping related projects (e.g. "apps", "libraries",
  75. * "tools", "prototypes") while still encouraging teams to organize their projects into
  76. * a unified taxonomy. Limiting to 2 levels seems very restrictive at first, but if you have
  77. * 20 categories and 20 projects in each category, this scheme can easily accommodate hundreds
  78. * of projects. In practice, you will find that the folder hierarchy needs to be rebalanced
  79. * occasionally, but if that's painful, it's a warning sign that your development style may
  80. * discourage refactoring. Reorganizing the categories should be an enlightening discussion
  81. * that brings people together, and maybe also identifies poor coding practices (e.g. file
  82. * references that reach into other project's folders without using Node.js module resolution).
  83. *
  84. * The defaults are projectFolderMinDepth=1 and projectFolderMaxDepth=2.
  85. *
  86. * To remove these restrictions, you could set projectFolderMinDepth=1
  87. * and set projectFolderMaxDepth to a large number.
  88. */
  89. "projectFolderMinDepth": 2,
  90. "projectFolderMaxDepth": 2,
  91. /**
  92. * Today the npmjs.com registry enforces fairly strict naming rules for packages, but in the early
  93. * days there was no standard and hardly any enforcement. A few large legacy projects are still using
  94. * nonstandard package names, and private registries sometimes allow it. Set "allowMostlyStandardPackageNames"
  95. * to true to relax Rush's enforcement of package names. This allows upper case letters and in the future may
  96. * relax other rules, however we want to minimize these exceptions. Many popular tools use certain punctuation
  97. * characters as delimiters, based on the assumption that they will never appear in a package name; thus if we relax
  98. * the rules too much it is likely to cause very confusing malfunctions.
  99. *
  100. * The default value is false.
  101. */
  102. // "allowMostlyStandardPackageNames": true,
  103. /**
  104. * This feature helps you to review and approve new packages before they are introduced
  105. * to your monorepo. For example, you may be concerned about licensing, code quality,
  106. * performance, or simply accumulating too many libraries with overlapping functionality.
  107. * The approvals are tracked in two config files "browser-approved-packages.json"
  108. * and "nonbrowser-approved-packages.json". See the Rush documentation for details.
  109. */
  110. // "approvedPackagesPolicy": {
  111. // /**
  112. // * The review categories allow you to say for example "This library is approved for usage
  113. // * in prototypes, but not in production code."
  114. // *
  115. // * Each project can be associated with one review category, by assigning the "reviewCategory" field
  116. // * in the "projects" section of rush.json. The approval is then recorded in the files
  117. // * "common/config/rush/browser-approved-packages.json" and "nonbrowser-approved-packages.json"
  118. // * which are automatically generated during "rush update".
  119. // *
  120. // * Designate categories with whatever granularity is appropriate for your review process,
  121. // * or you could just have a single category called "default".
  122. // */
  123. // "reviewCategories": [
  124. // "libraries", // library projects that ship
  125. // "tests" // non-shipping test projects
  126. // ],
  127. // /**
  128. // * A list of NPM package scopes that will be excluded from review.
  129. // * We recommend to exclude TypeScript typings (the "@types" scope), because
  130. // * if the underlying package was already approved, this would imply that the typings
  131. // * are also approved.
  132. // */
  133. // "ignoredNpmScopes": [
  134. // "@types"
  135. // ]
  136. // },
  137. /**
  138. * If you use Git as your version control system, this section has some additional
  139. * optional features you can use.
  140. */
  141. "gitPolicy": {
  142. /**
  143. * Work at a big company? Tired of finding Git commits at work with unprofessional Git
  144. * emails such as "beer-lover@my-college.edu"? Rush can validate people's Git email address
  145. * before they get started.
  146. *
  147. * Define a list of regular expressions describing allowable e-mail patterns for Git commits.
  148. * They are case-insensitive anchored JavaScript RegExps. Example: ".*@example\.com"
  149. *
  150. * IMPORTANT: Because these are regular expressions encoded as JSON string literals,
  151. * RegExp escapes need two backslashes, and ordinary periods should be "\\.".
  152. */
  153. // "allowedEmailRegExps": [
  154. // "[^@]+@users\\.noreply\\.github\\.com"
  155. // ],
  156. /**
  157. * When Rush reports that the address is malformed, the notice can include an example
  158. * of a recommended email. Make sure it conforms to one of the allowedEmailRegExps
  159. * expressions.
  160. */
  161. // "sampleEmail": "example@users.noreply.github.com"
  162. /**
  163. * The commit message to use when committing changes during 'rush publish'.
  164. *
  165. * For example, if you want to prevent these commits from triggering a CI build,
  166. * you might configure your system's trigger to look for a special string such as "[skip-ci]"
  167. * in the commit message, and then customize Rush's message to contain that string.
  168. */
  169. // "versionBumpCommitMessage": "Bump versions [skip ci]",
  170. /**
  171. * The commit message to use when committing changes during 'rush version'.
  172. *
  173. * For example, if you want to prevent these commits from triggering a CI build,
  174. * you might configure your system's trigger to look for a special string such as "[skip-ci]"
  175. * in the commit message, and then customize Rush's message to contain that string.
  176. */
  177. // "changeLogUpdateCommitMessage": "Update changelogs [skip ci]"
  178. /**
  179. * The commit message to use when commiting changefiles during 'rush change --commit'
  180. *
  181. * If no commit message is set it will default to 'Rush change'
  182. */
  183. // "changefilesCommitMessage": "Rush change"
  184. },
  185. "repository": {
  186. /**
  187. * The URL of this Git repository, used by "rush change" to determine the base branch for your PR.
  188. *
  189. * The "rush change" command needs to determine which files are affected by your PR diff.
  190. * If you merged or cherry-picked commits from the main branch into your PR branch, those commits
  191. * should be excluded from this diff (since they belong to some other PR). In order to do that,
  192. * Rush needs to know where to find the base branch for your PR. This information cannot be
  193. * determined from Git alone, since the "pull request" feature is not a Git concept. Ideally
  194. * Rush would use a vendor-specific protocol to query the information from GitHub, Azure DevOps, etc.
  195. * But to keep things simple,
  196. "rush change" simply assumes that your PR is against the "main" branch
  197. * of the Git remote indicated by the repository.url setting in rush.json. If you are working in
  198. * a GitHub "fork" of the real repo, this setting will be different from the repository URL of your
  199. * your PR branch, and in this situation "rush change" will also automatically invoke "git fetch"
  200. * to retrieve the latest activity for the remote main branch.
  201. */
  202. "urls": [
  203. "https://github.com/yume-chan/ya-webadb.git"
  204. ],
  205. /**
  206. * The default branch name. This tells "rush change" which remote branch to compare against.
  207. * The default value is "main"
  208. */
  209. "defaultBranch": "main"
  210. /**
  211. * The default remote. This tells "rush change" which remote to compare against if the remote URL is
  212. * not set or if a remote matching the provided remote URL is not found.
  213. */
  214. // "defaultRemote": "origin"
  215. },
  216. /**
  217. * Event hooks are customized script actions that Rush executes when specific events occur
  218. */
  219. "eventHooks": {
  220. /**
  221. * The list of shell commands to run before the Rush installation starts
  222. */
  223. "preRushInstall": [
  224. // "common/scripts/pre-rush-install.js"
  225. ],
  226. /**
  227. * The list of shell commands to run after the Rush installation finishes
  228. */
  229. "postRushInstall": [
  230. "rush postinstall"
  231. ],
  232. /**
  233. * The list of shell commands to run before the Rush build command starts
  234. */
  235. "preRushBuild": [],
  236. /**
  237. * The list of shell commands to run after the Rush build command finishes
  238. */
  239. "postRushBuild": []
  240. },
  241. /**
  242. * Installation variants allow you to maintain a parallel set of configuration files that can be
  243. * used to build the entire monorepo with an alternate set of dependencies. For example, suppose
  244. * you upgrade all your projects to use a new release of an important framework, but during a transition period
  245. * you intend to maintain compatibility with the old release. In this situation, you probably want your
  246. * CI validation to build the entire repo twice: once with the old release, and once with the new release.
  247. *
  248. * Rush "installation variants" correspond to sets of config files located under this folder:
  249. *
  250. * common/config/rush/variants/<variant_name>
  251. *
  252. * The variant folder can contain an alternate common-versions.json file. Its "preferredVersions" field can be used
  253. * to select older versions of dependencies (within a loose SemVer range specified in your package.json files).
  254. * To install a variant, run "rush install --variant <variant_name>".
  255. *
  256. * For more details and instructions, see this article: https://rushjs.io/pages/advanced/installation_variants/
  257. */
  258. "variants": [
  259. // {
  260. // /**
  261. // * The folder name for this variant.
  262. // */
  263. // "variantName": "old-sdk",
  264. //
  265. // /**
  266. // * An informative description
  267. // */
  268. // "description": "Build this repo using the previous release of the SDK"
  269. // }
  270. ],
  271. /**
  272. * Rush can collect anonymous telemetry about everyday developer activity such as
  273. * success/failure of installs, builds, and other operations. You can use this to identify
  274. * problems with your toolchain or Rush itself. THIS TELEMETRY IS NOT SHARED WITH MICROSOFT.
  275. * It is written into JSON files in the common/temp folder. It's up to you to write scripts
  276. * that read these JSON files and do something with them. These scripts are typically registered
  277. * in the "eventHooks" section.
  278. */
  279. "telemetryEnabled": false,
  280. /**
  281. * Allows creation of hotfix changes. This feature is experimental so it is disabled by default.
  282. * If this is set, 'rush change' only allows a 'hotfix' change type to be specified. This change type
  283. * will be used when publishing subsequent changes from the monorepo.
  284. */
  285. // "hotfixChangeEnabled": false,
  286. /**
  287. * This is an optional, but recommended, list of available tags that can be applied
  288. * to projects. If this property is not specified, any tag is allowed. This
  289. * list is useful in preventing typos when specifying tags for projects.
  290. */
  291. // "allowedProjectTags": [ "apps", "Web", "tools" ],
  292. /**
  293. * (Required) This is the inventory of projects to be managed by Rush.
  294. *
  295. * Rush does not automatically scan for projects using wildcards, for a few reasons:
  296. * 1. Depth-first scans are expensive, particularly when tools need to repeatedly collect the list.
  297. * 2. On a caching CI machine, scans can accidentally pick up files left behind from a previous build.
  298. * 3. It's useful to have a centralized inventory of all projects and their important metadata.
  299. */
  300. "projects": [
  301. // {
  302. // /**
  303. // * The NPM package name of the project (must match package.json)
  304. // */
  305. // "packageName": "my-app",
  306. //
  307. // /**
  308. // * The path to the project folder, relative to the rush.json config file.
  309. // */
  310. // "projectFolder": "apps/my-app",
  311. //
  312. // /**
  313. // * An optional category for usage in the "browser-approved-packages.json"
  314. // * and "nonbrowser-approved-packages.json" files. The value must be one of the
  315. // * strings from the "reviewCategories" defined above.
  316. // */
  317. // "reviewCategory": "production",
  318. //
  319. // /**
  320. // * A list of Rush project names that are to be installed from NPM
  321. // * instead of linking to the local project.
  322. // *
  323. // * If a project's package.json specifies a dependency that is another Rush project
  324. // * in the monorepo workspace, normally Rush will locally link its folder instead of
  325. // * installing from NPM. If you are using PNPM workspaces, this is indicated by
  326. // * a SemVer range such as "workspace:^1.2.3". To prevent mistakes, Rush reports
  327. // * an error if the "workspace:" protocol is missing.
  328. // *
  329. // * Locally linking ensures that regressions are caught as early as possible and is
  330. // * a key benefit of monorepos. However there are occasional situations where
  331. // * installing from NPM is needed. A classic example is a cyclic dependency.
  332. // * Imagine three Rush projects: "my-toolchain" depends on "my-tester", which depends
  333. // * on "my-library". Suppose that we add "my-toolchain" to the "devDependencies"
  334. // * of "my-library" so it can be built by our toolchain. This cycle creates
  335. // * a problem -- Rush can't build a project using a not-yet-built dependency.
  336. // * We can solve it by adding "my-toolchain" to the "decoupledLocalDependencies"
  337. // * of "my-library", so it builds using the last published release. Choose carefully
  338. // * which package to decouple; some choices are much easier to manage than others.
  339. // *
  340. // * (In older Rush releases, this setting was called "cyclicDependencyProjects".)
  341. // */
  342. // "decoupledLocalDependencies": [
  343. // // "my-toolchain"
  344. // ],
  345. //
  346. // /**
  347. // * If true, then this project will be ignored by the "rush check" command.
  348. // * The default value is false.
  349. // */
  350. // // "skipRushCheck": false,
  351. //
  352. // /**
  353. // * A flag indicating that changes to this project will be published to npm, which affects
  354. // * the Rush change and publish workflows. The default value is false.
  355. // * NOTE: "versionPolicyName" and "shouldPublish" are alternatives; you cannot specify them both.
  356. // */
  357. // // "shouldPublish": false,
  358. //
  359. // /**
  360. // * Facilitates postprocessing of a project's files prior to publishing.
  361. // *
  362. // * If specified, the "publishFolder" is the relative path to a subfolder of the project folder.
  363. // * The "rush publish" command will publish the subfolder instead of the project folder. The subfolder
  364. // * must contain its own package.json file, which is typically a build output.
  365. // */
  366. // // "publishFolder": "temp/publish",
  367. //
  368. // /**
  369. // * An optional version policy associated with the project. Version policies are defined
  370. // * in "version-policies.json" file. See the "rush publish" documentation for more info.
  371. // * NOTE: "versionPolicyName" and "shouldPublish" are alternatives; you cannot specify them both.
  372. // */
  373. // // "versionPolicyName": "",
  374. //
  375. // /**
  376. // * An optional set of custom tags that can be used to select this project. For example,
  377. // * adding "my-custom-tag" will allow this project to be selected by the
  378. // * command "rush list --only tag:my-custom-tag"
  379. // */
  380. // // "tags": ["apps", "web"]
  381. // },
  382. {
  383. "packageName": "@yume-chan/adb",
  384. "projectFolder": "libraries/adb",
  385. "shouldPublish": true,
  386. "versionPolicyName": "adb"
  387. },
  388. {
  389. "packageName": "@yume-chan/b-tree",
  390. "projectFolder": "libraries/b-tree"
  391. },
  392. {
  393. "packageName": "@yume-chan/dataview-bigint-polyfill",
  394. "projectFolder": "libraries/dataview-bigint-polyfill",
  395. "shouldPublish": true,
  396. "versionPolicyName": "adb"
  397. },
  398. {
  399. "packageName": "@yume-chan/event",
  400. "projectFolder": "libraries/event",
  401. "shouldPublish": true,
  402. "versionPolicyName": "adb"
  403. },
  404. {
  405. "packageName": "@yume-chan/struct",
  406. "projectFolder": "libraries/struct",
  407. "shouldPublish": true,
  408. "versionPolicyName": "adb"
  409. },
  410. {
  411. "packageName": "@yume-chan/adb-backend-webusb",
  412. "projectFolder": "libraries/adb-backend-webusb",
  413. "shouldPublish": true,
  414. "versionPolicyName": "adb"
  415. },
  416. {
  417. "packageName": "@yume-chan/adb-backend-ws",
  418. "projectFolder": "libraries/adb-backend-ws"
  419. },
  420. {
  421. "packageName": "@yume-chan/adb-backend-direct-sockets",
  422. "projectFolder": "libraries/adb-backend-direct-sockets"
  423. },
  424. {
  425. "packageName": "@yume-chan/adb-credential-web",
  426. "projectFolder": "libraries/adb-credential-web",
  427. "shouldPublish": true,
  428. "versionPolicyName": "adb"
  429. },
  430. {
  431. "packageName": "@yume-chan/android-bin",
  432. "projectFolder": "libraries/android-bin",
  433. "shouldPublish": true,
  434. "versionPolicyName": "adb"
  435. },
  436. {
  437. "packageName": "@yume-chan/scrcpy",
  438. "projectFolder": "libraries/scrcpy",
  439. "versionPolicyName": "adb"
  440. },
  441. {
  442. "packageName": "@yume-chan/scrcpy-decoder-tinyh264",
  443. "projectFolder": "libraries/scrcpy-decoder-tinyh264",
  444. "versionPolicyName": "adb"
  445. },
  446. {
  447. "packageName": "@yume-chan/scrcpy-decoder-webcodecs",
  448. "projectFolder": "libraries/scrcpy-decoder-webcodecs",
  449. "versionPolicyName": "adb"
  450. },
  451. {
  452. "packageName": "@yume-chan/stream-extra",
  453. "projectFolder": "libraries/stream-extra",
  454. "versionPolicyName": "adb"
  455. },
  456. {
  457. "packageName": "demo",
  458. "projectFolder": "apps/demo"
  459. },
  460. {
  461. "packageName": "unofficial-adb-book",
  462. "projectFolder": "apps/book"
  463. },
  464. {
  465. "packageName": "@yume-chan/ts-package-builder",
  466. "projectFolder": "toolchain/ts-package-builder"
  467. }
  468. ]
  469. }