tldraw/scripts
David Sheldrick 0556b140de
[infra] maybe fix canary publish (#1950)
This last day or two our npm publish script has been randomly failing
due to npm flakiness. I'm seeing the following error:

Failed to save packument. A common cause is if you try to publish a new
package before the previous package has been fully processed.

This doesn't seem to be our fault since we're publishing things in the
right order, the version numbers and package.json files are all correct,
and we're waiting for things to appear in the registry after publishing
before moving on to the next package.

So I'm thinking maybe npm is a little tired right now or something and
needs a little extra time to handle things.

So I've wrapped our publish command inside a retry block.

At the same time I noticed that the `--tolerate-republish` flag does not
seem to be working for canary version numbers, so I've added some extra
logic for that too. Hopefully this means if things fail due to
persistent npm flake we can just run the action again.

### Change Type

- [ ] `patch` — Bug fix
- [ ] `minor` — New feature
- [ ] `major` — Breaking change
- [ ] `dependencies` — Changes to package dependencies[^1]
- [ ] `documentation` — Changes to the documentation only[^2]
- [ ] `tests` — Changes to any test code only[^2]
- [x] `internal` — Any other changes that don't affect the published
package[^2]
- [ ] I don't know

[^1]: publishes a `patch` release, for devDependencies use `internal`
[^2]: will not publish a new version
2023-09-26 15:36:32 +00:00
..
lib [infra] maybe fix canary publish (#1950) 2023-09-26 15:36:32 +00:00
api-check.ts Incorporate signia as @tldraw/state (#1620) 2023-06-20 13:31:26 +00:00
build-api.ts [chore] update lazyrepo (#1211) 2023-05-02 12:25:26 +00:00
build-package.ts [chore] update lazyrepo (#1211) 2023-05-02 12:25:26 +00:00
CHANGELOG.md transfer-out: transfer out 2023-04-25 12:01:25 +01:00
check-scripts.ts tldraw zero - package shuffle (#1710) 2023-07-17 21:22:34 +00:00
clean.sh Add next cache to clean command (#1811) 2023-08-18 12:52:51 +00:00
lint.ts Revert 09c36781 & tweak linting (#1501) 2023-06-02 10:45:51 +00:00
package.json (chore) bump (#1744) 2023-07-18 10:19:28 +00:00
postpack.sh transfer-out: transfer out 2023-04-25 12:01:25 +01:00
prepack.ts avoid lazy race conditions (#1364) 2023-05-12 15:41:40 +00:00
publish-canary.ts [infra] use npx to run auto (#1521) 2023-06-05 14:46:59 +00:00
publish-manual.ts Fix publishing (#1338) 2023-05-09 13:25:56 +00:00
publish-new.ts Add cloud shape (#1708) 2023-07-07 15:32:08 +00:00
refresh-assets.ts tldraw zero - package shuffle (#1710) 2023-07-17 21:22:34 +00:00
tsconfig.json transfer-out: transfer out 2023-04-25 12:01:25 +01:00
typecheck.ts replace console.log with nicelog (#1496) 2023-06-01 18:01:49 +00:00