repopo 0.12.0 → 0.14.0
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/CHANGELOG.md +70 -0
- package/README.md +57 -90
- package/THIRD-PARTY-LICENSES.txt +169 -11
- package/bin/dev.js +0 -0
- package/esm/adapters/fluidFramework.d.ts +13 -9
- package/esm/adapters/fluidFramework.d.ts.map +1 -1
- package/esm/adapters/fluidFramework.js +20 -43
- package/esm/adapters/fluidFramework.js.map +1 -1
- package/esm/api.d.ts +66 -1
- package/esm/api.d.ts.map +1 -1
- package/esm/api.js +18 -1
- package/esm/api.js.map +1 -1
- package/esm/baseCommand.d.ts.map +1 -1
- package/esm/baseCommand.js +2 -2
- package/esm/baseCommand.js.map +1 -1
- package/esm/commands/check-native.d.ts +5 -3
- package/esm/commands/check-native.d.ts.map +1 -1
- package/esm/commands/check-native.js +35 -7
- package/esm/commands/check-native.js.map +1 -1
- package/esm/commands/check.d.ts +8 -21
- package/esm/commands/check.d.ts.map +1 -1
- package/esm/commands/check.js +98 -154
- package/esm/commands/check.js.map +1 -1
- package/esm/commands/list.d.ts.map +1 -1
- package/esm/commands/list.js +1 -0
- package/esm/commands/list.js.map +1 -1
- package/esm/concurrency.d.ts +3 -0
- package/esm/concurrency.d.ts.map +1 -0
- package/esm/concurrency.js +8 -0
- package/esm/concurrency.js.map +1 -0
- package/esm/config.d.ts +10 -39
- package/esm/config.d.ts.map +1 -1
- package/esm/config.js +3 -7
- package/esm/config.js.map +1 -1
- package/esm/context.d.ts +10 -1
- package/esm/context.d.ts.map +1 -1
- package/esm/context.js +19 -1
- package/esm/context.js.map +1 -1
- package/esm/executionContractError.d.ts +4 -0
- package/esm/executionContractError.d.ts.map +1 -0
- package/esm/executionContractError.js +4 -0
- package/esm/executionContractError.js.map +1 -0
- package/esm/fileCache.d.ts +12 -0
- package/esm/fileCache.d.ts.map +1 -0
- package/esm/fileCache.js +37 -0
- package/esm/fileCache.js.map +1 -0
- package/esm/filePaths.d.ts +2 -0
- package/esm/filePaths.d.ts.map +1 -0
- package/esm/filePaths.js +9 -0
- package/esm/filePaths.js.map +1 -0
- package/esm/generators.d.ts +0 -20
- package/esm/generators.d.ts.map +1 -1
- package/esm/generators.js.map +1 -1
- package/esm/index.d.ts +3 -16
- package/esm/index.d.ts.map +1 -1
- package/esm/index.js +3 -17
- package/esm/index.js.map +1 -1
- package/esm/makePolicy.d.ts +20 -100
- package/esm/makePolicy.d.ts.map +1 -1
- package/esm/makePolicy.js +46 -132
- package/esm/makePolicy.js.map +1 -1
- package/esm/perf.d.ts +5 -2
- package/esm/perf.d.ts.map +1 -1
- package/esm/perf.js +10 -9
- package/esm/perf.js.map +1 -1
- package/esm/policies/CargoLicenceValidated.d.ts +4 -4
- package/esm/policies/CargoLicenceValidated.d.ts.map +1 -1
- package/esm/policies/CargoLicenceValidated.js +9 -7
- package/esm/policies/CargoLicenceValidated.js.map +1 -1
- package/esm/policies/CargoLintsConfigured.d.ts +4 -4
- package/esm/policies/CargoLintsConfigured.d.ts.map +1 -1
- package/esm/policies/CargoLintsConfigured.js +19 -15
- package/esm/policies/CargoLintsConfigured.js.map +1 -1
- package/esm/policies/CargoLockPolicy.d.ts +4 -4
- package/esm/policies/CargoLockPolicy.d.ts.map +1 -1
- package/esm/policies/CargoLockPolicy.js +15 -11
- package/esm/policies/CargoLockPolicy.js.map +1 -1
- package/esm/policies/CargoTomlRequired.d.ts +5 -5
- package/esm/policies/CargoTomlRequired.d.ts.map +1 -1
- package/esm/policies/CargoTomlRequired.js +7 -7
- package/esm/policies/CargoTomlRequired.js.map +1 -1
- package/esm/policies/CargoTomlSorted.d.ts +4 -4
- package/esm/policies/CargoTomlSorted.d.ts.map +1 -1
- package/esm/policies/CargoTomlSorted.js +21 -17
- package/esm/policies/CargoTomlSorted.js.map +1 -1
- package/esm/policies/ConditionalScripts.d.ts +10 -8
- package/esm/policies/ConditionalScripts.d.ts.map +1 -1
- package/esm/policies/ConditionalScripts.js +24 -22
- package/esm/policies/ConditionalScripts.js.map +1 -1
- package/esm/policies/ExactScripts.d.ts +8 -6
- package/esm/policies/ExactScripts.d.ts.map +1 -1
- package/esm/policies/ExactScripts.js +15 -18
- package/esm/policies/ExactScripts.js.map +1 -1
- package/esm/policies/GleamDepVersions.d.ts +5 -5
- package/esm/policies/GleamDepVersions.d.ts.map +1 -1
- package/esm/policies/GleamDepVersions.js +5 -5
- package/esm/policies/GleamDepVersions.js.map +1 -1
- package/esm/policies/GleamDocExists.d.ts +4 -4
- package/esm/policies/GleamDocExists.d.ts.map +1 -1
- package/esm/policies/GleamDocExists.js +6 -6
- package/esm/policies/GleamDocExists.js.map +1 -1
- package/esm/policies/GleamInternalModulesConfigured.d.ts +4 -4
- package/esm/policies/GleamInternalModulesConfigured.d.ts.map +1 -1
- package/esm/policies/GleamInternalModulesConfigured.js +8 -6
- package/esm/policies/GleamInternalModulesConfigured.js.map +1 -1
- package/esm/policies/GleamLicenceConfigured.d.ts +4 -4
- package/esm/policies/GleamLicenceConfigured.d.ts.map +1 -1
- package/esm/policies/GleamLicenceConfigured.js +8 -6
- package/esm/policies/GleamLicenceConfigured.js.map +1 -1
- package/esm/policies/GleamManifestCommitted.d.ts +10 -3
- package/esm/policies/GleamManifestCommitted.d.ts.map +1 -1
- package/esm/policies/GleamManifestCommitted.js +10 -9
- package/esm/policies/GleamManifestCommitted.js.map +1 -1
- package/esm/policies/GleamMonorepoConsistency.d.ts +13 -5
- package/esm/policies/GleamMonorepoConsistency.d.ts.map +1 -1
- package/esm/policies/GleamMonorepoConsistency.js +10 -10
- package/esm/policies/GleamMonorepoConsistency.js.map +1 -1
- package/esm/policies/GleamNameRestrictions.d.ts +4 -4
- package/esm/policies/GleamNameRestrictions.d.ts.map +1 -1
- package/esm/policies/GleamNameRestrictions.js +6 -6
- package/esm/policies/GleamNameRestrictions.js.map +1 -1
- package/esm/policies/GleamNoPathDepsInPublished.d.ts +4 -4
- package/esm/policies/GleamNoPathDepsInPublished.d.ts.map +1 -1
- package/esm/policies/GleamNoPathDepsInPublished.js +6 -6
- package/esm/policies/GleamNoPathDepsInPublished.js.map +1 -1
- package/esm/policies/GleamPathDepsValid.d.ts +3 -3
- package/esm/policies/GleamPathDepsValid.d.ts.map +1 -1
- package/esm/policies/GleamPathDepsValid.js +5 -5
- package/esm/policies/GleamPathDepsValid.js.map +1 -1
- package/esm/policies/GleamProjectStructure.d.ts +11 -4
- package/esm/policies/GleamProjectStructure.d.ts.map +1 -1
- package/esm/policies/GleamProjectStructure.js +7 -8
- package/esm/policies/GleamProjectStructure.js.map +1 -1
- package/esm/policies/GleamSharedDependencyVersions.d.ts +12 -4
- package/esm/policies/GleamSharedDependencyVersions.d.ts.map +1 -1
- package/esm/policies/GleamSharedDependencyVersions.js +10 -10
- package/esm/policies/GleamSharedDependencyVersions.js.map +1 -1
- package/esm/policies/GleamTomlRequired.d.ts +4 -4
- package/esm/policies/GleamTomlRequired.d.ts.map +1 -1
- package/esm/policies/GleamTomlRequired.js +5 -5
- package/esm/policies/GleamTomlRequired.js.map +1 -1
- package/esm/policies/GleamTomlSorted.d.ts +4 -4
- package/esm/policies/GleamTomlSorted.d.ts.map +1 -1
- package/esm/policies/GleamTomlSorted.js +21 -17
- package/esm/policies/GleamTomlSorted.js.map +1 -1
- package/esm/policies/GleamVersionConstraint.d.ts +4 -4
- package/esm/policies/GleamVersionConstraint.d.ts.map +1 -1
- package/esm/policies/GleamVersionConstraint.js +14 -10
- package/esm/policies/GleamVersionConstraint.js.map +1 -1
- package/esm/policies/HtmlFileHeaders.d.ts +4 -2
- package/esm/policies/HtmlFileHeaders.d.ts.map +1 -1
- package/esm/policies/HtmlFileHeaders.js +1 -1
- package/esm/policies/HtmlFileHeaders.js.map +1 -1
- package/esm/policies/JsTsFileHeaders.d.ts +4 -2
- package/esm/policies/JsTsFileHeaders.d.ts.map +1 -1
- package/esm/policies/JsTsFileHeaders.js +1 -1
- package/esm/policies/JsTsFileHeaders.js.map +1 -1
- package/esm/policies/LicenseFileExists.d.ts +10 -4
- package/esm/policies/LicenseFileExists.d.ts.map +1 -1
- package/esm/policies/LicenseFileExists.js +27 -20
- package/esm/policies/LicenseFileExists.js.map +1 -1
- package/esm/policies/MaxChangedFiles.d.ts +17 -0
- package/esm/policies/MaxChangedFiles.d.ts.map +1 -0
- package/esm/policies/MaxChangedFiles.js +22 -0
- package/esm/policies/MaxChangedFiles.js.map +1 -0
- package/esm/policies/MutuallyExclusiveScripts.d.ts +8 -6
- package/esm/policies/MutuallyExclusiveScripts.d.ts.map +1 -1
- package/esm/policies/MutuallyExclusiveScripts.js +9 -13
- package/esm/policies/MutuallyExclusiveScripts.js.map +1 -1
- package/esm/policies/NoBuildDirectory.d.ts +9 -3
- package/esm/policies/NoBuildDirectory.d.ts.map +1 -1
- package/esm/policies/NoBuildDirectory.js +8 -13
- package/esm/policies/NoBuildDirectory.js.map +1 -1
- package/esm/policies/NoJsFileExtensions.d.ts +9 -3
- package/esm/policies/NoJsFileExtensions.d.ts.map +1 -1
- package/esm/policies/NoJsFileExtensions.js +9 -14
- package/esm/policies/NoJsFileExtensions.js.map +1 -1
- package/esm/policies/NoLargeBinaryFiles.d.ts +9 -4
- package/esm/policies/NoLargeBinaryFiles.d.ts.map +1 -1
- package/esm/policies/NoLargeBinaryFiles.js +10 -16
- package/esm/policies/NoLargeBinaryFiles.js.map +1 -1
- package/esm/policies/NoPrivateWorkspaceDependencies.d.ts +10 -6
- package/esm/policies/NoPrivateWorkspaceDependencies.d.ts.map +1 -1
- package/esm/policies/NoPrivateWorkspaceDependencies.js +12 -14
- package/esm/policies/NoPrivateWorkspaceDependencies.js.map +1 -1
- package/esm/policies/NoTargetArtifacts.d.ts +9 -3
- package/esm/policies/NoTargetArtifacts.d.ts.map +1 -1
- package/esm/policies/NoTargetArtifacts.js +9 -14
- package/esm/policies/NoTargetArtifacts.js.map +1 -1
- package/esm/policies/NoUnsafeWithoutJustification.d.ts +11 -4
- package/esm/policies/NoUnsafeWithoutJustification.d.ts.map +1 -1
- package/esm/policies/NoUnsafeWithoutJustification.js +8 -9
- package/esm/policies/NoUnsafeWithoutJustification.js.map +1 -1
- package/esm/policies/NoWildcardDependencies.d.ts +5 -5
- package/esm/policies/NoWildcardDependencies.d.ts.map +1 -1
- package/esm/policies/NoWildcardDependencies.js +6 -6
- package/esm/policies/NoWildcardDependencies.js.map +1 -1
- package/esm/policies/PackageAllowedScopes.d.ts +9 -5
- package/esm/policies/PackageAllowedScopes.d.ts.map +1 -1
- package/esm/policies/PackageAllowedScopes.js +15 -16
- package/esm/policies/PackageAllowedScopes.js.map +1 -1
- package/esm/policies/PackageEsmType.d.ts +7 -5
- package/esm/policies/PackageEsmType.d.ts.map +1 -1
- package/esm/policies/PackageEsmType.js +31 -31
- package/esm/policies/PackageEsmType.js.map +1 -1
- package/esm/policies/PackageFolderName.d.ts +8 -6
- package/esm/policies/PackageFolderName.d.ts.map +1 -1
- package/esm/policies/PackageFolderName.js +13 -16
- package/esm/policies/PackageFolderName.js.map +1 -1
- package/esm/policies/PackageJsonProperties.d.ts +5 -3
- package/esm/policies/PackageJsonProperties.d.ts.map +1 -1
- package/esm/policies/PackageJsonProperties.js +6 -17
- package/esm/policies/PackageJsonProperties.js.map +1 -1
- package/esm/policies/PackageJsonRepoDirectoryProperty.d.ts +2 -7
- package/esm/policies/PackageJsonRepoDirectoryProperty.d.ts.map +1 -1
- package/esm/policies/PackageJsonRepoDirectoryProperty.js +28 -42
- package/esm/policies/PackageJsonRepoDirectoryProperty.js.map +1 -1
- package/esm/policies/PackageJsonSorted.d.ts +2 -2
- package/esm/policies/PackageJsonSorted.d.ts.map +1 -1
- package/esm/policies/PackageJsonSorted.js +15 -30
- package/esm/policies/PackageJsonSorted.js.map +1 -1
- package/esm/policies/PackageLicense.d.ts +4 -4
- package/esm/policies/PackageLicense.d.ts.map +1 -1
- package/esm/policies/PackageLicense.js +31 -52
- package/esm/policies/PackageLicense.js.map +1 -1
- package/esm/policies/PackagePrivateField.d.ts +12 -8
- package/esm/policies/PackagePrivateField.d.ts.map +1 -1
- package/esm/policies/PackagePrivateField.js +31 -23
- package/esm/policies/PackagePrivateField.js.map +1 -1
- package/esm/policies/PackageReadme.d.ts +6 -5
- package/esm/policies/PackageReadme.d.ts.map +1 -1
- package/esm/policies/PackageReadme.js +22 -59
- package/esm/policies/PackageReadme.js.map +1 -1
- package/esm/policies/PackageScripts.d.ts +26 -22
- package/esm/policies/PackageScripts.d.ts.map +1 -1
- package/esm/policies/PackageScripts.js +39 -36
- package/esm/policies/PackageScripts.js.map +1 -1
- package/esm/policies/PackageTestScripts.d.ts +10 -6
- package/esm/policies/PackageTestScripts.d.ts.map +1 -1
- package/esm/policies/PackageTestScripts.js +14 -16
- package/esm/policies/PackageTestScripts.js.map +1 -1
- package/esm/policies/PublicApiDocumented.d.ts +4 -4
- package/esm/policies/PublicApiDocumented.d.ts.map +1 -1
- package/esm/policies/PublicApiDocumented.js +10 -8
- package/esm/policies/PublicApiDocumented.js.map +1 -1
- package/esm/policies/RequireCompanionChanges.d.ts +16 -0
- package/esm/policies/RequireCompanionChanges.d.ts.map +1 -0
- package/esm/policies/RequireCompanionChanges.js +42 -0
- package/esm/policies/RequireCompanionChanges.js.map +1 -0
- package/esm/policies/RequiredGitignorePatterns.d.ts +11 -4
- package/esm/policies/RequiredGitignorePatterns.d.ts.map +1 -1
- package/esm/policies/RequiredGitignorePatterns.js +29 -36
- package/esm/policies/RequiredGitignorePatterns.js.map +1 -1
- package/esm/policies/RequiredScripts.d.ts +9 -7
- package/esm/policies/RequiredScripts.d.ts.map +1 -1
- package/esm/policies/RequiredScripts.js +24 -24
- package/esm/policies/RequiredScripts.js.map +1 -1
- package/esm/policies/RustDocExists.d.ts +4 -4
- package/esm/policies/RustDocExists.d.ts.map +1 -1
- package/esm/policies/RustDocExists.js +6 -6
- package/esm/policies/RustDocExists.js.map +1 -1
- package/esm/policies/RustToolchainExists.d.ts +11 -4
- package/esm/policies/RustToolchainExists.d.ts.map +1 -1
- package/esm/policies/RustToolchainExists.js +10 -9
- package/esm/policies/RustToolchainExists.js.map +1 -1
- package/esm/policies/RustfmtConfigExists.d.ts +11 -4
- package/esm/policies/RustfmtConfigExists.d.ts.map +1 -1
- package/esm/policies/RustfmtConfigExists.js +10 -9
- package/esm/policies/RustfmtConfigExists.js.map +1 -1
- package/esm/policies/ScriptContains.d.ts +9 -7
- package/esm/policies/ScriptContains.d.ts.map +1 -1
- package/esm/policies/ScriptContains.js +9 -13
- package/esm/policies/ScriptContains.js.map +1 -1
- package/esm/policies/SharedDependencyVersions.d.ts +9 -4
- package/esm/policies/SharedDependencyVersions.d.ts.map +1 -1
- package/esm/policies/SharedDependencyVersions.js +28 -20
- package/esm/policies/SharedDependencyVersions.js.map +1 -1
- package/esm/policies/WorkspaceInheritance.d.ts +11 -4
- package/esm/policies/WorkspaceInheritance.d.ts.map +1 -1
- package/esm/policies/WorkspaceInheritance.js +10 -11
- package/esm/policies/WorkspaceInheritance.js.map +1 -1
- package/esm/policies/WorkspaceMembersValid.d.ts +11 -4
- package/esm/policies/WorkspaceMembersValid.d.ts.map +1 -1
- package/esm/policies/WorkspaceMembersValid.js +10 -11
- package/esm/policies/WorkspaceMembersValid.js.map +1 -1
- package/esm/policies/constants.d.ts.map +1 -1
- package/esm/policies/constants.js +1 -1
- package/esm/policies/constants.js.map +1 -1
- package/esm/policies.d.ts +15 -5
- package/esm/policies.d.ts.map +1 -1
- package/esm/policies.js +14 -5
- package/esm/policies.js.map +1 -1
- package/esm/policy.d.ts +67 -289
- package/esm/policy.d.ts.map +1 -1
- package/esm/policy.js +1 -122
- package/esm/policy.js.map +1 -1
- package/esm/policyDefiners/defineCargoPolicy.d.ts +25 -9
- package/esm/policyDefiners/defineCargoPolicy.d.ts.map +1 -1
- package/esm/policyDefiners/defineCargoPolicy.js +10 -28
- package/esm/policyDefiners/defineCargoPolicy.js.map +1 -1
- package/esm/policyDefiners/defineFileHeaderPolicy.d.ts +27 -14
- package/esm/policyDefiners/defineFileHeaderPolicy.d.ts.map +1 -1
- package/esm/policyDefiners/defineFileHeaderPolicy.js +16 -35
- package/esm/policyDefiners/defineFileHeaderPolicy.js.map +1 -1
- package/esm/policyDefiners/defineGleamPolicy.d.ts +25 -9
- package/esm/policyDefiners/defineGleamPolicy.d.ts.map +1 -1
- package/esm/policyDefiners/defineGleamPolicy.js +10 -27
- package/esm/policyDefiners/defineGleamPolicy.js.map +1 -1
- package/esm/policyDefiners/definePackagePolicy.d.ts +24 -13
- package/esm/policyDefiners/definePackagePolicy.d.ts.map +1 -1
- package/esm/policyDefiners/definePackagePolicy.js +9 -32
- package/esm/policyDefiners/definePackagePolicy.js.map +1 -1
- package/esm/policyDefiners/spdxValidator.d.ts +4 -12
- package/esm/policyDefiners/spdxValidator.d.ts.map +1 -1
- package/esm/policyDefiners/spdxValidator.js +26 -14
- package/esm/policyDefiners/spdxValidator.js.map +1 -1
- package/esm/policyExecution.d.ts +20 -0
- package/esm/policyExecution.d.ts.map +1 -0
- package/esm/policyExecution.js +234 -0
- package/esm/policyExecution.js.map +1 -0
- package/esm/repositoryChanges.d.ts +26 -0
- package/esm/repositoryChanges.d.ts.map +1 -0
- package/esm/repositoryChanges.js +172 -0
- package/esm/repositoryChanges.js.map +1 -0
- package/esm/repositoryFiles.d.ts +6 -0
- package/esm/repositoryFiles.d.ts.map +1 -0
- package/esm/repositoryFiles.js +11 -0
- package/esm/repositoryFiles.js.map +1 -0
- package/esm/runner.d.ts +73 -47
- package/esm/runner.d.ts.map +1 -1
- package/esm/runner.js +158 -144
- package/esm/runner.js.map +1 -1
- package/esm/settlePolicyPromise.d.ts +4 -0
- package/esm/settlePolicyPromise.d.ts.map +1 -0
- package/esm/settlePolicyPromise.js +10 -0
- package/esm/settlePolicyPromise.js.map +1 -0
- package/esm/tsdoc-metadata.json +1 -1
- package/esm/utils/safePaths.d.ts +9 -0
- package/esm/utils/safePaths.d.ts.map +1 -0
- package/esm/utils/safePaths.js +40 -0
- package/esm/utils/safePaths.js.map +1 -0
- package/oclif.manifest.json +57 -2
- package/package.json +42 -27
- package/scripts/benchmark.mjs +341 -0
- package/sidecar/sidecar.mjs +388 -417
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,75 @@
|
|
|
1
1
|
# repopo
|
|
2
2
|
|
|
3
|
+
## 0.14.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- Add a full repository inventory annotated with added, modified, deleted, renamed, type-changed, or unchanged status. Support PR, local, and staged comparisons with explicit base overrides and shared TypeScript/native behavior. _[`#828`](https://github.com/tylerbutler/tools-monorepo/pull/828) [`ddf0db2`](https://github.com/tylerbutler/tools-monorepo/commit/ddf0db26c2c92c56df8954e5f81692da4a06ec13) [@tylerbutler](https://github.com/tylerbutler)_
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
Use `RequireCompanionChanges` to require related path updates, such as documentation changes alongside source changes. Existing file selection and full repository inventory retain their behavior.
|
|
11
|
+
|
|
12
|
+
Configure comparisons with `changes: { mode?, base? }`. The CLI uses its explicit base override first, then CI's target, then the configured base.
|
|
13
|
+
|
|
14
|
+
Use `scope: "changes"` to request change statuses without making ordinary repository policies depend on Git comparison history. Both scopes accept one optional `match` regex that filters the handler's inventory, including either rename endpoint.
|
|
15
|
+
- Add the opt-in `MaxChangedFiles` policy with required configuration `{ maxFiles: number }`. Report a violation when the eligible changed-file count exceeds the nonnegative integer limit; exactly the limit passes. _[`#829`](https://github.com/tylerbutler/tools-monorepo/pull/829) [`f02fd0a`](https://github.com/tylerbutler/tools-monorepo/commit/f02fd0ac44020272d197289215aabb561e5307e2) [@tylerbutler](https://github.com/tylerbutler)_
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
Count additions, modifications, deletions, type changes, and renames once per change record. Honor global and per-policy exclusions, and use the existing PR/local/staged change snapshot independently of stdin selection. Findings include the count, limit, and guidance to reduce or split the change.
|
|
19
|
+
|
|
20
|
+
## 0.13.0
|
|
21
|
+
|
|
22
|
+
### Minor Changes
|
|
23
|
+
|
|
24
|
+
- Introduce a shared API for file and repository policies, with consistent check results and fix status reporting. _[`#811`](https://github.com/tylerbutler/tools-monorepo/pull/811) [`d76e9e7`](https://github.com/tylerbutler/tools-monorepo/commit/d76e9e72c8d75863a97517ca662001aa567207da) [@tylerbutler](https://github.com/tylerbutler)_
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
**Breaking change:** Update custom policies and configurations together.
|
|
28
|
+
This change is released as a minor version while the packages are pre-1.0.
|
|
29
|
+
See the [migration guide](https://repopo.tylerbutler.com/usage/migration/) for replacements for removed APIs and complete examples.
|
|
30
|
+
|
|
31
|
+
Key migration steps for `repopo`:
|
|
32
|
+
|
|
33
|
+
- Define policies as objects with `satisfies FilePolicyDefinition<C>` or `satisfies RepositoryPolicyDefinition<C>` instead of policy classes or factory aliases. Use `definePackagePolicy` instead of `generatePackagePolicy`.
|
|
34
|
+
- Configure policies with `makePolicy(definition, { config, exclude, instanceId })` instead of positional configuration or a third argument. Instance exclusions use `exclude`; global `RepopoConfig.excludeFiles` remains supported. Repeated instances of the same policy need unique `instanceId` values.
|
|
35
|
+
- Mark required configuration with `requiresConfig: true` and supply complete settings or a complete default. Omitted or `undefined` configuration selects the default; explicit configuration replaces it without merging.
|
|
36
|
+
- Return arrays of findings instead of the previous success and failure results. An empty handler result passes. Findings use `message`, optional `manualFix`, and optional `fixStatus: "available" | "fixed" | "failed"`. Only `"fixed"` resolves a finding; `"fixed"` and `"failed"` are valid only in fix mode. Standalone resolvers must return the findings they update; returning `[]` does not resolve the original findings.
|
|
37
|
+
- Run policies with `runPolicies(options)` for Promise-based code or `new PolicyRunner(options).run()` for Effection code. Results separate `findings`, `errors`, `skipped`, and `perfStats`. Input and registration errors throw; policy execution errors are collected.
|
|
38
|
+
- Supply the full repository `inventory` or an async inventory loader when running repository policies programmatically. Use a loader to refresh the inventory after file fixes and between repository fixes. `LicenseFileExists` and `SharedDependencyVersions` now check the whole repository, even with an empty file selection or `--stdin`. Repository fixes can modify files outside the selected list.
|
|
39
|
+
|
|
40
|
+
In fix mode, an execution error stops later work on the affected file and skips repository policies, or stops later repository policies if the error occurs in that phase.
|
|
41
|
+
Completed writes are not rolled back.
|
|
42
|
+
Both `check` and `check-native` follow these rules.
|
|
43
|
+
|
|
44
|
+
Import the programmatic API from `repopo/api` and built-in policies from `repopo/policies`.
|
|
45
|
+
The root `repopo` entry point also exports the CLI's `run` function.
|
|
46
|
+
|
|
47
|
+
For `sort-tsconfig`, the exported `SortTsconfigsPolicy` is now a file policy definition.
|
|
48
|
+
Configure it with the same `makePolicy` options object.
|
|
49
|
+
If you call its handler directly, update your code to handle finding arrays and fix statuses.
|
|
50
|
+
|
|
51
|
+
For `remark-repopo-policies`, generated policy tables now read instance exclusions from `exclude`, so exclusion details remain visible after migration.
|
|
52
|
+
|
|
53
|
+
### Patch Changes
|
|
54
|
+
|
|
55
|
+
- Speed up read-only checks by processing up to eight files at a time and avoiding repeated parsing of `package.json`, `Cargo.toml`, and `gleam.toml` files. _[`#807`](https://github.com/tylerbutler/tools-monorepo/pull/807) [`5e6c97b`](https://github.com/tylerbutler/tools-monorepo/commit/5e6c97b9afa99c93b1728ee0e48b45fa0a130501) [@tylerbutler](https://github.com/tylerbutler)_
|
|
56
|
+
|
|
57
|
+
Each policy still receives an independent copy of the parsed data.
|
|
58
|
+
|
|
59
|
+
Set the file limit with `--concurrency` on `repopo check` or `repopo check-native`, or with `PolicyRunnerOptions.concurrency` in the programmatic API.
|
|
60
|
+
Use `--concurrency 1` for custom policies that must process files one at a time.
|
|
61
|
+
Automatic fixes still run one at a time and read fresh file contents.
|
|
62
|
+
- Correct the reported file counts so each file that passes global exclusions is counted once, regardless of how many policies run on it. _[`#779`](https://github.com/tylerbutler/tools-monorepo/pull/779) [`ca340db`](https://github.com/tylerbutler/tools-monorepo/commit/ca340dbefce4e967ecf73a043207ec13b0651213) [@tylerbutler](https://github.com/tylerbutler)_
|
|
63
|
+
|
|
64
|
+
Ignore empty entries in file lists from Git and `--stdin`, so blank records do not become file paths.
|
|
65
|
+
- Show a policy's manual fix instructions when `repopo check` or `repopo check-native` reports an unresolved violation, including after a failed automatic fix. _[`#803`](https://github.com/tylerbutler/tools-monorepo/pull/803) [`c401c9c`](https://github.com/tylerbutler/tools-monorepo/commit/c401c9c7ab783222afac4df6de0b421dbe215093) [@tylerbutler](https://github.com/tylerbutler)_
|
|
66
|
+
|
|
67
|
+
If the automatic fixer does not provide instructions, keep the policy's original guidance.
|
|
68
|
+
Do not show manual fix instructions for violations that were successfully fixed.
|
|
69
|
+
- Reject file paths that resolve outside the repository root in `repopo check`, including paths supplied with `--stdin`. _[`#665`](https://github.com/tylerbutler/tools-monorepo/pull/665) [`1333d28`](https://github.com/tylerbutler/tools-monorepo/commit/1333d287abdee51a01a22540914600877fe8f557) [@tylerbutler](https://github.com/tylerbutler)_
|
|
70
|
+
|
|
71
|
+
Apply the same validation to package and file-header policy helpers, so these checks and fixes reject paths such as `../outside.txt`.
|
|
72
|
+
|
|
3
73
|
## 0.12.0
|
|
4
74
|
|
|
5
75
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -3,104 +3,55 @@
|
|
|
3
3
|
repopo is a tool to apply policies to the files in your git repo. You can think of it as a sort of lint tool for any
|
|
4
4
|
file in your git repo, with a straightforward way to write your own policies.
|
|
5
5
|
|
|
6
|
+
**Documentation: <https://repopo.tylerbutler.com>**
|
|
7
|
+
|
|
6
8
|
<!-- toc -->
|
|
7
9
|
* [repopo - police the files in your git repo with extensible policies](#repopo---police-the-files-in-your-git-repo-with-extensible-policies)
|
|
8
|
-
* [
|
|
9
|
-
* [
|
|
10
|
-
* [Policy generators](#policy-generators)
|
|
10
|
+
* [Quick start](#quick-start)
|
|
11
|
+
* [Documentation](#documentation)
|
|
11
12
|
* [CLI Usage](#cli-usage)
|
|
12
13
|
<!-- tocstop -->
|
|
13
14
|
|
|
14
|
-
#
|
|
15
|
-
|
|
16
|
-
Repopo and its policies can be configured in a `repopo.config.ts` (or `.cjs`, or `.mjs`) file in the root of the repo. Using a
|
|
17
|
-
TypeScript configuration file is recommended.
|
|
18
|
-
|
|
19
|
-
The policy config must export a default object of the type `PolicyConfig`.
|
|
20
|
-
|
|
21
|
-
Omit `policies` to use the default policies with either `check` or `check-native`.
|
|
22
|
-
Set `policies: []` to disable them.
|
|
23
|
-
|
|
24
|
-
With `check --fix`, policies run in configuration order for each file so that one
|
|
25
|
-
fix does not overwrite another. Read-only checks can run policies concurrently.
|
|
26
|
-
|
|
27
|
-
## Excluding files from policy check
|
|
28
|
-
|
|
29
|
-
By default, all files in the repo are checked. You can exclude files completely from the policy check by configuring the
|
|
30
|
-
d `excludeFiles` setting. It should be an array of strings/regular expressions. Paths that match any of these
|
|
31
|
-
expressions will be completely excluded from all policies.
|
|
32
|
-
|
|
33
|
-
You can exclude files from individual policies as well by configuring the `excludeFiles` setting when calling
|
|
34
|
-
`makePolicy`.
|
|
35
|
-
|
|
36
|
-
## Configuring individual policies
|
|
37
|
-
|
|
38
|
-
Individual policies can be configured by passing configuration settings to a `PolicyDefinition` in `makePolicy`.
|
|
39
|
-
|
|
40
|
-
# Included policies
|
|
41
|
-
|
|
42
|
-
repopo includes the following policies. All of the included policies are enabled by default.
|
|
43
|
-
|
|
44
|
-
## HtmlFileHeaders and JsTsFileHeaders
|
|
45
|
-
|
|
46
|
-
Use `HtmlFileHeaders` for `.html` and `.htm` files, and `JsTsFileHeaders` for
|
|
47
|
-
JavaScript and TypeScript files.
|
|
15
|
+
# Quick start
|
|
48
16
|
|
|
49
|
-
|
|
17
|
+
Install repopo as a dev dependency:
|
|
50
18
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
## NoJsFileExtensions
|
|
55
|
-
|
|
56
|
-
The NoJsFileExtensions policy checks for JavaScript source files that just use the .js file extension. Such files may be
|
|
57
|
-
interpreted by Node.js as either CommonJS or ESM based on the `type` field in the nearest package.json file. This can
|
|
58
|
-
create unexpected behavior for JS files; changing the package.json nearest to one will change how the JS is processed by
|
|
59
|
-
node. Using explicit file extensions reduces ambiguity and ensures a CJS file isn't suddenly treated like an ESM file.
|
|
60
|
-
|
|
61
|
-
## PackageJsonProperties
|
|
62
|
-
|
|
63
|
-
The PackageJsonProperties policy is used to enforce fields in package.json files across the repo.
|
|
64
|
-
|
|
65
|
-
### Configuration
|
|
19
|
+
```bash
|
|
20
|
+
pnpm add -D repopo
|
|
21
|
+
```
|
|
66
22
|
|
|
67
|
-
|
|
68
|
-
Array values replace existing arrays rather than append to them. Unspecified object fields remain unchanged.
|
|
23
|
+
Create `repopo.config.ts` in the root of the repo:
|
|
69
24
|
|
|
70
25
|
```ts
|
|
71
|
-
import type
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
url: "git+https://github.com/tylerbutler/tools-monorepo.git",
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
};
|
|
26
|
+
import { makePolicy, type RepopoConfig } from "repopo";
|
|
27
|
+
import { NoJsFileExtensions, PackageJsonProperties } from "repopo/policies";
|
|
28
|
+
|
|
29
|
+
export default {
|
|
30
|
+
policies: [
|
|
31
|
+
makePolicy(NoJsFileExtensions, { exclude: ["^bin/"] }),
|
|
32
|
+
makePolicy(PackageJsonProperties, {
|
|
33
|
+
config: { verbatim: { license: "MIT" } },
|
|
34
|
+
}),
|
|
35
|
+
],
|
|
36
|
+
} satisfies RepopoConfig;
|
|
88
37
|
```
|
|
89
38
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
A RepoPolicy that checks that the `repository.directory` property in package.json is set correctly. If the repository
|
|
93
|
-
field is a string instead of an object the package will be ignored.
|
|
39
|
+
Then check the repo, and fix what can be fixed automatically:
|
|
94
40
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
of boilerplate code you have to write for a policy.
|
|
41
|
+
```bash
|
|
42
|
+
repopo check
|
|
43
|
+
repopo check --fix
|
|
44
|
+
```
|
|
100
45
|
|
|
101
|
-
|
|
46
|
+
# Documentation
|
|
102
47
|
|
|
103
|
-
|
|
48
|
+
- [Configuration](https://repopo.tylerbutler.com/usage/config/): choosing policies, policy options, and file exclusions
|
|
49
|
+
- [Built-in policies](https://repopo.tylerbutler.com/policies/built-in/): every included policy and its options
|
|
50
|
+
- [Custom policies](https://repopo.tylerbutler.com/policies/custom/): writing file and repository policies
|
|
51
|
+
- [Programmatic API](https://repopo.tylerbutler.com/usage/programmatic-api/): running policies with `runPolicies` and `PolicyRunner`
|
|
52
|
+
- [Migrating to the 1.0 API](https://repopo.tylerbutler.com/usage/migration/): breaking changes to configuration, policy results, and runners
|
|
53
|
+
- [Benchmarking](https://repopo.tylerbutler.com/usage/benchmarking/): comparing the TypeScript and Rust engines
|
|
54
|
+
- [API reference](https://repopo.tylerbutler.com/api/readme/)
|
|
104
55
|
|
|
105
56
|
# CLI Usage
|
|
106
57
|
|
|
@@ -115,15 +66,26 @@ Checks and applies policies to the files in the repository.
|
|
|
115
66
|
|
|
116
67
|
```
|
|
117
68
|
USAGE
|
|
118
|
-
$ repopo check [-v | --quiet] [-
|
|
69
|
+
$ repopo check [-v | --quiet] [--change-mode pr|local|staged] [--change-base <value>] [--concurrency
|
|
70
|
+
<value>] [-f] [--stdin]
|
|
119
71
|
|
|
120
72
|
FLAGS
|
|
121
|
-
-f, --fix
|
|
122
|
-
--
|
|
73
|
+
-f, --fix Fix errors if possible.
|
|
74
|
+
--change-base=<value> Override the PR change context base ref.
|
|
75
|
+
--change-mode=<option> Change context: pr (default), local, or staged. Does not select file-policy paths.
|
|
76
|
+
<options: pr|local|staged>
|
|
77
|
+
--concurrency=<value> [default: 8] Maximum concurrent files in read-only checks. Fixes remain sequential.
|
|
78
|
+
--stdin Read list of files from stdin.
|
|
123
79
|
|
|
124
80
|
LOGGING FLAGS
|
|
125
81
|
-v, --verbose Enable verbose logging.
|
|
126
82
|
--quiet Disable all logging.
|
|
83
|
+
|
|
84
|
+
DESCRIPTION
|
|
85
|
+
Checks and applies policies to the files in the repository.
|
|
86
|
+
|
|
87
|
+
File policies check selected files. Repository policies always run with the full repository file inventory, including
|
|
88
|
+
with --stdin. With --fix, repository policies can modify files outside the stdin selection.
|
|
127
89
|
```
|
|
128
90
|
|
|
129
91
|
_See code: [src/commands/check.ts](https://github.com/tylerbutler/tools-monorepo/blob/main/packages/repopo/src/commands/check.ts)_
|
|
@@ -134,8 +96,8 @@ Checks and applies policies using the Rust engine.
|
|
|
134
96
|
|
|
135
97
|
```
|
|
136
98
|
USAGE
|
|
137
|
-
$ repopo check-native [
|
|
138
|
-
[--runtime auto|node|bun]
|
|
99
|
+
$ repopo check-native [--change-mode pr|local|staged] [--change-base <value>] [--concurrency <value>] [-f]
|
|
100
|
+
[--stdin] [-v] [-q] [-c <value>] [--sidecar-path <value>] [--binary-path <value>] [--runtime auto|node|bun]
|
|
139
101
|
|
|
140
102
|
FLAGS
|
|
141
103
|
-c, --config=<value> Path to the config file.
|
|
@@ -143,6 +105,10 @@ FLAGS
|
|
|
143
105
|
-q, --quiet Suppress all output except errors.
|
|
144
106
|
-v, --verbose Show verbose output including per-policy timing.
|
|
145
107
|
--binary-path=<value> [env: REPOPO_CORE_PATH] Path to the repopo-core Rust binary.
|
|
108
|
+
--change-base=<value> Override the PR change context base ref.
|
|
109
|
+
--change-mode=<option> Change context: pr (default), local, or staged. Does not select file-policy paths.
|
|
110
|
+
<options: pr|local|staged>
|
|
111
|
+
--concurrency=<value> [default: 8] Maximum concurrent files in read-only checks. Fixes remain sequential.
|
|
146
112
|
--runtime=<option> [env: REPOPO_RUNTIME] JS runtime for the sidecar process (auto, node, bun).
|
|
147
113
|
<options: auto|node|bun>
|
|
148
114
|
--sidecar-path=<value> [env: REPOPO_SIDECAR_PATH] Path to the Node.js sidecar script.
|
|
@@ -151,8 +117,9 @@ FLAGS
|
|
|
151
117
|
DESCRIPTION
|
|
152
118
|
Checks and applies policies using the Rust engine.
|
|
153
119
|
|
|
154
|
-
Runs the Rust-based repopo-core engine with the Node.js sidecar.
|
|
155
|
-
|
|
120
|
+
Runs the Rust-based repopo-core engine with the Node.js sidecar. Rust handles file matching, scheduling and reporting;
|
|
121
|
+
the sidecar shares per-policy contracts with 'check'. Repository policies always run with the full repository
|
|
122
|
+
inventory, including with --stdin. With --fix, repository policies can modify files outside the stdin selection.
|
|
156
123
|
```
|
|
157
124
|
|
|
158
125
|
_See code: [src/commands/check-native.ts](https://github.com/tylerbutler/tools-monorepo/blob/main/packages/repopo/src/commands/check-native.ts)_
|
package/THIRD-PARTY-LICENSES.txt
CHANGED
|
@@ -27,7 +27,7 @@ OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHE
|
|
|
27
27
|
|
|
28
28
|
The following npm package may be included in this product:
|
|
29
29
|
|
|
30
|
-
- @rushstack/node-core-library@5.
|
|
30
|
+
- @rushstack/node-core-library@5.25.1
|
|
31
31
|
|
|
32
32
|
This package contains the following license:
|
|
33
33
|
|
|
@@ -90,7 +90,7 @@ Copyright (c) 2024-present Cedric van Putten <me@cedric.dev>
|
|
|
90
90
|
|
|
91
91
|
The following npm package may be included in this product:
|
|
92
92
|
|
|
93
|
-
- @fluid-tools/build-infrastructure@0.
|
|
93
|
+
- @fluid-tools/build-infrastructure@0.68.0
|
|
94
94
|
|
|
95
95
|
This package contains the following license:
|
|
96
96
|
|
|
@@ -118,6 +118,136 @@ SOFTWARE.
|
|
|
118
118
|
|
|
119
119
|
-----------
|
|
120
120
|
|
|
121
|
+
The following npm package may be included in this product:
|
|
122
|
+
|
|
123
|
+
- type-fest@5.10.0
|
|
124
|
+
|
|
125
|
+
This package contains the following license:
|
|
126
|
+
|
|
127
|
+
Creative Commons Legal Code
|
|
128
|
+
|
|
129
|
+
CC0 1.0 Universal
|
|
130
|
+
|
|
131
|
+
CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE
|
|
132
|
+
LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN
|
|
133
|
+
ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS
|
|
134
|
+
INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES
|
|
135
|
+
REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS
|
|
136
|
+
PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM
|
|
137
|
+
THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED
|
|
138
|
+
HEREUNDER.
|
|
139
|
+
|
|
140
|
+
Statement of Purpose
|
|
141
|
+
|
|
142
|
+
The laws of most jurisdictions throughout the world automatically confer
|
|
143
|
+
exclusive Copyright and Related Rights (defined below) upon the creator
|
|
144
|
+
and subsequent owner(s) (each and all, an "owner") of an original work of
|
|
145
|
+
authorship and/or a database (each, a "Work").
|
|
146
|
+
|
|
147
|
+
Certain owners wish to permanently relinquish those rights to a Work for
|
|
148
|
+
the purpose of contributing to a commons of creative, cultural and
|
|
149
|
+
scientific works ("Commons") that the public can reliably and without fear
|
|
150
|
+
of later claims of infringement build upon, modify, incorporate in other
|
|
151
|
+
works, reuse and redistribute as freely as possible in any form whatsoever
|
|
152
|
+
and for any purposes, including without limitation commercial purposes.
|
|
153
|
+
These owners may contribute to the Commons to promote the ideal of a free
|
|
154
|
+
culture and the further production of creative, cultural and scientific
|
|
155
|
+
works, or to gain reputation or greater distribution for their Work in
|
|
156
|
+
part through the use and efforts of others.
|
|
157
|
+
|
|
158
|
+
For these and/or other purposes and motivations, and without any
|
|
159
|
+
expectation of additional consideration or compensation, the person
|
|
160
|
+
associating CC0 with a Work (the "Affirmer"), to the extent that he or she
|
|
161
|
+
is an owner of Copyright and Related Rights in the Work, voluntarily
|
|
162
|
+
elects to apply CC0 to the Work and publicly distribute the Work under its
|
|
163
|
+
terms, with knowledge of his or her Copyright and Related Rights in the
|
|
164
|
+
Work and the meaning and intended legal effect of CC0 on those rights.
|
|
165
|
+
|
|
166
|
+
1. Copyright and Related Rights. A Work made available under CC0 may be
|
|
167
|
+
protected by copyright and related or neighboring rights ("Copyright and
|
|
168
|
+
Related Rights"). Copyright and Related Rights include, but are not
|
|
169
|
+
limited to, the following:
|
|
170
|
+
|
|
171
|
+
i. the right to reproduce, adapt, distribute, perform, display,
|
|
172
|
+
communicate, and translate a Work;
|
|
173
|
+
ii. moral rights retained by the original author(s) and/or performer(s);
|
|
174
|
+
iii. publicity and privacy rights pertaining to a person's image or
|
|
175
|
+
likeness depicted in a Work;
|
|
176
|
+
iv. rights protecting against unfair competition in regards to a Work,
|
|
177
|
+
subject to the limitations in paragraph 4(a), below;
|
|
178
|
+
v. rights protecting the extraction, dissemination, use and reuse of data
|
|
179
|
+
in a Work;
|
|
180
|
+
vi. database rights (such as those arising under Directive 96/9/EC of the
|
|
181
|
+
European Parliament and of the Council of 11 March 1996 on the legal
|
|
182
|
+
protection of databases, and under any national implementation
|
|
183
|
+
thereof, including any amended or successor version of such
|
|
184
|
+
directive); and
|
|
185
|
+
vii. other similar, equivalent or corresponding rights throughout the
|
|
186
|
+
world based on applicable law or treaty, and any national
|
|
187
|
+
implementations thereof.
|
|
188
|
+
|
|
189
|
+
2. Waiver. To the greatest extent permitted by, but not in contravention
|
|
190
|
+
of, applicable law, Affirmer hereby overtly, fully, permanently,
|
|
191
|
+
irrevocably and unconditionally waives, abandons, and surrenders all of
|
|
192
|
+
Affirmer's Copyright and Related Rights and associated claims and causes
|
|
193
|
+
of action, whether now known or unknown (including existing as well as
|
|
194
|
+
future claims and causes of action), in the Work (i) in all territories
|
|
195
|
+
worldwide, (ii) for the maximum duration provided by applicable law or
|
|
196
|
+
treaty (including future time extensions), (iii) in any current or future
|
|
197
|
+
medium and for any number of copies, and (iv) for any purpose whatsoever,
|
|
198
|
+
including without limitation commercial, advertising or promotional
|
|
199
|
+
purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each
|
|
200
|
+
member of the public at large and to the detriment of Affirmer's heirs and
|
|
201
|
+
successors, fully intending that such Waiver shall not be subject to
|
|
202
|
+
revocation, rescission, cancellation, termination, or any other legal or
|
|
203
|
+
equitable action to disrupt the quiet enjoyment of the Work by the public
|
|
204
|
+
as contemplated by Affirmer's express Statement of Purpose.
|
|
205
|
+
|
|
206
|
+
3. Public License Fallback. Should any part of the Waiver for any reason
|
|
207
|
+
be judged legally invalid or ineffective under applicable law, then the
|
|
208
|
+
Waiver shall be preserved to the maximum extent permitted taking into
|
|
209
|
+
account Affirmer's express Statement of Purpose. In addition, to the
|
|
210
|
+
extent the Waiver is so judged Affirmer hereby grants to each affected
|
|
211
|
+
person a royalty-free, non transferable, non sublicensable, non exclusive,
|
|
212
|
+
irrevocable and unconditional license to exercise Affirmer's Copyright and
|
|
213
|
+
Related Rights in the Work (i) in all territories worldwide, (ii) for the
|
|
214
|
+
maximum duration provided by applicable law or treaty (including future
|
|
215
|
+
time extensions), (iii) in any current or future medium and for any number
|
|
216
|
+
of copies, and (iv) for any purpose whatsoever, including without
|
|
217
|
+
limitation commercial, advertising or promotional purposes (the
|
|
218
|
+
"License"). The License shall be deemed effective as of the date CC0 was
|
|
219
|
+
applied by Affirmer to the Work. Should any part of the License for any
|
|
220
|
+
reason be judged legally invalid or ineffective under applicable law, such
|
|
221
|
+
partial invalidity or ineffectiveness shall not invalidate the remainder
|
|
222
|
+
of the License, and in such case Affirmer hereby affirms that he or she
|
|
223
|
+
will not (i) exercise any of his or her remaining Copyright and Related
|
|
224
|
+
Rights in the Work or (ii) assert any associated claims and causes of
|
|
225
|
+
action with respect to the Work, in either case contrary to Affirmer's
|
|
226
|
+
express Statement of Purpose.
|
|
227
|
+
|
|
228
|
+
4. Limitations and Disclaimers.
|
|
229
|
+
|
|
230
|
+
a. No trademark or patent rights held by Affirmer are waived, abandoned,
|
|
231
|
+
surrendered, licensed or otherwise affected by this document.
|
|
232
|
+
b. Affirmer offers the Work as-is and makes no representations or
|
|
233
|
+
warranties of any kind concerning the Work, express, implied,
|
|
234
|
+
statutory or otherwise, including without limitation warranties of
|
|
235
|
+
title, merchantability, fitness for a particular purpose, non
|
|
236
|
+
infringement, or the absence of latent or other defects, accuracy, or
|
|
237
|
+
the present or absence of errors, whether or not discoverable, all to
|
|
238
|
+
the greatest extent permissible under applicable law.
|
|
239
|
+
c. Affirmer disclaims responsibility for clearing rights of other persons
|
|
240
|
+
that may apply to the Work or any use thereof, including without
|
|
241
|
+
limitation any person's Copyright and Related Rights in the Work.
|
|
242
|
+
Further, Affirmer disclaims responsibility for obtaining any necessary
|
|
243
|
+
consents, permissions or other rights required for any use of the
|
|
244
|
+
Work.
|
|
245
|
+
d. Affirmer understands and acknowledges that Creative Commons is not a
|
|
246
|
+
party to this document and has no duty or obligation with respect to
|
|
247
|
+
this CC0 or use of the Work.
|
|
248
|
+
|
|
249
|
+
-----------
|
|
250
|
+
|
|
121
251
|
The following npm package may be included in this product:
|
|
122
252
|
|
|
123
253
|
- picocolors@1.1.1
|
|
@@ -142,12 +272,11 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
|
142
272
|
|
|
143
273
|
-----------
|
|
144
274
|
|
|
145
|
-
The following npm
|
|
275
|
+
The following npm package may be included in this product:
|
|
146
276
|
|
|
147
|
-
- effection@4.0
|
|
148
|
-
- simple-git@3.36.0
|
|
277
|
+
- effection@4.2.0
|
|
149
278
|
|
|
150
|
-
|
|
279
|
+
This package contains the following license:
|
|
151
280
|
|
|
152
281
|
MIT
|
|
153
282
|
|
|
@@ -155,8 +284,8 @@ MIT
|
|
|
155
284
|
|
|
156
285
|
The following npm packages may be included in this product:
|
|
157
286
|
|
|
158
|
-
- @oclif/core@
|
|
159
|
-
- @oclif/plugin-help@
|
|
287
|
+
- @oclif/core@5.1.9
|
|
288
|
+
- @oclif/plugin-help@7.0.5
|
|
160
289
|
|
|
161
290
|
These packages each contain the following license:
|
|
162
291
|
|
|
@@ -186,7 +315,7 @@ SOFTWARE.
|
|
|
186
315
|
|
|
187
316
|
The following npm package may be included in this product:
|
|
188
317
|
|
|
189
|
-
- microdiff@1.
|
|
318
|
+
- microdiff@1.6.0
|
|
190
319
|
|
|
191
320
|
This package contains the following license:
|
|
192
321
|
|
|
@@ -216,7 +345,7 @@ SOFTWARE.
|
|
|
216
345
|
|
|
217
346
|
The following npm package may be included in this product:
|
|
218
347
|
|
|
219
|
-
- lilconfig@3.1.
|
|
348
|
+
- lilconfig@3.1.4
|
|
220
349
|
|
|
221
350
|
This package contains the following license:
|
|
222
351
|
|
|
@@ -471,7 +600,7 @@ SOFTWARE.
|
|
|
471
600
|
|
|
472
601
|
The following npm package may be included in this product:
|
|
473
602
|
|
|
474
|
-
- picomatch@4.0.
|
|
603
|
+
- picomatch@4.0.7
|
|
475
604
|
|
|
476
605
|
This package contains the following license:
|
|
477
606
|
|
|
@@ -499,5 +628,34 @@ THE SOFTWARE.
|
|
|
499
628
|
|
|
500
629
|
-----------
|
|
501
630
|
|
|
631
|
+
The following npm package may be included in this product:
|
|
632
|
+
|
|
633
|
+
- simple-git@4.0.2
|
|
634
|
+
|
|
635
|
+
This package contains the following license:
|
|
636
|
+
|
|
637
|
+
The MIT License (MIT)
|
|
638
|
+
|
|
639
|
+
Copyright (c) 2025 Steve King
|
|
640
|
+
|
|
641
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
642
|
+
this software and associated documentation files (the "Software"), to deal in
|
|
643
|
+
the Software without restriction, including without limitation the rights to
|
|
644
|
+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
|
645
|
+
the Software, and to permit persons to whom the Software is furnished to do so,
|
|
646
|
+
subject to the following conditions:
|
|
647
|
+
|
|
648
|
+
The above copyright notice and this permission notice shall be included in all
|
|
649
|
+
copies or substantial portions of the Software.
|
|
650
|
+
|
|
651
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
652
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
|
653
|
+
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
|
654
|
+
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
|
655
|
+
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
656
|
+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
657
|
+
|
|
658
|
+
-----------
|
|
659
|
+
|
|
502
660
|
This file was generated with the generate-license-file npm package!
|
|
503
661
|
https://www.npmjs.com/package/generate-license-file
|
package/bin/dev.js
CHANGED
|
File without changes
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { FilePolicyDefinition } from "../policy.js";
|
|
2
2
|
/**
|
|
3
3
|
* A FluidFramework build-tools policy handler interface.
|
|
4
4
|
*
|
|
5
5
|
* This interface matches the `Handler` interface from `@fluidframework/build-tools`.
|
|
6
6
|
*
|
|
7
|
-
* @
|
|
7
|
+
* @public
|
|
8
8
|
*/
|
|
9
9
|
export interface FluidHandler {
|
|
10
10
|
/**
|
|
@@ -31,17 +31,21 @@ export interface FluidHandler {
|
|
|
31
31
|
* @returns An object indicating whether the fix was successful.
|
|
32
32
|
*/
|
|
33
33
|
resolver?: (file: string, root: string) => Promise<{
|
|
34
|
+
/** Whether the violation was fixed. */
|
|
34
35
|
resolved: boolean;
|
|
36
|
+
/** Optional explanation of the fix result. */
|
|
35
37
|
message?: string;
|
|
36
38
|
}> | {
|
|
39
|
+
/** Whether the violation was fixed. */
|
|
37
40
|
resolved: boolean;
|
|
41
|
+
/** Optional explanation of the fix result. */
|
|
38
42
|
message?: string;
|
|
39
43
|
};
|
|
40
44
|
}
|
|
41
45
|
/**
|
|
42
46
|
* Options for converting FluidFramework handlers to repopo policies.
|
|
43
47
|
*
|
|
44
|
-
* @
|
|
48
|
+
* @public
|
|
45
49
|
*/
|
|
46
50
|
export interface FluidAdapterOptions {
|
|
47
51
|
/**
|
|
@@ -62,19 +66,19 @@ export interface FluidAdapterOptions {
|
|
|
62
66
|
* Key differences handled by this adapter:
|
|
63
67
|
*
|
|
64
68
|
* - **Handler signature**: Fluid uses `(file, root) => string | undefined`,
|
|
65
|
-
* repopo uses `(args) =>
|
|
69
|
+
* repopo uses `(args) => Promise<PolicyResult> | Operation<PolicyResult>`
|
|
66
70
|
*
|
|
67
71
|
* - **File paths**: Fluid passes absolute paths, repopo passes repo-relative paths.
|
|
68
72
|
* The adapter converts between the two.
|
|
69
73
|
*
|
|
70
74
|
* - **Return types**: Fluid returns `string | undefined` (error message or success),
|
|
71
|
-
* repopo returns `
|
|
75
|
+
* repopo returns `readonly PolicyFinding[]`
|
|
72
76
|
*
|
|
73
77
|
* For a single handler, wrap it in an array: `fromFluidHandlers([handler])`.
|
|
74
78
|
*
|
|
75
79
|
* @example
|
|
76
80
|
* ```typescript
|
|
77
|
-
* import { fromFluidHandlers, makePolicy } from "repopo";
|
|
81
|
+
* import { fromFluidHandlers, makePolicy, type RepopoConfig } from "repopo";
|
|
78
82
|
* import { copyrightFileHeaderHandlers, fluidCaseHandler } from "@fluidframework/build-tools";
|
|
79
83
|
*
|
|
80
84
|
* // Convert multiple handlers with a namespace prefix
|
|
@@ -87,7 +91,7 @@ export interface FluidAdapterOptions {
|
|
|
87
91
|
*
|
|
88
92
|
* const config: RepopoConfig = {
|
|
89
93
|
* policies: [
|
|
90
|
-
* ...FluidCopyrightPolicies.map(p => makePolicy(p)),
|
|
94
|
+
* ...FluidCopyrightPolicies.map((p) => makePolicy(p)),
|
|
91
95
|
* makePolicy(FluidCasePolicy),
|
|
92
96
|
* ],
|
|
93
97
|
* };
|
|
@@ -97,7 +101,7 @@ export interface FluidAdapterOptions {
|
|
|
97
101
|
* @param options - Optional configuration applied to all conversions.
|
|
98
102
|
* @returns An array of repopo PolicyDefinitions.
|
|
99
103
|
*
|
|
100
|
-
* @
|
|
104
|
+
* @public
|
|
101
105
|
*/
|
|
102
|
-
export declare function fromFluidHandlers(fluidHandlers: FluidHandler[], options?: FluidAdapterOptions):
|
|
106
|
+
export declare function fromFluidHandlers(fluidHandlers: FluidHandler[], options?: FluidAdapterOptions): FilePolicyDefinition[];
|
|
103
107
|
//# sourceMappingURL=fluidFramework.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fluidFramework.d.ts","sourceRoot":"","sources":["../../src/adapters/fluidFramework.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"fluidFramework.d.ts","sourceRoot":"","sources":["../../src/adapters/fluidFramework.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,oBAAoB,EAAiB,MAAM,cAAc,CAAC;AAExE;;;;;;GAMG;AACH,MAAM,WAAW,YAAY;IAC5B;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;;;;;OAMG;IACH,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IAErE;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,CACV,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,KAEV,OAAO,CAAC;QACR,uCAAuC;QACvC,QAAQ,EAAE,OAAO,CAAC;QAClB,8CAA8C;QAC9C,OAAO,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC,GACF;QACA,uCAAuC;QACvC,QAAQ,EAAE,OAAO,CAAC;QAClB,8CAA8C;QAC9C,OAAO,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC;CACL;AAED;;;;GAIG;AACH,MAAM,WAAW,mBAAmB;IACnC;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACpB;AA8DD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+CG;AACH,wBAAgB,iBAAiB,CAChC,aAAa,EAAE,YAAY,EAAE,EAC7B,OAAO,CAAC,EAAE,mBAAmB,GAC3B,oBAAoB,EAAE,CAExB"}
|