-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Data collections and references #6850
Merged
Merged
Changes from 1 commit
Commits
Show all changes
135 commits
Select commit
Hold shift + click to select a range
335e516
feat: add generated lookup-map
bholmesdev 46b192f
feat: wire up fast getEntryBySlug() lookup
bholmesdev 2383345
fix: consider frontmatter slugs
bholmesdev e2bae4b
chore: changeset
bholmesdev ff9a44b
chore: lint no-shadow
bholmesdev dc7c88b
fix: revert bad rootRelativePath change
bholmesdev 0518c79
chore: better var name
bholmesdev 7695a98
refactor: generated `.json` to in-memory map
bholmesdev bacab79
chore: removed unneeded await
bholmesdev 1b04242
chore: removed unneeded await
bholmesdev fea6da5
Revert "chore: removed unneeded await"
bholmesdev aa1b8ca
fix: bad `GetEntryImport` type
bholmesdev cde0830
chore: remove unused variable
bholmesdev 5aa65d7
refactor: for -> Promise.all
bholmesdev 6b498f3
refactor: replace duplicate parseSlug
bholmesdev 1a076a7
refactor: add cache layer
bholmesdev 1255449
Revert "refactor: add cache layer"
bholmesdev a561ed6
feat: json collection POC
bholmesdev 3bcfa2e
wip: add test json file
bholmesdev c5cf656
wip: playing with api ideas
bholmesdev 7395532
refactor: extract getCollectionName
bholmesdev aae33f7
feat: add defineDataCollection
bholmesdev 2100ad0
refactor: variable destructure
bholmesdev bf09eda
wip: basic data entry pipeline
bholmesdev b68ebf0
chore: revert fixture playing
bholmesdev 38d52bc
wip: basic entry array parser
bholmesdev 3b0f9fc
feat: basic data type gen
bholmesdev 1d1215b
chore: add with-data playground
bholmesdev 3f8c3e6
feat: add error when `defineDataCollection()` isn't used
bholmesdev 74f990c
fix: missing error message
bholmesdev 96ac415
feat: data collections are here!
bholmesdev 24a3a90
wip: play with data query APIs
bholmesdev 7d301b6
feat: reference() util!
bholmesdev 221e273
fix: Markdoc `$entry` variable
bholmesdev 2639bb9
play: add reference util with markdoc
bholmesdev ec5600c
chore: delete console logs
bholmesdev d03d18a
feat: `src/data/`!
bholmesdev 8682266
feat: reference() errors
bholmesdev 84323c4
fix: handle hoisted schema parse errors
bholmesdev 2f78268
fix: reload config and invalid on collection changes
bholmesdev 6401362
feat: separate maps for content and data entries
bholmesdev fa2c387
feat: new `reference()` API that fixes type inference
bholmesdev 62cd27a
feat: support `defineCollection()` for data config
bholmesdev e64622a
fix: defineCollection `type` inferenenceπinference
bholmesdev 4d815b0
chore: lock
bholmesdev bd47ee5
feat: getCollection() for everything!
bholmesdev 85b564f
feat: get full entry access from reference()
bholmesdev 9faefcc
chore: changeset
bholmesdev 3eb8c45
wip: type error on acorn?
bholmesdev d30e0c4
chore: lint
bholmesdev 67b0386
chore: add slugger to data ID processing
bholmesdev 6fbc54f
chore: astro/zod -> zod
bholmesdev b7929d2
chore: example version
bholmesdev 03fbd41
chore: remove slugifier from data id
bholmesdev b136af5
chore: remove dead getDataCollection
bholmesdev 38addf1
chore: remove dead defineDataCollection
bholmesdev 54300e0
fix: bad collection import
bholmesdev 11d8304
chore: lock
bholmesdev 638643d
feat: add data collections to lookup map
bholmesdev 7ef9c0f
refactor: stop resolving data from reference
bholmesdev 6a0cb6f
feat: introduce getEntry and new reference()
bholmesdev ccf5219
fix: update config loader
bholmesdev 0c0fe93
fix: reference() type
bholmesdev 97e2fc9
feat: test self references (they work 🎉)
bholmesdev bf11a19
fix: use `slug` for content references
bholmesdev 4a4f2e1
fix: bad getEntry content type
bholmesdev f868fba
chroe: remove console logs
bholmesdev b1e233d
fix: strict null checks on with-data
bholmesdev c35093b
feat: add getEntries for ref arrays
bholmesdev af96dde
chore: fix type hints for reference strings
bholmesdev 07193f9
chore: change to type never for clarity
bholmesdev f7d8e5a
play: try getEntries
bholmesdev 8ff1ab4
Return to "everything goes in `src/content/`
bholmesdev 225e1df
fix: remove old function
bholmesdev 132446b
chore: update to AstroErrors
bholmesdev 4b510bf
chore: remove unused fixture files
bholmesdev 0d1ff7c
play: names
bholmesdev 11770e3
deps: js-yaml
bholmesdev 1205234
feat: data collection YAML with error handling
bholmesdev e6ad792
refactor: remove console log
bholmesdev 2c7f7e4
refactor: code cleanup
bholmesdev c661e70
fix: allow mixed content to pass through glob imports
bholmesdev bb7b827
chore: move lookupMap util to virtual-mod
bholmesdev 71978fb
Merge branch 'main' into feat/data-collections
bholmesdev 474a6fd
refactor: new lookupMap logic, better errors
bholmesdev 3256851
chore: change MixedContent title
bholmesdev faede6d
refactor: remove unneeded try / catch
bholmesdev ef13323
fix: use `ws.send` for type gen errors
bholmesdev 5ea9316
fix: bubble `ws.send` errors from astro sync
bholmesdev 2772a48
refactor: revert verbose astroContentCollectionEntry
bholmesdev 70f512d
Merge branch 'main' into feat/data-collections
bholmesdev 56b562a
fix: bad with-data package name
bholmesdev d025ca9
fix: bad virtual mod flag
bholmesdev 62b96cd
chore: remove with-data playground
bholmesdev 3d674f1
test: data collection authors
bholmesdev b83fe29
test: translations data collection
bholmesdev 7297a1f
fix: add `.yml` support
bholmesdev dc6ea7d
refactor: mix in `.yaml` just for fun
bholmesdev bcf30e4
refactor: i18n -> translations
bholmesdev 2dbb445
chore: content-collection-references fixture
bholmesdev 4f1ab81
chore: bad lockfile
bholmesdev 717a5b6
fix: bad ContentLookupMap import
bholmesdev 2a1815c
chore: revert back to astroContentCollectionEntry
bholmesdev 4038f26
Merge branch 'main' into feat/data-collections
bholmesdev b9456d8
test: collection references
bholmesdev 6f3c19b
fix: bad error code override
bholmesdev 2b951b4
chore: remove unused asset
bholmesdev c8a4660
test: sync errors
bholmesdev 91dfd4d
chore: remove stray console log
bholmesdev 321943e
chore: lock
bholmesdev 290ac01
chore: revert with-markdoc changes
bholmesdev 3c415b7
chore: doc error states, remove bad merge code
bholmesdev 6386ac9
chore: remove bad `as any`
bholmesdev 6fa410d
chore: lint
bholmesdev c468a14
chore: inline ContentLookupMap comments
bholmesdev 5b95d51
chore: settings -> config
bholmesdev 5b5eb31
fix: put back `defineCollection()`
bholmesdev c35f0b8
fix: entry.slug for get content collection
bholmesdev 637eca9
chore: update get-entry-type tests
bholmesdev 65f37f6
docs: totally shorten "missing a `type`"
bholmesdev 22ca645
docs: truncate share a `schema`
bholmesdev 7aae335
Merge branch 'main' into feat/data-collections
bholmesdev b9d8a47
chore: add `test:unit` and `test:unit:match`to base
bholmesdev 9c0c418
chore: update changeset
bholmesdev 087485b
refactor: cleanup runtime types and inline comments
bholmesdev 39b4740
nit: [0] instead of shift()
bholmesdev 7aa0f3c
refactor: `getRelativeEntryPath()` util
bholmesdev 4a8c90c
chore: capitalized Collections for test:match
bholmesdev afa743a
nit: ?? viteId on split
bholmesdev 2cc3d20
nit: separate Params obj
bholmesdev 26b7976
chore: add try / catch on readFile
bholmesdev 1e31a4e
nit: `const data`
bholmesdev 506944f
chore: clean up data collection exceptions
bholmesdev 81fcc91
nit: `?? ''` for search params
bholmesdev c8a715a
chore: remove TODO on hoisted error
bholmesdev File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
refactor: new lookupMap logic, better errors
- Loading branch information
commit 474a6fd52a5832db65aba7debf547a58fb2c6a4d
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Love it! ❤️
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Learn from the best ❤️