This is a tool that sends dependency version upgrade analytics to the GASv3 pipeline by running inside a product codebase and analysing git history.
yarn add --dev @atlaskit/dependency-version-analytics @atlassiansox/analytics-node-client
The @atlassiansox/analytics-node-client
package is a peer dependency as it is a private package and so must be installed alongside the tool.
Commands are exposed via both the CLI and programatically.
Sends analytics events of atlaskit dependency changes to package.json that have occurred since the tool was last run.
Run yarn dependency-version-analytics --help
for more info.
$ atlaskit-version-analytics populate-product jira
Reads the git history of changes to package.json in the current branch (assumed to be master) since the tool was last run, tracks changes to dependencies and sends analytics in the format specified by http://go.atlassian.com/dataportal/analytics/registry/17058.
This command is intended to be used in product CI pipelines to record dep changes over time.
Dependency versions are compared to the versions when the tool was last run, which is marked by a git tag that the tool creates and updates on each run.
For initial publishing of historical events, the --reset
flag can be used to send changes that have occurred since the start of history.
For supported package scopes refer
Sends analytics events for published versions of the specified package.
Run yarn dependency-version-analytics --help
for more info.
$ atlaskit-version-analytics populate-package @atlaskit/button
Reads the version history of the package from npm and sends events for versions published since the time specified by --since
, or all versions if not specified.
This command will be used to record when new versions of the supported packages are published in this repo https://bitbucket.org/atlassian/atlaskit-version-analytics.
This will run the 'dev' mode of the tool and compile typescript on the fly. Any changes made to the source will instantly reflect in the product repo.
- Run
yarn link
inside the package -
cd
to the root of thealassian-frontend
repo then runyarn build @atlaskit/dependency-version-analytics
- Run
yarn link '@atlaskit/dependency-version-analytics'
inside the product repo of your choosing or in theatlaskit-version-analytics
repo to test your changes
Make dev changes + save.
This will run the built version of the tool that will be published to npm. It will use the compiled typescript output and will not allow 'hot module reload'.
- Install yalc globally -
yarn global add yalc
After each dev change,
- Run
yarn build @atlaskit/dependency-version-analytics
outside the package - Run
yalc publish
inside the package - Run
yalc add '@atlaskit/dependency-version-analytics'
inside the product repo of your choosing