Skip to content

Commit

Permalink
update all dependencies and issue with raw SDL (#334)
Browse files Browse the repository at this point in the history
* update all dependencies and fix some issues

* update version
  • Loading branch information
pelletier197 authored Mar 31, 2024
1 parent bbbc89d commit 5c0a9a5
Show file tree
Hide file tree
Showing 37 changed files with 1,424 additions and 1,228 deletions.
4 changes: 2 additions & 2 deletions docs/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@magidoc/docs",
"version": "4.1.4",
"version": "4.2.0",
"license": "MIT",
"type": "module",
"keywords": [
Expand All @@ -18,7 +18,7 @@
"release": "gh-pages --dist build --dotfiles true"
},
"devDependencies": {
"cspell": "^8.3.2",
"cspell": "^8.6.1",
"gh-pages": "^6.1.1",
"svelte-sitemap": "^2.6.0"
}
Expand Down
8 changes: 4 additions & 4 deletions docs/pages/01.Introduction/02.Quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ export default {
For the full reference, see the dedicated [Magidoc Configuration](/cli/magidoc-configuration) page.

## 2. Generate
```shell-session
$ pnpm add --global @magidoc/cli@latest && magidoc generate
```shell
pnpm add --global @magidoc/cli@latest && magidoc generate
```

For more details on how to use the `generate` command, see the [related documentation](/cli/command-generate).
Expand All @@ -33,6 +33,6 @@ For more details on how to use the `generate` command, see the [related document

The built static website outputs in the `./docs` folder by default. To preview the website locally, run the following command.

```shell-session
$ magidoc preview
```shell
magidoc preview
```
8 changes: 4 additions & 4 deletions docs/pages/02.Cli/02.Command - Generate.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

The `generate` command builds a static website using the `magidoc.mjs` configuration file as input. Use the `--help` option to discover more about the optional parameters you can use.

```shell-session
$ magidoc generate --help
```shell
magidoc generate --help
```

Once your website is built successfully, the output can be previewed locally using the `preview` command. This command also uses the `magidoc.mjs` file.

```shell-session
$ magidoc preview --help
```shell
magidoc preview --help
```
4 changes: 2 additions & 2 deletions docs/pages/02.Cli/03.Command - Dev.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

The `dev` starts a development server which handles live hot-reload on change of any asset or configuration of your website. To start the dev-server, simply execute the following command. You can get more details about the other options using the `--help` argument.

```shell-session
$ magidoc dev
```shell
magidoc dev
```

Make sure to check out the [configuration](/cli/magidoc-configuration#dev) related to the development server as well.
4 changes: 2 additions & 2 deletions docs/pages/02.Cli/04.Command - Eject.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ If you eject, you will no longer benefit from the template updates of Magidoc. Y

To see all the available options for the `eject` command, run the following.

```shell-session
$ magidoc eject --help
```shell
magidoc eject --help
```

When initializing a template, you may choose one of the [Magidoc templates](/templates/introduction). You also have the option to choose a package manager. The recommended default package manager is [Pnpm](https://pnpm.io/workspaces).
Expand Down
4 changes: 2 additions & 2 deletions docs/pages/06.Plugins/02.GraphQL Query Generator.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ query getPerson($delay: Int, $delay2: Int) {

This plugin requires [GraphQL.js](https://www.npmjs.com/package/graphql) as a peer dependency.

```shell-session
$ pnpm install -D @magidoc/plugin-query-generator graphql
```shell
pnpm install -D @magidoc/plugin-query-generator graphql
```

## Usage
Expand Down
4 changes: 2 additions & 2 deletions docs/pages/06.Plugins/03.Rollup GraphQL-Schema.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ This plugin is also compatible with [ViteJS](https://vitejs.dev/), which is used

Add the module to your project.

```shell-session
$ pnpm install -D @magidoc/rollup-plugin-gql-schema
```shell
pnpm install -D @magidoc/rollup-plugin-gql-schema
```

## Fetching
Expand Down
4 changes: 2 additions & 2 deletions docs/pages/07.Svelte Plugins/02.PrismJS.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ A simple Svelte plugin built with TypeScript to display code inside the browser,

PrismJS is required as a peer dependency so you can use the themes and languages provided.

```shell-session
$ pnpm install -D @magidoc/plugin-svelte-prismjs prismjs @types/prismjs
```shell
pnpm install -D @magidoc/plugin-svelte-prismjs prismjs @types/prismjs
```
## Basic Usage

Expand Down
4 changes: 2 additions & 2 deletions docs/pages/07.Svelte Plugins/03.Marked.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ Each component renderer can be overwritten to customize its style and [extension

[MarkedJS](https://github.com/markedjs/marked) is required as a peer dependency if you want to register custom extensions or components. You may also include `@types/marked` so you can get access to typing.

```shell-session
$ pnpm install -D @magidoc/plugin-svelte-marked marked @types/marked
```shell
pnpm install -D @magidoc/plugin-svelte-marked marked @types/marked
```

## Basic Usage
Expand Down
18 changes: 9 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "magidoc",
"version": "4.1.4",
"version": "4.2.0",
"description": "MagiDoc is a documentation website generator for GraphQL based on Svelte and that allows for infinite customization through plugins.",
"repository": "git@github.com:magidoc-org/magidoc.git",
"author": "Sunny Pelletier",
Expand Down Expand Up @@ -29,19 +29,19 @@
"get-version": "echo $npm_package_version"
},
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^6.21.0",
"@typescript-eslint/parser": "^6.21.0",
"archiver": "^6.0.1",
"eslint": "^8.56.0",
"@typescript-eslint/eslint-plugin": "^7.4.0",
"@typescript-eslint/parser": "^7.4.0",
"archiver": "^7.0.1",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-es": "^4.1.0",
"eslint-plugin-svelte3": "^4.0.0",
"husky": "^8.0.3",
"husky": "^9.0.11",
"npm-run-all": "^4.1.5",
"prettier": "^3.2.5",
"prettier-plugin-svelte": "^3.1.2",
"svelte": "^4.2.10",
"typescript": "^5.3.3"
"prettier-plugin-svelte": "^3.2.2",
"svelte": "^4.2.12",
"typescript": "^5.4.3"
},
"engines": {
"pnpm": ">=8.0.0"
Expand Down
22 changes: 11 additions & 11 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@magidoc/cli",
"description": "Magidoc CLI application responsible for generating GraphQL documentation websites.",
"private": false,
"version": "4.1.4",
"version": "4.2.0",
"type": "module",
"license": "MIT",
"main": "./build/index.js",
Expand Down Expand Up @@ -33,28 +33,28 @@
"dependencies": {
"@magidoc/plugin-starter-variables": "workspace:^",
"@magidoc/rollup-plugin-gql-schema": "workspace:^",
"axios": "^1.6.7",
"axios": "^1.6.8",
"chokidar": "^3.6.0",
"commander": "^11.1.0",
"commander": "^12.0.0",
"extract-zip": "^2.0.1",
"fs-extra": "^11.2.0",
"listr2": "^7.0.2",
"listr2": "^8.1.2",
"lodash": "^4.17.21",
"sirv": "^2.0.4",
"zod": "^3.22.4"
},
"devDependencies": {
"@rollup/plugin-typescript": "^11.1.6",
"@types/fs-extra": "^11.0.4",
"@types/lodash": "^4.14.202",
"@types/node": "^20.11.17",
"@vitest/coverage-v8": "^0.34.6",
"rollup": "^4.10.0",
"@types/lodash": "^4.17.0",
"@types/node": "^20.12.2",
"@vitest/coverage-v8": "^1.4.0",
"rollup": "^4.13.2",
"rollup-plugin-preserve-shebang": "^1.0.1",
"tslib": "^2.6.2",
"typescript": "^5.3.3",
"vite": "^5.1.1",
"vitest": "^0.34.6"
"typescript": "^5.4.3",
"vite": "^5.2.7",
"vitest": "^1.4.0"
},
"engines": {
"node": ">=18"
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/commands/utils/commander.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export const CLEAN_OPTION = () => {

export const PACKAGE_MANAGER_OPTION = () => {
return new Option(
'-p|--package-manager <package-manager>',
'-m|--package-manager <package-manager>',
'Selects a different Package Manager. By default, Magidoc will try to use any package manager available in order of preference. Recommended is pnpm.',
).choices(PACKAGE_MANAGER_TYPES)
}
Expand Down
1 change: 1 addition & 0 deletions packages/cli/src/tasks/all/loadGraphqlSchema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ export function loadGraphQLSchemaTask<T extends Ctx>(config: Config): Task<T> {
ctx.templateConfiguration.schemaTargetLocation,
config.introspection.content,
)
break
case 'none':
await fs.writeFile(ctx.templateConfiguration.schemaTargetLocation, '')
}
Expand Down
1 change: 1 addition & 0 deletions packages/cli/tests/tasks/all/loadGraphqlSchema.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ describe('loading graphql schema', () => {
ctx.templateConfiguration.schemaTargetLocation,
config.introspection.content,
)
expect(fs.writeFile).toHaveBeenCalledOnce()
})
})

Expand Down
18 changes: 9 additions & 9 deletions packages/plugins/fuse-graphql/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@magidoc/plugin-fuse-graphql",
"description": "A plugin used to index a GraphQL schema into a Fuse.js search engine.",
"private": false,
"version": "4.1.4",
"version": "4.2.0",
"type": "module",
"license": "MIT",
"main": "./build/index.js",
Expand All @@ -28,19 +28,19 @@
},
"dependencies": {
"@magidoc/plugin-fuse-markdown": "workspace:^",
"fuse.js": "^6.6.2",
"fuse.js": "^7.0.0",
"graphql": "^16.8.1",
"marked": "^11.2.0"
"marked": "^12.0.1"
},
"devDependencies": {
"@types/marked": "^6.0.0",
"@types/node": "^20.11.17",
"@types/node": "^20.12.2",
"@types/prettier": "^3.0.0",
"@vitest/coverage-v8": "^0.34.6",
"rollup": "^4.10.0",
"typescript": "^5.3.3",
"vite": "^5.1.1",
"vitest": "^0.34.6"
"@vitest/coverage-v8": "^1.4.0",
"rollup": "^4.13.2",
"typescript": "^5.4.3",
"vite": "^5.2.7",
"vitest": "^1.4.0"
},
"peerDependencies": {
"fuse.js": "^6.6.2"
Expand Down
4 changes: 2 additions & 2 deletions packages/plugins/fuse-graphql/src/indexer/indexer.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { mergeMarkdownOptions } from '@magidoc/plugin-fuse-markdown'
import type { MarkdownOptions } from '@magidoc/plugin-fuse-markdown'
import Fuse from 'fuse.js'
import Fuse, { type IFuseOptions } from 'fuse.js'
import type { GraphQLObjectType, GraphQLSchema } from 'graphql'
import { asQueryResult } from './graphql/queries'
import { asTypeSearchResult } from './graphql/types'
Expand All @@ -23,7 +23,7 @@ export type IndexingOptions = {
markdown?: Partial<MarkdownOptions>
}

export function defaultFuseOptions(): Fuse.IFuseOptions<SearchResult> {
export function defaultFuseOptions(): IFuseOptions<SearchResult> {
return {
keys: [
{
Expand Down
5 changes: 2 additions & 3 deletions packages/plugins/fuse-graphql/tests/indexer/indexer.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { fileURLToPath } from 'url'
import { describe, expect, it } from 'vitest'
import { index, type SearchResult } from '../../src'
import type Fuse from 'fuse.js'
import type { FuseResultMatch, FuseResult } from 'fuse.js'

describe('indexing graphql schema', () => {
const schema = getSchema()
Expand Down Expand Up @@ -379,9 +380,7 @@ describe('indexing graphql schema', () => {
})
})

function matches(
result: Fuse.FuseResult<SearchResult>,
): readonly Fuse.FuseResultMatch[] {
function matches(result: FuseResult<SearchResult>): readonly FuseResultMatch[] {
return result.matches || []
}

Expand Down
18 changes: 9 additions & 9 deletions packages/plugins/fuse-markdown/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@magidoc/plugin-fuse-markdown",
"description": "A plugin used to index markdown text into a Fuse.js search engine.",
"private": false,
"version": "4.1.4",
"version": "4.2.0",
"type": "module",
"license": "MIT",
"main": "./build/index.js",
Expand All @@ -27,19 +27,19 @@
"release": "pnpm publish --no-git-checks --access public"
},
"dependencies": {
"fuse.js": "^6.6.2",
"fuse.js": "^7.0.0",
"github-slugger": "^2.0.0",
"marked": "^11.2.0"
"marked": "^12.0.1"
},
"devDependencies": {
"@types/marked": "^6.0.0",
"@types/node": "^20.11.17",
"@types/node": "^20.12.2",
"@types/prettier": "^3.0.0",
"@vitest/coverage-v8": "^0.34.6",
"rollup": "^4.10.0",
"typescript": "^5.3.3",
"vite": "^5.1.1",
"vitest": "^0.34.6"
"@vitest/coverage-v8": "^1.4.0",
"rollup": "^4.13.2",
"typescript": "^5.4.3",
"vite": "^5.2.7",
"vitest": "^1.4.0"
},
"peerDependencies": {
"fuse.js": "^6.6.2"
Expand Down
4 changes: 2 additions & 2 deletions packages/plugins/fuse-markdown/src/indexer/indexer.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Fuse from 'fuse.js'
import Fuse, { type IFuseOptions } from 'fuse.js'
import type { Lexer } from 'marked'
import type Slugger from 'github-slugger'

Expand All @@ -8,7 +8,7 @@ import { defaultLexer, defaultSlugger } from '../markdown/marked'
import type { MarkdownDocument } from './document'
import type { SearchResult } from './result'

export function defaultFuseOptions<T>(): Fuse.IFuseOptions<T> {
export function defaultFuseOptions<T>(): IFuseOptions<T> {
return {
keys: [
{
Expand Down
16 changes: 8 additions & 8 deletions packages/plugins/query-generator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@magidoc/plugin-query-generator",
"description": "A browser and nodeJS compatible plugin that allows to generate GraphQL Queries and Variables",
"private": false,
"version": "4.1.4",
"version": "4.2.0",
"type": "module",
"license": "MIT",
"main": "./build/index.js",
Expand Down Expand Up @@ -33,15 +33,15 @@
"prettier": "^3.2.5"
},
"devDependencies": {
"@types/lodash": "^4.14.202",
"@types/node": "^20.11.17",
"@types/lodash": "^4.17.0",
"@types/node": "^20.12.2",
"@types/prettier": "^3.0.0",
"@vitest/coverage-v8": "^0.34.6",
"@vitest/coverage-v8": "^1.4.0",
"graphql-query-compress": "^1.2.4",
"rollup": "^4.10.0",
"typescript": "^5.3.3",
"vite": "^5.1.1",
"vitest": "^0.34.6"
"rollup": "^4.13.2",
"typescript": "^5.4.3",
"vite": "^5.2.7",
"vitest": "^1.4.0"
},
"peerDependencies": {
"graphql": "^16.8.1"
Expand Down
Loading

0 comments on commit 5c0a9a5

Please sign in to comment.