Skip to content

Commit

Permalink
[ci] release
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Feb 14, 2024
1 parent 75fb783 commit 4964fef
Show file tree
Hide file tree
Showing 14 changed files with 82 additions and 34 deletions.
8 changes: 0 additions & 8 deletions .changeset/twelve-eels-fry.md

This file was deleted.

12 changes: 12 additions & 0 deletions packages/adapters/astro/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# @galactiks/astro-integration

## 0.3.0

### Minor Changes

- [`75fb783`](https://github.com/thegalactiks/explorer/commit/75fb783d9473fa5a9fbb8255cb2dcb4af17782cb) Thanks [@emmanuelgautier](https://github.com/emmanuelgautier)! - new types and rss feed support

### Patch Changes

- Updated dependencies [[`75fb783`](https://github.com/thegalactiks/explorer/commit/75fb783d9473fa5a9fbb8255cb2dcb4af17782cb)]:
- @galactiks/config@0.3.0
- @galactiks/explorer@0.3.0

## 0.2.14

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/adapters/astro/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@galactiks/astro-integration",
"version": "0.2.14",
"version": "0.3.0",
"description": "Galactiks Astro integration",
"author": "thegalactiks",
"type": "module",
Expand Down
6 changes: 6 additions & 0 deletions packages/config/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @galactiks/config

## 0.3.0

### Minor Changes

- [`75fb783`](https://github.com/thegalactiks/explorer/commit/75fb783d9473fa5a9fbb8255cb2dcb4af17782cb) Thanks [@emmanuelgautier](https://github.com/emmanuelgautier)! - new types and rss feed support

## 0.2.9

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/config/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@galactiks/config",
"version": "0.2.9",
"version": "0.3.0",
"description": "Reading Galactiks configurations files and get config during website generation",
"author": "thegalactiks",
"type": "module",
Expand Down
6 changes: 6 additions & 0 deletions packages/contentlayer/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @galactiks/contentlayer

## 0.2.0

### Minor Changes

- [`75fb783`](https://github.com/thegalactiks/explorer/commit/75fb783d9473fa5a9fbb8255cb2dcb4af17782cb) Thanks [@emmanuelgautier](https://github.com/emmanuelgautier)! - new types and rss feed support

## 0.1.8

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/contentlayer/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@galactiks/contentlayer",
"version": "0.1.8",
"version": "0.2.0",
"description": "Galactiks contentlayer configurations",
"author": "galactiks",
"type": "module",
Expand Down
12 changes: 12 additions & 0 deletions packages/explorer/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# @galactiks/explorer

## 0.3.0

### Minor Changes

- [`75fb783`](https://github.com/thegalactiks/explorer/commit/75fb783d9473fa5a9fbb8255cb2dcb4af17782cb) Thanks [@emmanuelgautier](https://github.com/emmanuelgautier)! - new types and rss feed support

### Patch Changes

- Updated dependencies [[`75fb783`](https://github.com/thegalactiks/explorer/commit/75fb783d9473fa5a9fbb8255cb2dcb4af17782cb)]:
- @galactiks/config@0.3.0
- @galactiks/contentlayer@0.2.0

## 0.2.13

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/explorer/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@galactiks/explorer",
"version": "0.2.13",
"version": "0.3.0",
"description": "Ensure Galactiks content model consistence, explore content built with ContentLayer and create dynamically missing pages and fields for SEO purposes",
"author": "thegalactiks",
"type": "module",
Expand Down
6 changes: 5 additions & 1 deletion packages/explorer/src/content/hydrate/listing-pages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,11 @@ export const computeRemainingListingPages =
const translationOfWorkDocument = getDocumentByIdentifier(
_d.translationOfWork['@id']
);
if (translationOfWorkDocument && 'isPartOf' in translationOfWorkDocument && typeof translationOfWorkDocument.isPartOf === 'string') {
if (
translationOfWorkDocument &&
'isPartOf' in translationOfWorkDocument &&
typeof translationOfWorkDocument.isPartOf === 'string'
) {
translationOfWork = {
type: 'Id',
'@id': translationOfWorkDocument.isPartOf,
Expand Down
26 changes: 16 additions & 10 deletions packages/explorer/src/content/hydrate/missing-fields.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,20 +50,26 @@ export const computeMissingFields =
};

return documents.map((document) => {
const dateCreated = 'dateCreated' in document && document.dateCreated
? new Date(document.dateCreated)
: new Date();
const dateCreated =
'dateCreated' in document && document.dateCreated
? new Date(document.dateCreated)
: new Date();
const contentWithoutHeaders: Omit<Content, 'headers'> = {
...document,
author: 'author' in document ? getAuthor(document.author, document.inLanguage) : undefined,
author:
'author' in document
? getAuthor(document.author, document.inLanguage)
: undefined,
breadcrumb: buildBreadcrumb(document),
dateCreated,
dateModified: 'dateModified' in document && document.dateModified
? new Date(document.dateModified)
: dateCreated,
datePublished: 'datePublished' in document && document.datePublished
? new Date(document.datePublished)
: dateCreated,
dateModified:
'dateModified' in document && document.dateModified
? new Date(document.dateModified)
: dateCreated,
datePublished:
'datePublished' in document && document.datePublished
? new Date(document.datePublished)
: dateCreated,
};

return {
Expand Down
6 changes: 5 additions & 1 deletion packages/explorer/src/content/hydrate/urls.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,11 @@ export const computeDocumentsUrl =
}

let isPartOfPath: string | undefined;
if ('isPartOf' in document && document.isPartOf && pathTemplate.indexOf('isPartOf')) {
if (
'isPartOf' in document &&
document.isPartOf &&
pathTemplate.indexOf('isPartOf')
) {
// The page has been created if missing
const isPartOf = getDocumentByIdentifierAndLanguage(
document.isPartOf,
Expand Down
24 changes: 15 additions & 9 deletions packages/explorer/src/content/repositories/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,17 +94,21 @@ export const getIndexPage = async (): Promise<Content | undefined> => {

type ContentWithIsPartOf = Content & Required<Pick<Content, 'isPartOf'>>;

export const getSerieWorks = async (content: ContentWithIsPartOf) => (
export const getSerieWorks = async (content: ContentWithIsPartOf) =>
(
await getPagesPartOf(content.isPartOf, {
type: content.type,
inLanguage: content.inLanguage,
})
).filter(w => 'position' in w && typeof w.position === "number")
.sort((a, b) => (a.position as number) - (b.position as number)) as Array<Content & Required<Pick<Content, 'position'>>>
);

export const getPreviousWorkSeries = async (content: Content): Promise<Content | undefined> => {
)
.filter((w) => 'position' in w && typeof w.position === 'number')
.sort((a, b) => (a.position as number) - (b.position as number)) as Array<
Content & Required<Pick<Content, 'position'>>
>;

export const getPreviousWorkSeries = async (
content: Content
): Promise<Content | undefined> => {
if (!(content.isPartOf && typeof content.position === 'number')) {
return undefined;
}
Expand All @@ -120,9 +124,11 @@ export const getPreviousWorkSeries = async (content: Content): Promise<Content |
}

return previousWork;
}
};

export const getNextWorkSeries = async (content: Content): Promise<Content | undefined> => {
export const getNextWorkSeries = async (
content: Content
): Promise<Content | undefined> => {
if (!(content.isPartOf && typeof content.position === 'number')) {
return undefined;
}
Expand All @@ -133,4 +139,4 @@ export const getNextWorkSeries = async (content: Content): Promise<Content | und
return work;
}
}
}
};
2 changes: 1 addition & 1 deletion packages/explorer/src/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export type ContentlayerWebPageDocument =
| ContentlayerTagPage;
export type CreativeWorkWebPageDocument =
| ContentlayerArticle
| ContentlayerPage
| ContentlayerPage;
export type ContentlayerWebPageDocumentWithRender =
ContentlayerDocumentWithRender<ContentlayerWebPageDocument>;

Expand Down

0 comments on commit 4964fef

Please sign in to comment.