Skip to content

Avoid updating the version of the local packages in the playgrounds #1059

Open
@bidoubiwa

Description

@bidoubiwa

Currently, when updating the version of a package, changeset also updates the version of the package in the apps which depends on it. For example:

if instant-meilisearch version is:
https://github.com/meilisearch/instant-meilisearch/blob/004a4989c9febaf60fcb357f576b9776736d7959/packages/instant-meilisearch/package.json#L2-L3

The associated version in any playground is the same:
https://github.com/meilisearch/instant-meilisearch/blob/004a4989c9febaf60fcb357f576b9776736d7959/playgrounds/javascript/package.json#L20-L22

Nonetheless as per the turborepo documentation on Workspaces which depend on each other

To use a workspace inside another workspace, you'll need to specify it as a dependency, using its name.

For instance, if we want apps/docs to import packages/shared-utils, we'd need to add shared-utils as a dependency inside apps/docs/package.json:

```
{
  "dependencies": {
    "shared-utils": "*"
  }
}
```

The * allows us to reference the latest version of the dependency. It saves us from needing to bump the versions of our dependency if the versions of our packages change.

The last part is what is relevant to us

The * allows us to reference the latest version of the dependency. It saves us from needing to bump the versions of our dependency if the versions of our packages change.

Solution

We use changeset to handle versionning.
We need to find a way to configure changeset in order to leave the playgrounds versions of the local packages to *.

For example:

  • I update @meilisearch/instant-meilisearch to v1
  • In the packages.json of the javascript playground, the version of @meilisearch/instant-meilisearch should remain a wild card.
"dependencies": {
    "@meilisearch/instant-meilisearch": "*"
  }

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions