Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: re-export unstorage drivers #12505

Closed
wants to merge 2 commits into from
Closed

Conversation

ascorbic
Copy link
Contributor

Changes

Well, this sucks, but dynamic imports directly from unstorage don't work with pnpm. This PR adds a script to auto-generate the re-exports. I've prefixed it with astro/internal so that peopel don't think it's a public API.

Testing

Tested locally with a site using node adapter.

Docs

Copy link

changeset-bot bot commented Nov 22, 2024

⚠️ No Changeset found

Latest commit: eef87ce

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions github-actions bot added the pkg: astro Related to the core `astro` package (scope) label Nov 22, 2024
@ascorbic
Copy link
Contributor Author

!preview sessions

@ematipico
Copy link
Member

Isn't there something we can do upstream (maybe with unstorage maintainers) to prevent this? It really is inconvenient

Copy link
Contributor

Snapshots have been released for the following packages:

  • astro@experimental--sessions
Publish Log
🦋  warn ===============================IMPORTANT!===============================
🦋  warn You are in prerelease mode so packages will be published to the beta
🦋  warn         dist tag except for packages that have not had normal releases which will be published to latest
🦋  warn ----------------------------------------------------------------------
🦋  info npm info astro
🦋  info npm info @astrojs/prism
🦋  info npm info @astrojs/rss
🦋  info npm info create-astro
🦋  info npm info @astrojs/db
🦋  info npm info @astrojs/alpinejs
🦋  info npm info @astrojs/markdoc
🦋  info npm info @astrojs/mdx
🦋  info npm info @astrojs/partytown
🦋  info npm info @astrojs/preact
🦋  info npm info @astrojs/react
🦋  info npm info @astrojs/sitemap
🦋  info npm info @astrojs/solid-js
🦋  info npm info @astrojs/svelte
🦋  info npm info @astrojs/tailwind
🦋  info npm info @astrojs/vue
🦋  info npm info @astrojs/web-vitals
🦋  info npm info @astrojs/internal-helpers
🦋  info npm info @astrojs/markdown-remark
🦋  info npm info @astrojs/studio
🦋  info npm info @astrojs/telemetry
🦋  info npm info @astrojs/underscore-redirects
🦋  info npm info @astrojs/upgrade
🦋  info astro is being published because our local version (0.0.0-sessions-20241122143330) has not been published on npm
🦋  warn @astrojs/prism is not being published because version 3.1.0 is already published on npm
🦋  warn @astrojs/rss is not being published because version 4.0.9 is already published on npm
🦋  info create-astro is being published because our local version (0.0.0-sessions-20241122143330) has not been published on npm
🦋  info @astrojs/db is being published because our local version (0.0.0-sessions-20241122143330) has not been published on npm
🦋  warn @astrojs/alpinejs is not being published because version 0.4.0 is already published on npm
🦋  info @astrojs/markdoc is being published because our local version (0.0.0-sessions-20241122143330) has not been published on npm
🦋  info @astrojs/mdx is being published because our local version (0.0.0-sessions-20241122143330) has not been published on npm
🦋  warn @astrojs/partytown is not being published because version 2.1.2 is already published on npm
🦋  info @astrojs/preact is being published because our local version (0.0.0-sessions-20241122143330) has not been published on npm
🦋  info @astrojs/react is being published because our local version (0.0.0-sessions-20241122143330) has not been published on npm
🦋  warn @astrojs/sitemap is not being published because version 3.2.1 is already published on npm
🦋  info @astrojs/solid-js is being published because our local version (0.0.0-sessions-20241122143330) has not been published on npm
🦋  info @astrojs/svelte is being published because our local version (0.0.0-sessions-20241122143330) has not been published on npm
🦋  warn @astrojs/tailwind is not being published because version 5.1.2 is already published on npm
🦋  info @astrojs/vue is being published because our local version (0.0.0-sessions-20241122143330) has not been published on npm
🦋  info @astrojs/web-vitals is being published because our local version (0.0.0-sessions-20241122143330) has not been published on npm
🦋  warn @astrojs/internal-helpers is not being published because version 0.4.1 is already published on npm
🦋  info @astrojs/markdown-remark is being published because our local version (0.0.0-sessions-20241122143330) has not been published on npm
🦋  info @astrojs/studio is being published because our local version (0.0.0-sessions-20241122143330) has not been published on npm
🦋  warn @astrojs/telemetry is not being published because version 3.1.0 is already published on npm
🦋  info @astrojs/underscore-redirects is being published because our local version (0.0.0-sessions-20241122143330) has not been published on npm
🦋  warn @astrojs/upgrade is not being published because version 0.3.4 is already published on npm
🦋  info Publishing "astro" at "0.0.0-sessions-20241122143330"
🦋  info Publishing "create-astro" at "0.0.0-sessions-20241122143330"
🦋  info Publishing "@astrojs/db" at "0.0.0-sessions-20241122143330"
🦋  info Publishing "@astrojs/markdoc" at "0.0.0-sessions-20241122143330"
🦋  info Publishing "@astrojs/mdx" at "0.0.0-sessions-20241122143330"
🦋  info Publishing "@astrojs/preact" at "0.0.0-sessions-20241122143330"
🦋  info Publishing "@astrojs/react" at "0.0.0-sessions-20241122143330"
🦋  info Publishing "@astrojs/solid-js" at "0.0.0-sessions-20241122143330"
🦋  info Publishing "@astrojs/svelte" at "0.0.0-sessions-20241122143330"
🦋  info Publishing "@astrojs/vue" at "0.0.0-sessions-20241122143330"
🦋  info Publishing "@astrojs/web-vitals" at "0.0.0-sessions-20241122143330"
🦋  info Publishing "@astrojs/markdown-remark" at "0.0.0-sessions-20241122143330"
🦋  info Publishing "@astrojs/studio" at "0.0.0-sessions-20241122143330"
🦋  info Publishing "@astrojs/underscore-redirects" at "0.0.0-sessions-20241122143330"
🦋  success packages published successfully:
🦋  [email protected]
🦋  [email protected]
🦋  @astrojs/[email protected]
🦋  @astrojs/[email protected]
🦋  @astrojs/[email protected]
🦋  @astrojs/[email protected]
🦋  @astrojs/[email protected]
🦋  @astrojs/[email protected]
🦋  @astrojs/[email protected]
🦋  @astrojs/[email protected]
🦋  @astrojs/[email protected]
🦋  @astrojs/[email protected]
🦋  @astrojs/[email protected]
🦋  @astrojs/[email protected]
🦋  Creating git tags...
🦋  New tag:  [email protected]
🦋  New tag:  [email protected]
🦋  New tag:  @astrojs/[email protected]
🦋  New tag:  @astrojs/[email protected]
🦋  New tag:  @astrojs/[email protected]
🦋  New tag:  @astrojs/[email protected]
🦋  New tag:  @astrojs/[email protected]
🦋  New tag:  @astrojs/[email protected]
🦋  New tag:  @astrojs/[email protected]
🦋  New tag:  @astrojs/[email protected]
🦋  New tag:  @astrojs/[email protected]
🦋  New tag:  @astrojs/[email protected]
🦋  New tag:  @astrojs/[email protected]
🦋  New tag:  @astrojs/[email protected]
Build Log

> [email protected] build /home/runner/work/astro/astro
> turbo run build --filter=astro --filter=create-astro --filter="@astrojs/*" --filter="@benchmark/*"

• Packages in scope: @astrojs/alpinejs, @astrojs/cloudflare, @astrojs/db, @astrojs/internal-helpers, @astrojs/markdoc, @astrojs/markdown-remark, @astrojs/mdx, @astrojs/netlify, @astrojs/node, @astrojs/partytown, @astrojs/preact, @astrojs/prism, @astrojs/react, @astrojs/rss, @astrojs/sitemap, @astrojs/solid-js, @astrojs/studio, @astrojs/svelte, @astrojs/tailwind, @astrojs/telemetry, @astrojs/underscore-redirects, @astrojs/upgrade, @astrojs/vercel, @astrojs/vue, @astrojs/web-vitals, @benchmark/adapter, @benchmark/timer, astro, create-astro
• Running build in 29 packages
• Remote caching enabled
::group::@astrojs/internal-helpers:build
cache miss, executing 48dcb5643b62ed1c

> @astrojs/[email protected] build /home/runner/work/astro/astro/packages/internal-helpers
> astro-scripts build "src/**/*.ts" && tsc -p tsconfig.json

::endgroup::
::group::@astrojs/telemetry:build
cache miss, executing cbf2daf4f1efa950

> @astrojs/[email protected] build /home/runner/work/astro/astro/packages/telemetry
> astro-scripts build "src/**/*.ts" && tsc

::endgroup::
::group::@astrojs/prism:build
cache miss, executing 7263ae75a71bd0a5

> @astrojs/[email protected] build /home/runner/work/astro/astro/packages/astro-prism
> astro-scripts build "src/**/*.ts" && tsc -p ./tsconfig.json

::endgroup::
::group::create-astro:build
cache miss, executing e727cbd183dc050f

> [email protected] build /home/runner/work/astro/astro/packages/create-astro
> astro-scripts build "src/index.ts" --bundle && tsc

::endgroup::
::group::@astrojs/upgrade:build
cache miss, executing acc981a3c06f501a

> @astrojs/[email protected] build /home/runner/work/astro/astro/packages/upgrade
> astro-scripts build "src/index.ts" --bundle && tsc

::endgroup::
::group::@astrojs/markdown-remark:build
cache miss, executing 7f56974840405de9

> @astrojs/[email protected] build /home/runner/work/astro/astro/packages/markdown/remark
> astro-scripts build "src/**/*.ts" && tsc -p tsconfig.json

::endgroup::
::group::astro:build
cache miss, executing 6d4d9183d3b4f136

> [email protected] build /home/runner/work/astro/astro/packages/astro
> pnpm run prebuild && astro-scripts build "src/**/*.{ts,js}" --copy-wasm && tsc


> [email protected] prebuild /home/runner/work/astro/astro/packages/astro
> astro-scripts prebuild --to-string "src/runtime/server/astro-island.ts" "src/runtime/client/{idle,load,media,only,visible}.ts"

::endgroup::
::group::@astrojs/alpinejs:build
cache miss, executing 2c92d5a26c60e8ef

> @astrojs/[email protected] build /home/runner/work/astro/astro/packages/integrations/alpinejs
> astro-scripts build "src/**/*.ts" && tsc

::endgroup::
::group::@benchmark/adapter:build
cache miss, executing d7ab36605aeeecbe

> @benchmark/[email protected] build /home/runner/work/astro/astro/benchmark/packages/adapter
> astro-scripts build "src/**/*.ts" && tsc

::endgroup::
::group::@benchmark/timer:build
cache miss, executing b8baca862985ed01

> @benchmark/[email protected] build /home/runner/work/astro/astro/benchmark/packages/timer
> astro-scripts build "src/**/*.ts" && tsc

::endgroup::
::group::@astrojs/underscore-redirects:build
cache miss, executing 14a75e535f525998

> @astrojs/[email protected] build /home/runner/work/astro/astro/packages/underscore-redirects
> astro-scripts build "src/**/*.ts" && tsc -p tsconfig.json

::endgroup::
::group::@astrojs/rss:build
cache miss, executing 446c353cf1d56358

> @astrojs/[email protected] build /home/runner/work/astro/astro/packages/astro-rss
> astro-scripts build "src/**/*.ts" && tsc

::endgroup::
::group::@astrojs/partytown:build
cache miss, executing c2ef5837cb2cfde2

> @astrojs/[email protected] build /home/runner/work/astro/astro/packages/integrations/partytown
> astro-scripts build "src/**/*.ts" && tsc

::endgroup::
::group::@astrojs/svelte:build
cache miss, executing e67166d47cf403b7

> @astrojs/[email protected] build /home/runner/work/astro/astro/packages/integrations/svelte
> astro-scripts build "src/index.ts" && astro-scripts build "src/editor.cts" --force-cjs --no-clean-dist && tsc

::endgroup::
::group::@astrojs/sitemap:build
cache miss, executing ca31be972e7b1af3

> @astrojs/[email protected] build /home/runner/work/astro/astro/packages/integrations/sitemap
> astro-scripts build "src/**/*.ts" && tsc

::endgroup::
::group::@astrojs/mdx:build
cache miss, executing 62c69e43f31548a9

> @astrojs/[email protected] build /home/runner/work/astro/astro/packages/integrations/mdx
> astro-scripts build "src/**/*.ts" && tsc

::endgroup::
::group::@astrojs/preact:build
cache miss, executing 0c3bf0bbfd6e72b7

> @astrojs/[email protected] build /home/runner/work/astro/astro/packages/integrations/preact
> astro-scripts build "src/**/*.ts" && tsc

::endgroup::
::group::@astrojs/studio:build
cache miss, executing add70530720ce767

> @astrojs/[email protected] build /home/runner/work/astro/astro/packages/studio
> astro-scripts build "src/**/*.ts" && tsc

::endgroup::
::group::@astrojs/react:build
cache miss, executing 479cee3f8f2fb7bf

> @astrojs/[email protected] build /home/runner/work/astro/astro/packages/integrations/react
> astro-scripts build "src/**/*.ts" && tsc

::endgroup::
::group::@astrojs/tailwind:build
cache miss, executing ea4207de60b9aa39

> @astrojs/[email protected] build /home/runner/work/astro/astro/packages/integrations/tailwind
> astro-scripts build "src/**/*.ts" && tsc

::endgroup::
::group::@astrojs/markdoc:build
cache miss, executing 159666726a714f71

> @astrojs/[email protected] build /home/runner/work/astro/astro/packages/integrations/markdoc
> astro-scripts build "src/**/*.ts" && tsc

::endgroup::
::group::@astrojs/solid-js:build
cache miss, executing 78c93d10d149128b

> @astrojs/[email protected] build /home/runner/work/astro/astro/packages/integrations/solid
> astro-scripts build "src/**/*.ts" && tsc

::endgroup::
::group::@astrojs/vue:build
cache miss, executing 59b2f0dee1675eac

> @astrojs/[email protected] build /home/runner/work/astro/astro/packages/integrations/vue
> astro-scripts build "src/index.ts" && astro-scripts build "src/editor.cts" --force-cjs --no-clean-dist && tsc

::endgroup::
::group::@astrojs/db:build
cache miss, executing beb21c7bc0cbe539

> @astrojs/[email protected] build /home/runner/work/astro/astro/packages/db
> astro-scripts build "src/**/*.ts" && tsc && pnpm types:virtual


> @astrojs/[email protected] types:virtual /home/runner/work/astro/astro/packages/db
> tsc -p ./tsconfig.virtual.json

::endgroup::
::group::@astrojs/web-vitals:build
cache miss, executing 89812cdf4c180afb

> @astrojs/[email protected] build /home/runner/work/astro/astro/packages/integrations/web-vitals
> astro-scripts build "src/**/*.ts" && tsc

::endgroup::

 Tasks:    25 successful, 25 total
Cached:    0 cached, 25 total
  Time:    51.033s 

@ascorbic
Copy link
Contributor Author

This isn't an unstorage problem. It's a module resolution (and package manager) problem.

@ascorbic ascorbic closed this Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg: astro Related to the core `astro` package (scope)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants