New expanded mirror repository including source for all public Atlaskit packages

Hi community,

We are replacing the design-system-mirror repository that we currently provide with a new, expanded atlassian-frontend-mirror repository that will include the source code for all public @atlaskit packages. All the code in the current mirror will be in the new mirror. We are using a new name for the mirror to accurately reflect that it includes more than just Atlassian Design System code.

In replacing rather than renaming the mirror, any references you have to the existing repository will continue to work without interruption, although you will need to change the URLs in order to continue getting updates.

I know many of you have requested this, and it has taken us some time to set this up — thank you for your patience.

What’s changing?

  • A new atlassian-frontend-mirror repository is being provided, which includes the source code for all public packages available on npm in the @atlaskit scope. It is a public mirror of that code in our internal Atlassian Frontend repository. The mirror will be updated nightly.
  • The design-system-mirror repository will be retired. To make it easier for you to switch over without diverging history (see below), this repository will remain accessible until 30 Nov 2020, but it will no longer be updated.
  • We are updating the readme in the repository, as well as the Get Started guide in our documentation.

What’s not changing?

  • All code in the current mirror repository will also be in the new repository.
  • Packages on npm continue to be available as they are today.
  • There is no change to licensing.

How will this impact you?

If you reference the current repository, you will need to update the remote URL to point to the new repository:

git remote set-url origin git@bitbucket.org:atlassian/atlassian-frontend-mirror.git
git pull

The history between both repositories should line up exactly, so it should be treated as a straightforward rename/URL change. (This is why we will not be updating the existing repository.)

Alternatively, you can clone the new repository directly:

git clone git@bitbucket.org:atlassian/atlassian-frontend-mirror.git

A note about support

We continue to provide guidance and support for packages that are part of the Atlassian Design System (corresponding to the /design-system folder in the repository). We are committed to ongoing improvements, fixing bugs, and adding new features as part of our roadmap. If you need help, have questions or would like to report an issue, please start a new topic here in the Ecosystem Design forum.

The new mirror repository also contains the code for packages outside the Design System. Please keep in mind that the level of support varies between each of those packages. They are owned by different teams within Atlassian and are primarily intended for internal use. We will monitor the forums and try our best to direct topics to the appropriate maintainers, but some packages are made available without official support.

Cheers,
Stephen

11 Likes

Thanks Stephen, we’ve been missing some of the little components and it is great to have access to their code again!

Can you explain a little more about how the commits in the atlassian-frontend-mirror repository are created? It appears that they are daily, so it is essentially all the commits to master each day squashed into one?

The reason I ask is that we often want to check out the source for a specific version of a component. So, for example, if we encounter a problem in version 14.0.3 of @atlaskit/button I presume what we need to do is look through the history of the relevant design-system/button/package.json to find the commit where its version changed to 14.0.3. When the version changes in package.json can we be sure that is the code which was released, or is it possible that later commits get included in that version?

5 Likes

Hi Charlie,

I can confirm those points for you.

It appears that they are daily, so it is essentially all the commits to master each day squashed into one?

Yup, exactly right, we essentially delete all the old content, then move the new content in and let git work out the difference each night.

When the version changes in package.json can we be sure that is the code which was released?

Yup, 100%. All code on master is automatically deployed and if you see a change in the package.json version, then the code at that point in time is the code that was deployed for that version. All changes to a package require a change in version number, so there’s never a chance you’re looking at unreleased code.

Hope that helps.

2 Likes

Excellent, it’s very helpful to know the checkin contains the deployed version rather than work in progress.

In that case is there any chance of having tags applied on those checkins? Back when this code was in the atlaskit-mk-2 repo it would have tags like @atlaskit/adf-schema@4.2.0 that made it easy to find the right version. I’d find tags very useful if you’re able to get them onto atlassian-frontend-mirror

1 Like

Hi Charlie, I’ve checked and we would need to do a bit of work to get that working. It’s on our backlog, though there are higher priority requests ahead of it. I don’t have an ETA for you, but I understand why that would be helpful!

To add to that, if it helps Charlie you can use this git snippet to get the commit that a package version was released in.

$git grep "version\": \"69.4.2\"" $(git rev-list --all -- media/media-card/package.json) -- media/media-card/package.json | tail -1

c6a0607f0e2e83d40559f910a913986cd0b6de9b:media/media-card/package.json:  "version": "69.4.2",

Where you can replace the version and package with the one you care about. (It’s essentially getting a list of all the commits that touched a specific package.json, then searching those commits for one that contains the version that we want, then printing the first one of those commits).
You could put that in a nice wrapper function to make it easier to use:

function getVersion {
  PKG_PATH="$1"
  PKG_VERSION="$2"
  git grep "\"version\": \"$PKG_VERSION\"" $(git rev-list --all -- $PKG_PATH/package.json) -- $PKG_PATH/package.json | tail -1
}

Which would be used like so:

$ getVersion media/media-card 69.4.2              

c6a0607f0e2e83d40559f910a913986cd0b6de9b:media/media-card/package.json:  "version": "69.4.2",

Hope that helps!

3 Likes