Last active
May 4, 2024 10:58
-
-
Save JamieMason/da55f332c29799098f049ba030510286 to your computer and use it in GitHub Desktop.
add random numbers to semver versions in package.json files to create mismatches in fixtures.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const root = "/Users/foldleft/Dev/rust-syncpack/fixtures/fluid-framework"; | |
[ | |
`${root}/experimental/framework/data-objects/package.json`, | |
`${root}/experimental/framework/last-edited/package.json`, | |
`${root}/experimental/PropertyDDS/examples/property-inspector/package.json`, | |
`${root}/experimental/PropertyDDS/examples/schemas/package.json`, | |
`${root}/experimental/PropertyDDS/packages/property-shared-tree-interop/package.json`, | |
`${root}/experimental/PropertyDDS/packages/property-common/platform-dependent/package.json`, | |
`${root}/experimental/PropertyDDS/packages/property-common/package.json`, | |
`${root}/experimental/PropertyDDS/packages/property-changeset/package.json`, | |
`${root}/experimental/PropertyDDS/packages/property-proxy/package.json`, | |
`${root}/experimental/PropertyDDS/packages/property-inspector-table/package.json`, | |
`${root}/experimental/PropertyDDS/packages/property-properties/package.json`, | |
`${root}/experimental/PropertyDDS/packages/property-binder/package.json`, | |
`${root}/experimental/PropertyDDS/packages/property-query/package.json`, | |
`${root}/experimental/PropertyDDS/packages/property-dds/package.json`, | |
`${root}/experimental/dds/tree/package.json`, | |
`${root}/experimental/dds/sequence-deprecated/package.json`, | |
`${root}/experimental/dds/ot/ot/package.json`, | |
`${root}/experimental/dds/ot/sharejs/json1/package.json`, | |
`${root}/experimental/dds/attributable-map/package.json`, | |
`${root}/azure/packages/test/scenario-runner/package.json`, | |
`${root}/azure/packages/azure-local-service/package.json`, | |
`${root}/azure/packages/azure-service-utils/package.json`, | |
`${root}/package.json`, | |
`${root}/examples/data-objects/diceroller/package.json`, | |
`${root}/examples/data-objects/webflow/package.json`, | |
`${root}/examples/data-objects/codemirror/package.json`, | |
`${root}/examples/data-objects/prosemirror/package.json`, | |
`${root}/examples/data-objects/clicker/package.json`, | |
`${root}/examples/data-objects/table-document/package.json`, | |
`${root}/examples/data-objects/smde/package.json`, | |
`${root}/examples/data-objects/canvas/package.json`, | |
`${root}/examples/data-objects/todo/package.json`, | |
`${root}/examples/data-objects/inventory-app/package.json`, | |
`${root}/examples/data-objects/monaco/package.json`, | |
`${root}/examples/data-objects/multiview/interface/package.json`, | |
`${root}/examples/data-objects/multiview/slider-coordinate-view/package.json`, | |
`${root}/examples/data-objects/multiview/container/package.json`, | |
`${root}/examples/data-objects/multiview/coordinate-model/package.json`, | |
`${root}/examples/data-objects/multiview/triangle-view/package.json`, | |
`${root}/examples/data-objects/multiview/plot-coordinate-view/package.json`, | |
`${root}/examples/data-objects/multiview/constellation-model/package.json`, | |
`${root}/examples/data-objects/multiview/constellation-view/package.json`, | |
`${root}/examples/service-clients/azure-client/external-controller/package.json`, | |
`${root}/examples/service-clients/odsp-client/shared-tree-demo/package.json`, | |
`${root}/examples/utils/webpack-fluid-loader/package.json`, | |
`${root}/examples/utils/bundle-size-tests/package.json`, | |
`${root}/examples/utils/example-utils/package.json`, | |
`${root}/examples/external-data/package.json`, | |
`${root}/examples/benchmarks/bubblebench/shared-tree-flex-tree/package.json`, | |
`${root}/examples/benchmarks/bubblebench/baseline/package.json`, | |
`${root}/examples/benchmarks/bubblebench/common/package.json`, | |
`${root}/examples/benchmarks/bubblebench/ot/package.json`, | |
`${root}/examples/benchmarks/bubblebench/experimental-tree/package.json`, | |
`${root}/examples/benchmarks/bubblebench/shared-tree/package.json`, | |
`${root}/examples/benchmarks/tablebench/package.json`, | |
`${root}/examples/benchmarks/odspsnapshotfetch-perftestapp/package.json`, | |
`${root}/examples/version-migration/same-container/package.json`, | |
`${root}/examples/version-migration/live-schema-upgrade/package.json`, | |
`${root}/examples/version-migration/schema-upgrade/package.json`, | |
`${root}/examples/version-migration/tree-shim/package.json`, | |
`${root}/examples/apps/tree-comparison/package.json`, | |
`${root}/examples/apps/collaborative-textarea/package.json`, | |
`${root}/examples/apps/data-object-grid/package.json`, | |
`${root}/examples/apps/contact-collection/package.json`, | |
`${root}/examples/apps/task-selection/package.json`, | |
`${root}/examples/apps/attributable-map/package.json`, | |
`${root}/examples/apps/presence-tracker/package.json`, | |
`${root}/examples/view-integration/external-views/package.json`, | |
`${root}/examples/view-integration/container-views/package.json`, | |
`${root}/examples/view-integration/view-framework-sampler/package.json`, | |
`${root}/examples/client-logger/app-insights-logger/package.json`, | |
`${root}/packages/tools/replay-tool/package.json`, | |
`${root}/packages/tools/fluid-runner/package.json`, | |
`${root}/packages/tools/devtools/devtools-core/package.json`, | |
`${root}/packages/tools/devtools/devtools-browser-extension/package.json`, | |
`${root}/packages/tools/devtools/devtools-view/package.json`, | |
`${root}/packages/tools/devtools/devtools/package.json`, | |
`${root}/packages/tools/devtools/devtools-example/package.json`, | |
`${root}/packages/tools/fetch-tool/package.json`, | |
`${root}/packages/drivers/odsp-driver-definitions/package.json`, | |
`${root}/packages/drivers/odsp-driver/package.json`, | |
`${root}/packages/drivers/file-driver/package.json`, | |
`${root}/packages/drivers/driver-web-cache/package.json`, | |
`${root}/packages/drivers/replay-driver/package.json`, | |
`${root}/packages/drivers/odsp-urlResolver/package.json`, | |
`${root}/packages/drivers/debugger/package.json`, | |
`${root}/packages/drivers/routerlicious-driver/package.json`, | |
`${root}/packages/drivers/driver-base/package.json`, | |
`${root}/packages/drivers/routerlicious-urlResolver/package.json`, | |
`${root}/packages/drivers/local-driver/package.json`, | |
`${root}/packages/drivers/tinylicious-driver/package.json`, | |
`${root}/packages/test/functional-tests/package.json`, | |
`${root}/packages/test/stochastic-test-utils/package.json`, | |
`${root}/packages/test/test-utils/package.json`, | |
`${root}/packages/test/types_jest-environment-puppeteer/package.json`, | |
`${root}/packages/test/mocha-test-setup/package.json`, | |
`${root}/packages/test/test-service-load/package.json`, | |
`${root}/packages/test/snapshots/package.json`, | |
`${root}/packages/test/test-drivers/package.json`, | |
`${root}/packages/test/local-server-tests/package.json`, | |
`${root}/packages/test/test-app-insights-logger/package.json`, | |
`${root}/packages/test/test-version-utils/package.json`, | |
`${root}/packages/test/test-end-to-end-tests/package.json`, | |
`${root}/packages/test/test-pairwise-generator/package.json`, | |
`${root}/packages/test/test-driver-definitions/package.json`, | |
`${root}/packages/framework/agent-scheduler/package.json`, | |
`${root}/packages/framework/oldest-client-observer/package.json`, | |
`${root}/packages/framework/aqueduct/package.json`, | |
`${root}/packages/framework/undo-redo/package.json`, | |
`${root}/packages/framework/request-handler/package.json`, | |
`${root}/packages/framework/fluid-static/package.json`, | |
`${root}/packages/framework/attributor/package.json`, | |
`${root}/packages/framework/data-object-base/package.json`, | |
`${root}/packages/framework/fluid-framework/package.json`, | |
`${root}/packages/framework/synthesize/package.json`, | |
`${root}/packages/framework/dds-interceptions/package.json`, | |
`${root}/packages/framework/client-logger/fluid-telemetry/package.json`, | |
`${root}/packages/framework/client-logger/app-insights-logger/package.json`, | |
`${root}/packages/runtime/container-runtime/package.json`, | |
`${root}/packages/runtime/runtime-utils/package.json`, | |
`${root}/packages/runtime/datastore/package.json`, | |
`${root}/packages/runtime/test-runtime-utils/package.json`, | |
`${root}/packages/runtime/runtime-definitions/package.json`, | |
`${root}/packages/runtime/container-runtime-definitions/package.json`, | |
`${root}/packages/runtime/datastore-definitions/package.json`, | |
`${root}/packages/runtime/id-compressor/package.json`, | |
`${root}/packages/service-clients/tinylicious-client/package.json`, | |
`${root}/packages/service-clients/azure-client/package.json`, | |
`${root}/packages/service-clients/odsp-client/package.json`, | |
`${root}/packages/service-clients/end-to-end-tests/azure-client/package.json`, | |
`${root}/packages/service-clients/end-to-end-tests/odsp-client/package.json`, | |
`${root}/packages/utils/tool-utils/package.json`, | |
`${root}/packages/utils/odsp-doclib-utils/package.json`, | |
`${root}/packages/utils/telemetry-utils/package.json`, | |
`${root}/packages/common/driver-definitions/package.json`, | |
`${root}/packages/common/core-interfaces/package.json`, | |
`${root}/packages/common/core-utils/package.json`, | |
`${root}/packages/common/client-utils/package.json`, | |
`${root}/packages/common/container-definitions/package.json`, | |
`${root}/packages/loader/test-loader-utils/package.json`, | |
`${root}/packages/loader/container-loader/package.json`, | |
`${root}/packages/loader/driver-utils/package.json`, | |
`${root}/packages/dds/tree/package.json`, | |
`${root}/packages/dds/ink/package.json`, | |
`${root}/packages/dds/task-manager/package.json`, | |
`${root}/packages/dds/merge-tree/package.json`, | |
`${root}/packages/dds/shared-summary-block/package.json`, | |
`${root}/packages/dds/pact-map/package.json`, | |
`${root}/packages/dds/cell/package.json`, | |
`${root}/packages/dds/map/package.json`, | |
`${root}/packages/dds/counter/package.json`, | |
`${root}/packages/dds/ordered-collection/package.json`, | |
`${root}/packages/dds/sequence/package.json`, | |
`${root}/packages/dds/register-collection/package.json`, | |
`${root}/packages/dds/shared-object-base/package.json`, | |
`${root}/packages/dds/matrix/package.json`, | |
`${root}/packages/dds/test-dds-utils/package.json`, | |
].forEach((path) => { | |
const source = require("fs").readFileSync(path, "utf8"); | |
const next = source.replaceAll( | |
/\.[0-9]+/g, | |
() => `.${Math.round(randomNumber(0, 2))}`, | |
); | |
require("fs").writeFileSync(path, next); | |
}); | |
function randomNumber(min, max) { | |
return Math.random() * (max - min) + min; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment