Skip to content

Commit 9dc2545

Browse files
authored
Merge branch 'main' into ignored-packages
2 parents 1a81331 + 7febb59 commit 9dc2545

27 files changed

Lines changed: 555 additions & 70 deletions

‎.changeset/gold-mangos-search.md‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@changesets/cli": patch
3+
---
4+
5+
Fixed the printed filename in the verbose output of `changeset status`.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@changesets/config": patch
3+
---
4+
5+
Fixed the declared JSON schema type for the `changelog` config option.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@changesets/config": patch
3+
---
4+
5+
Fixed the declared JSON schema type for the `commit` config option.

‎.changeset/stupid-jars-rest.md‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"@changesets/cli": patch
3+
"@changesets/apply-release-plan": patch
4+
---
5+
6+
Fixed an issue with dependency ranges still using pre-existing range modifiers instead of fixed package versions when performing a snapshot release. This ensures that installs of snapshot versions are always reproducible.

‎.circleci/config.yml‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ version: 3
22
jobs:
33
test:
44
docker:
5-
- image: circleci/node:10.13.0
5+
- image: circleci/node:12.22.2
66
working_directory: ~/repo
77
steps:
88
- checkout
@@ -40,7 +40,7 @@ jobs:
4040

4141
typescript:
4242
docker:
43-
- image: circleci/node:10.13.0
43+
- image: circleci/node:12.22.2
4444
working_directory: ~/repo
4545
steps:
4646
- checkout
@@ -58,7 +58,7 @@ jobs:
5858

5959
lint:
6060
docker:
61-
- image: circleci/node:10.13.0
61+
- image: circleci/node:12.22.2
6262
working_directory: ~/repo
6363
steps:
6464
- checkout

‎README.md‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,13 @@ To make releasing easier, you can use [this changesets github action](https://gi
6969
- [Firebase Javascript SDK](https://github.com/firebase/firebase-js-sdk)
7070
- [Formik](https://github.com/formium/formik)
7171
- [MobX](https://github.com/mobxjs/mobx)
72+
- [Nhost](https://github.com/nhost/nhost)
7273
- [verdaccio](https://verdaccio.org/)
7374
- [Chakra UI](https://chakra-ui.com/)
7475
- [Astro](https://astro.build)
76+
- [SvelteKit](https://kit.svelte.dev/)
77+
- [Hydrogen](https://hydrogen.shopify.dev)
78+
- [react-pdf](https://github.com/diegomura/react-pdf)
7579

7680
# Thanks/Inspiration
7781

‎docs/command-line-options.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ This command is used to allow you to skip packages from being published. This al
8787
1. If the package is mentioned in a changeset that also includes a package that is not ignored, publishing will fail.
8888
2. If the package requires one of its dependencies to be updated as part of a publish.
8989

90-
These restrictions exist to ensure your repository or published code do not end up in a broken state. For a more detailed intricacies of publishing, check out our guide on [problems publishing in monorepos](./problems-publishing-in-monorepos).
90+
These restrictions exist to ensure your repository or published code do not end up in a broken state. For a more detailed intricacies of publishing, check out our guide on [problems publishing in monorepos](./problems-publishing-in-monorepos.md).
9191

9292
```
9393
changeset version --snapshot

‎docs/modifying-changelog-format.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Next, change your `.changeset/config.json` to point to the new package:
2121
If you want to write your own, you can reference a file path. For example, you can create a new file `.changeset/my-changelog-config.js`, then you can reference it in the `.changeset/config.json` file as:
2222

2323
```
24-
"changelog": ".changeset/my-changelog-config.js"
24+
"changelog": "./my-changelog-config.js"
2525
```
2626

2727
## Writing Changelog Formatting Functions

‎packages/apply-release-plan/src/index.test.ts‎

Lines changed: 49 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ async function testSetup(
7474
fixtureName: string,
7575
releasePlan: ReleasePlan,
7676
config?: Config,
77+
snapshot?: string | undefined,
7778
setupFunc?: (tempDir: string) => Promise<any>
7879
) {
7980
if (!config) {
@@ -108,7 +109,8 @@ async function testSetup(
108109
changedFiles: await applyReleasePlan(
109110
releasePlan,
110111
await getPackages(tempDir),
111-
config
112+
config,
113+
snapshot
112114
),
113115
tempDir
114116
};
@@ -653,6 +655,47 @@ describe("apply release plan", () => {
653655
version: "1.0.0"
654656
});
655657
});
658+
it("should use exact versioning when snapshot release is applied, and ignore any range modifiers", async () => {
659+
const releasePlan = new FakeReleasePlan(
660+
[
661+
{
662+
id: "some-id",
663+
releases: [{ name: "pkg-b", type: "minor" }],
664+
summary: "a very useful summary"
665+
}
666+
],
667+
[
668+
{
669+
changesets: ["some-id"],
670+
name: "pkg-b",
671+
newVersion: "1.1.0",
672+
oldVersion: "1.0.0",
673+
type: "minor"
674+
}
675+
]
676+
);
677+
let { changedFiles } = await testSetup(
678+
"simple-project-caret-dep",
679+
releasePlan.getReleasePlan(),
680+
releasePlan.config,
681+
"canary"
682+
);
683+
684+
let pkgPath = changedFiles.find(a =>
685+
a.endsWith(`pkg-a${path.sep}package.json`)
686+
);
687+
688+
if (!pkgPath) throw new Error(`could not find an updated package json`);
689+
let pkgJSON = await fs.readJSON(pkgPath);
690+
691+
expect(pkgJSON).toMatchObject({
692+
name: "pkg-a",
693+
version: "1.1.0",
694+
dependencies: {
695+
"pkg-b": "1.1.0"
696+
}
697+
});
698+
});
656699

657700
describe("internal dependency bumping", () => {
658701
describe("updateInternalDependencies set to patch", () => {
@@ -2088,6 +2131,7 @@ describe("apply release plan", () => {
20882131
"simple-project",
20892132
releasePlan.getReleasePlan(),
20902133
releasePlan.config,
2134+
undefined,
20912135
setupFunc
20922136
);
20932137

@@ -2114,6 +2158,7 @@ describe("apply release plan", () => {
21142158
"simple-project",
21152159
releasePlan.getReleasePlan(),
21162160
{ ...releasePlan.config, ignore: ["pkg-a"] },
2161+
undefined,
21172162
setupFunc
21182163
);
21192164

@@ -2156,6 +2201,7 @@ describe("apply release plan", () => {
21562201
"simple-project",
21572202
releasePlan.getReleasePlan(),
21582203
releasePlan.config,
2204+
undefined,
21592205
setupFunc
21602206
);
21612207

@@ -2212,6 +2258,7 @@ describe("apply release plan", () => {
22122258
null
22132259
]
22142260
},
2261+
undefined,
22152262
setupFunc
22162263
);
22172264

@@ -2294,6 +2341,7 @@ describe("apply release plan", () => {
22942341
null
22952342
]
22962343
},
2344+
undefined,
22972345
setupFunc
22982346
);
22992347

‎packages/apply-release-plan/src/index.ts‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,8 @@ export default async function applyReleasePlan(
117117
config.___experimentalUnsafeOptions_WILL_CHANGE_IN_PATCH
118118
.onlyUpdatePeerDependentsWhenOutOfRange,
119119
bumpVersionsWithWorkspaceProtocolOnly:
120-
config.bumpVersionsWithWorkspaceProtocolOnly
120+
config.bumpVersionsWithWorkspaceProtocolOnly,
121+
snapshot
121122
});
122123
});
123124

0 commit comments

Comments
 (0)