* Allow islands to be re-rendered with new props on page transition
* Adjust the expected styles
* Restore test expectation
* Add changeset and final change
* linting
* Implement transition:persist-props behavior
* Fix lockfile
* Fix expectations
* App is hyrid
* Update .changeset/lovely-nails-cough.md
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
* Update .changeset/lovely-nails-cough.md
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
* Update .changeset/lovely-nails-cough.md
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
---------
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
* Add new levels of notification
* feat: proper support
* chore: changeset
* fix: remove unrelated change
* test: add test
* feat: implement new icons
* fix: go back to previous layout
* fix: custom app number
---------
Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
* fix(markdown): don’t generate mdast html nodes
`html` nodes from mdast are converted to `raw` hast nodes. These nodes
are then not processed by proper rehype plugins. Typically if a remark
plugin generates `html` nodes, this indicates it should have actually
been a rehype plugin.
This changes the remark plugins that generate `html` nodes into rehype
nodes. These were `remarkPrism` and `remarkShiki`.
Closes#9909
* Apply suggestions from code review
* refactor(mdx): move user defined rehype plugins after syntax highlighting
* fix(mdx): fix issue in mdx rehype plugin ordering
* docs: explain why html/raw nodes are avoided in changeset
This also includes some hints on what users could do to upgrade of they
rely on these nodes.
* Fix MDX rehype plugin ordering
* refactor(remark): restore remarkPrism and remarkShiki
They aren’t used anymore, but removing would be a breaking change.
* chore: mark deprecated
* Apply suggestions from code review
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
* Update .changeset/thirty-beds-smoke.md
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
---------
Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
* feat(toolbar): Allow every element to have every color
* chore: changeset
* fix: add validatio
* fix: ok but what happened even
* nit: cooler messages
* fix: toggles
* deps: drizzle preview
* feat: db.batch and method run handling
* refactor: use db.batch in test fixture
* deps: bump to drizzle 0.29.5
* chore: changeset
* fix: unpin drizzle version
* fix: db execute should uh... execute
* Add integrations API for adding db config/seed files
* Fix seeding when user seed file is present
* Add basic test and fixture for integrations API
* Freeze that lockfile
* Test to see if this is a Windows fix
* Don’t import.meta.glob integration seed files
* Make integration seed files export a default function
* style: rejiggle
* Fix temporary file conflicts
* Remove changes to Astro’s core types, type utility method instead
* Use `astro:db` instead of `@astrojs/db`
* Revert unnecessarily cautious temporary path name
This reverts commit ef2156e41b.
* Add changeset
* Fix entrypoints and `asDrizzleTable` usage in changeset
* Getting Nate in on the co-author action
Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
* Fix user seed file in integrations fixture
* Update `seedLocal()` after merge
* Provide empty `seedFiles` array in `db execute`
---------
Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
* feat: check for --remote
* chore: remove bad ticketing example cols
* fix: get seed file working with build
* Revert "fix: get seed file working with build"
This reverts commit 92830a106164b0997c820a3e0bf2a582018084a0.
* fix: seed from build instead of runtime
* refactor: move recreateTables out of runtime
* Revert "refactor: move recreateTables out of runtime"
This reverts commit d01a802ad7915fabc4c4ac35b2d907eae0538d95.
* fix: in-memory db for test fixture
* chore: changeset
* refactor: generate random db name instead
* refactor: use yargs-parser for flag
* chore: remove in-memory db logi
* refactor: rename random id flag for clarity
* feat: support --remote in dev
* feat: support --remote on shell
* refactor: inline db client
* feat: support --remote on db execute
* chore: stray console log
* chore: remove recreateTables from runtime
* chore: update seeding for new signature
* chore: remove unused error imports
* fix(create-astro): add fallback when registry fails to return the current package version
* feat(create-astro): inline most current package versions as fallback
* test(create-astro): update typescript tests to check for undefined
* test(create-astro): properly reset fixtures
* refactor: read dependencies from workspace root
* refactor: error on missing values
* Include virtual declaration in package
* Update .changeset/good-rats-bathe.md
---------
Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
* fix(#8625): smooth scrolling in SPA mode on iOS
* perf(router): run cb every 200ms only when scolling
* refactor(router): suggested changes and fixes
Suggested changes:
- change interval time from 200 to 50ms
- initialize `last*` vars together with the call to `setInterval()`
- clear interval when scroll positions stop changing, independent of
history state
Additional changes:
- remove unused `throttle()` function
- move guarded block to inside `onScrollEnd()` since using history
navigation will trigger our "popstate" callback and fire additional
"scroll" and "scrollend" events, causing redundant expensive calls to
`replaceState()`
* adds changeset
---------
Co-authored-by: Martin Trapp <94928215+martrapp@users.noreply.github.com>
* fix(toolbar): Make it so every built-in app can be closed by outside clicks
* chore: changeset
* test: add tests
* test: fix test
* ci: don't run bundle-size on dev-toolba
* fix(node): add user specified headers to preview server responses
* docs: clarify comment
* style: new line
* test: remove test
* chore: add changeset
* Initial DB migration code
* chore: update package.json
* chore: update lockfile
* feat: add db as top-level config value
* Small package change
* Add a very basic test
* deps: remove unused
* chore: astro/db scripts, exports, deps
* chore: set tsconfig to monorepo defaults
* feat: MVP to use libsql in dev
* fix: test fixture paths
* fix: test file paths
* chore: remove CLI tests
* fix: add astro-scripts to db
* fix: package.json merge
* fix: load seed file separately for build
* feat: create db on filesystem for build
* fix: ul test. It passes now!
* Squashed commit of the following:
commit acdddd728c56f25e42975db7f367ab8a998e8c41
Author: Princesseuh <3019731+Princesseuh@users.noreply.github.com>
Date: Wed Jan 10 14:06:16 2024 -0500
fix: proper type augment for the config
commit b41ca9aacf291d1e5f0a27b6d6339ce4fc608ec3
Author: Nate Moore <nate@astro.build>
Date: Tue Jan 9 14:33:42 2024 -0600
wip: type augmentation
* feat: data() fn with basic type safety
* wip: update from seed file to data()
* fix: bad collectionSchema data type
* refactor: move dev to use filesystem to run seed at right time
* chore: remove seed file logic
* docs: add basic README
* CLI sync command
* Runtime checking of writable
* docs: add join example
* Implement defineWritableCollection
* feat: use studio connection for studio builds
* fix: add defineWritableCollection export
* refactor: use getTableName() util
* feat(db): add support for pass-through `astro db` command
* chore: add error map
* fix: add drizzle import
* refactor: studio -> db cli
* feat: add ticketing example
* fix: bad types in astro config
* fix: remove invalid `data()` on writable collection
* fix: vite warning on load-astro-config
* wip: add seeding for readable collections (nonstable ids!)
* merge migration work into branch
* cleanup migration commands
* migrate seed data to new db push command
* add migrations table to db
* fix remote db bugs
* fix: warn writable collections when studio false
* chore: delete README contents (now on Notion)
* chore: remove blank README
* chore: add dev dependency on db
* Removed unused deps
* 0.1.0
* Add config-augment.d.ts to published artifacts"
* Fixes merge issues with main
* fix: support promise response from data()
* feat: basic glob fixture
* Add a main field
* Give a help message when no db command is provided
* feat: `db push --token` for GitHub CI secrets
* fix getPackage for db package
* 0.1.2
* wip: build a table type
* chore: update lockfile
* chore: temporarily remove `Table` type
* feat: better Table object for type inference
* format
* add primaryKey support
* improve snapshot parsing support
* cleanup primary key support, db push
* add simple db shell
* cleanup old copy paste code
* feat: scrappy global data() prototype
* feat(test): recipes example
* fix: use Extract to narrow keyof to strings
* 0.1.3
* Create a runtime version of createRemoteDatabaseClient
* 0.1.4
* Grab the dbUrl from the environment
* 0.1.5
* Expose the database to the build output
* 0.1.6
* 0.1.7
* 0.1.15
* wip: data() -> set() concept
* fix: just infer insert keys for now
* refactor: rewrite to injected set() function
* deps: chokidar, drizzle
* feat: glob support with { db, table } signature
* chore: move basics to new data set
* refactor: set -> seed
* feat: expose Model.table
* refactor: clean up types
* feat: migrations now working!
* upgrade @libsql/client
* format
* expose relevant types
* 0.1.16
* feat: config design
* feat: add indexes from collectionToTable
* feat: add indexes to setupDbTables
* fix: remove unique constraint on recipeId
* Use an import statement to grab the database file
* 0.1.17
* Remove unused import
* Rename to ?fileurl
* 0.1.18
* feat: index migrations
* move migration logic to turso, add back sync support
* feat: add queries unit tests and fix related bugs
* refactor: move field queries to field-queries.test
* feat: index query tests
* refactor: reorganize the rats nest of files
* Make the DB_URL be root relative
* Upgrade to latest libsql
* 0.1.19
* 0.1.20
* Make work in webcontainer
* 0.1.22
* Remove content database from the static build
* 0.1.23
* chore: remove `optional: true` from pk
* chore: disable console linting for CLI
* fix: remove `id` column from Table type
* chore: remove `AstroId` type
* fix(ex): add `id` col to ticketing
* 0.2.0
* 0.2.1
* add keywords
* 0.2.2
* feat: API shape
* feat: FINALLY collection and name attached
* refactor: move to arrow function signature
* fix: foreignKeys references signature
* chore: unused imports
* feat: add foreignkeys to create table
* chore: lint
* chore: enable foreign keys in local mode only
* refactor: objShallowEqual -> deep diff
* fix: correct `hasDefault` inference
* fix: correct type Config reference
* fix: respect primaryKey from hasDefault
* fix: mark data keys as optional until we have type inference
* improve conflict and dataloss handling
- moved prompts to db push
- moved prompt logic out of lower-level functions
- improved logic overall
- improved user-facing prompt messages
* improve error messaging around studio config missing
* make it more clear when remove vs. local db is in use
* fix bug in prompt logic
* feat: better field.x() types
* feat: better seed() types
* chore: remove `as any` on seed values
* feat: good enough return type on seed :)
* feat: defineData()
* fix: add back promptResponse injection
* fix: use schema.parse to resolve dates
* fix: correctly respect primary key on INSERT INTO
* add short-lived db tokens
* add help output
* add better token error logging
* fix studio tests
* add shortcut link command from studio web ui
* Add support for SQL defaults
You can now use sql`CURRENT_TIMESTAMP`, `NOW`, and a couple of other
helpers, to set defaults.
* chore: todo
* feat: ignore `optional` and `default` when pk is present
* refactor: type `false` instead of type `never`
* feat: prevent `optional` on text pk
* fix db URL import for windows
* fix: add back textField multiline
* fix: remove explicit AUTOINCREMENT on int pk
* feat(db-cli): clean up CLI logging, support --json flag for `astro db verify`, extract shared logic to a utility
* prepare to run seed on all db push commands
* chore: expose setMeta for unit testing
* feat(test): reference add and remove tests
* feat: add references checks to migratiosn
* feat: remove useForeignKey checks
* feat: add pragma when pushing migrations
* feat(test): foreignKeys
* fix: transform collection config to be JSON serializable
* refactor: _setMeta -> preprocess for `table`
* refactor: reference tests
* chore: remove console log
* fix: handle serialized SQL object correctly
* refactor: store raw sql instead
* seed on every push
* Move field schema only a `schema` object
* Fix references test
* 0.3.0
* add default URLs to db package
* 0.3.1
* Fix input types
* fix: primaryKey type check
* 0.3.2
* fix: respect default in table types
* fix: avoid dropping tables on production seed
* fix: escape name on drop table
* feat: allow verify to mock migration file
* Handle unauthorized linking
* Fix verbiage of unauthorized link warning
* Add some color to the unauthorized message
* 0.3.3
* Improve the unauthorized error output
* 0.3.4
* fix: better error message
* Seed the Themes in build too
* Push skipped test
* chore: remove dead isJsonSerializable check
* fix: use `dateType` for dates (oops)
* refactor: clarify date coerce comment
* refactor: remove unused coerce
* chore: unskip date test
* feat: seed -> seedReturning
* refactor: throw when seeding writable in prod
* Add unsafeWritable option
* refactor: use FieldsConfig for Table generic
* chore: lint
* fix: use z.input for AstroConfigWithDB type
* fix: add defaults for boolean config options
* Support new CLI command structure
* Allow writable in the tests
* fix: handle defaults for safe type changes
* refactor: avoid selecting ['schema'] on input types
* 0.3.5
* Rename field->column, collection->table
* Rename collections->tables
* rename to defineReadableTable
* deps: upgrade ticketing-example
* fix: stray console.log
* deps: bump preact again
* chore: preact->react
* fix: parse params.event as number
* fix: correct event references
* Allow integrations to define schema
* fix: file-url plugin failure on repeated generateBundle() runs
* update url
* Cleanup
* Linting
* fix windows file permission issue
When runnng `astro dev`, the watcher would close trying to delete the `content.db` file due to a file permission error. This change makes the local DB client a disposable to allow cleanup after usage.
* Formatting
* "fix" Symbol.dispose usage
---------
Co-authored-by: Nate Moore <nate@astro.build>
Co-authored-by: bholmesdev <hey@bholmes.dev>
Co-authored-by: Fred K. Schott <fkschott@gmail.com>
Co-authored-by: itsMapleLeaf <19603573+itsMapleLeaf@users.noreply.github.com>
* chore: use biome to sort imports
* do the sorting
* Update package.json
Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>
---------
Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>
* Base Environment
* SSRRoutePipeline -> AppEnvironment
* BuildPipeline -> BuildEnvironment
* DevPipeline -> DevEnvironment
* per-request pipeline
* internal middleware: i18n
* delete callEndpoint
* pipeline access for internal middleware
* Address review comments
`environment.ts` is now lives directly in `src/core`, rather than `src/core/render`.
`environment.createPipeline` is removed. `Pipeline.create` is used instead.
Constructors with positional arguments are replaced by `Environment.create` with named arguments.
Clarifies the use of `HiddenPipeline`.
* migrate some of `RenderContext`'s responsibilities to `Pipeline`
* delete renderPage
* RenderContext.params -> Pipeline.params
* delete `RenderContext`
* `Pipeline` -> `RenderContext`
* `Environment` -> `Pipeline`
* `AppEnvironment` -> `AppPipeline`
* `BuildEnvironment` -> `BuildPipeline`
* `DevEnvironment` -> `DevPipeline`
* provide locals directly to renderContext
* add changeset
* add remote image dimension probing, and param for getImage options, and new astro error
* add inferSize parameter to getImage, which probes remote image size, and respective types to picture and image component
* add fixture and tests
* add changeset
* attempt to fix pnpm-lock.yaml
* fix pnpm-lock.yaml again
* pnpm-lock spacing
* fix pnpm-lock AGAIN
* better description of error for docgen
* improve failed to probe error message and correct required dimensions error
* increase timeout for mdx tests
* increasing mdx timeout to 2min to see if it passes, will reduce if it does
* setting mdx timeout to 70 seconds
* Update packages/astro/src/assets/services/service.ts
Co-authored-by: Erika <3019731+Princesseuh@users.noreply.github.com>
* refactor to move logic to getImage instead of validateOptions and to not add a third type to image and picture
* fix broken link created by docs PR
* remove the probe-image-size library due to its use of node APIs
* undo all changes to service.ts that were left after moving inferSize logic to getImage
* update error message
* remove probe-image-size library all together, update error message, add vendored version of complete image-size library instead of refactored version
* Update .changeset/tame-cameras-change.md
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
* Update .changeset/tame-cameras-change.md
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
* reword the error message based on Sarah's previous review
* remove probe-image-size from pnpmlock
* fix lockfile?
* update error message name
* move image-size into vendor folder
* add eslint ignore to a line in image-size
* test if change to mdx test timeout was needed
* Update .changeset/tame-cameras-change.md
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
* update changset syntax
* patch parse heif to account for filetype block being out of order
---------
Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev>
Co-authored-by: Erika <3019731+Princesseuh@users.noreply.github.com>
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
* Improve Node.js performance using an AsyncIterable
* Oops
* Get rid of extra abstraction
* Update .changeset/hip-cherries-behave.md
Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev>
* Check if already resolved
* Resolve on done
* Get rid of unneeded "done"
* Done when length is zero
* Let errors resolve
* Update packages/astro/src/runtime/server/render/astro/render.ts
Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
* Move doctype to top-level
* Document the new function
* Update .changeset/hip-cherries-behave.md
Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
* Update .changeset/hip-cherries-behave.md
---------
Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev>
Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
* Fixes an issue with view transition names containing spaces or punctuation.
* reworked, more robust approach
* better readability and also escapes the escape character (_)
* update changeset
* add comemnts to describe the re-encoding
* updated changeset
* typos
* Apply suggestions from code review
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
* simplify decoding it ever required.
* better coverage and now also checks animation behavior
---------
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>