[fix] Asset versions (#2389)

This PR fixes a bug where the `version` was not updated during our last
release. This causes the assets not to load.

### Change Type

- [x] `patch` — Bug fix
This commit is contained in:
Steve Ruiz 2023-12-31 11:07:38 +00:00 committed by GitHub
parent b373abf605
commit 530596ac5d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View file

@ -34,8 +34,11 @@ Object.defineProperty(global.URL, 'createObjectURL', {
value: jest.fn(),
})
// Extract verson from package.json
const { version } = require('./package.json')
window.fetch = async (input, init) => {
if (input === 'https://unpkg.com/@tldraw/assets@2.0.0-alpha.12/translations/en.json') {
if (input === `https://unpkg.com/@tldraw/assets@${version}/translations/en.json`) {
const json = await import('@tldraw/assets/translations/main.json')
return {
ok: true,

View file

@ -1 +1 @@
export const version = '2.0.0-alpha.12'
export const version = '2.0.0-beta.1'