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

wip: sessions API #12441

Draft
wants to merge 14 commits into
base: next
Choose a base branch
from
Draft

wip: sessions API #12441

wants to merge 14 commits into from

Conversation

ascorbic
Copy link
Contributor

Changes

Implementing sessions RFC

Testing

Docs

Copy link

changeset-bot bot commented Nov 15, 2024

🦋 Changeset detected

Latest commit: 82551ae

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

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

@ascorbic ascorbic changed the title wip: experimental sessions wip: sessions API Nov 16, 2024
* feat: add session config

* chore: add session config docs

* Fix

* Expand doc

* Handle schema

* Remove example

* Format

* Lock

* Fix schema

* Update packages/astro/src/types/public/config.ts

Co-authored-by: Sarah Rainsberger <[email protected]>

* Update packages/astro/src/types/public/config.ts

Co-authored-by: Sarah Rainsberger <[email protected]>

* Add link to Sessions RFC in config.ts

* Move session into experimental

---------

Co-authored-by: Sarah Rainsberger <[email protected]>
@github-actions github-actions bot added pkg: astro Related to the core `astro` package (scope) docs pr labels Nov 17, 2024
* feat: add session object

* Add tests and fix logic

* Fixes

* Allow string as cookie option

* wip: implement sessions (#12478)

* feat: implement sessions

* Add middleware

* Action middleware test

* Support URLs

* Remove comment

* Changes from review

* Update test

* Ensure test file is run
@ascorbic
Copy link
Contributor Author

!preview sessions

1 similar comment
@ascorbic
Copy link
Contributor Author

!preview sessions

@github-actions github-actions bot added the 🚨 action Modifies GitHub Actions label Nov 22, 2024
@ascorbic
Copy link
Contributor Author

!preview sessions

@ascorbic
Copy link
Contributor Author

!preview sessions

1 similar comment
@ascorbic
Copy link
Contributor Author

!preview sessions

@ascorbic
Copy link
Contributor Author

!preview sessions

@ascorbic
Copy link
Contributor Author

!preview sessions

@ascorbic
Copy link
Contributor Author

!preview sessions

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-20241122114539) 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-20241122114539) has not been published on npm
🦋  info @astrojs/db is being published because our local version (0.0.0-sessions-20241122114539) 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-20241122114539) has not been published on npm
🦋  info @astrojs/mdx is being published because our local version (0.0.0-sessions-20241122114539) 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-20241122114539) has not been published on npm
🦋  info @astrojs/react is being published because our local version (0.0.0-sessions-20241122114539) 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-20241122114539) has not been published on npm
🦋  info @astrojs/svelte is being published because our local version (0.0.0-sessions-20241122114539) 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-20241122114539) has not been published on npm
🦋  info @astrojs/web-vitals is being published because our local version (0.0.0-sessions-20241122114539) 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-20241122114539) has not been published on npm
🦋  info @astrojs/studio is being published because our local version (0.0.0-sessions-20241122114539) 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-20241122114539) 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-20241122114539"
🦋  info Publishing "create-astro" at "0.0.0-sessions-20241122114539"
🦋  info Publishing "@astrojs/db" at "0.0.0-sessions-20241122114539"
🦋  info Publishing "@astrojs/markdoc" at "0.0.0-sessions-20241122114539"
🦋  info Publishing "@astrojs/mdx" at "0.0.0-sessions-20241122114539"
🦋  info Publishing "@astrojs/preact" at "0.0.0-sessions-20241122114539"
🦋  info Publishing "@astrojs/react" at "0.0.0-sessions-20241122114539"
🦋  info Publishing "@astrojs/solid-js" at "0.0.0-sessions-20241122114539"
🦋  info Publishing "@astrojs/svelte" at "0.0.0-sessions-20241122114539"
🦋  info Publishing "@astrojs/vue" at "0.0.0-sessions-20241122114539"
🦋  info Publishing "@astrojs/web-vitals" at "0.0.0-sessions-20241122114539"
🦋  info Publishing "@astrojs/markdown-remark" at "0.0.0-sessions-20241122114539"
🦋  info Publishing "@astrojs/studio" at "0.0.0-sessions-20241122114539"
🦋  info Publishing "@astrojs/underscore-redirects" at "0.0.0-sessions-20241122114539"
🦋  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 c30fe82c0a54598f

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

::endgroup::
::group::@astrojs/prism:build
cache miss, executing 96f97a79008a141e

> @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 3d8701805e84d5ae

> [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 52b70f3f16220951

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

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

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

::endgroup::
::group::@astrojs/markdown-remark:build
cache miss, executing 6ab1ebb2ceffce83

> @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 a5537b4d44675966

> [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/studio:build
cache miss, executing 0343e7a551e0f7d0

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

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

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

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

> @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 9aa6f4ae9cfaeba1

> @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::@benchmark/timer:build
cache miss, executing bfc69861343ddf13

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

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

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

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

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

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

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

::endgroup::
::group::@astrojs/react:build
cache miss, executing 7036dce223693c08

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

::endgroup::
::group::@astrojs/vue:build
cache miss, executing 616b1e8ed5b58db7

> @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/underscore-redirects:build
cache miss, executing 61889efca41324aa

> @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 6e080f8a7c2d26da

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

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

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

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

> @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 3126b545cadf9ba7

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

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

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

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

> @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 676ae56b07edcefd

> @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:    49.533s 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🚨 action Modifies GitHub Actions docs pr pkg: astro Related to the core `astro` package (scope)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant