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

Upgrade deps #85

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@
"plugin:@typescript-eslint/recommended",
"prettier",
"plugin:jest/recommended"
]
],
"ignorePatterns": ["generated/"]
}
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: "16.x"
node-version: "18.x"
registry-url: "https://registry.npmjs.org"
- run: yarn
- run: yarn format
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: "16.x"
node-version: "18.x"
registry-url: "https://registry.npmjs.org"
- run: yarn
working-directory: docs
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: "16.x"
node-version: "18.x"
registry-url: "https://registry.npmjs.org"
- run: yarn
- run: yarn publish
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
lts/gallium
lts/hydrogen
2 changes: 1 addition & 1 deletion docs/docs/configuration/schema.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ import * as SharedTypes from "./types";
// highlight-end

export function createUserMock(
props: Partial<SharedTypes.User>
props: Partial<SharedTypes.User>,
): SharedTypes.User {
return {
id: "",
Expand Down
19 changes: 9 additions & 10 deletions docs/docusaurus.config.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
// @ts-check
// Note: type annotations allow type checking and IDEs autocompletion

const lightCodeTheme = require("prism-react-renderer/themes/github");
const darkCodeTheme = require("prism-react-renderer/themes/vsDark");
const packageJson = require("../packages/graphql-codegen-factories/package.json");
import { themes } from "prism-react-renderer";
import path from "node:path";

import packageJson from "../packages/graphql-codegen-factories/package.json";

/** @type {import('@docusaurus/types').Config} */
const config = {
export default {
title: packageJson.name,
tagline: packageJson.description,
url: "https://gabinaureche.com/",
Expand All @@ -23,11 +24,11 @@ const config = {
/** @type {import('@docusaurus/preset-classic').Options} */
({
theme: {
customCss: [require.resolve("./src/custom.css")],
customCss: [path.resolve("./src/custom.css")],
},
docs: {
routeBasePath: "/",
sidebarPath: require.resolve("./sidebars.js"),
sidebarPath: path.resolve("./sidebars.js"),
// Please change this to your repo.
editUrl: `https://github.com/zhouzi/${packageJson.name}/blob/main/docs/`,
},
Expand Down Expand Up @@ -59,10 +60,8 @@ const config = {
],
},
prism: {
theme: lightCodeTheme,
darkTheme: darkCodeTheme,
theme: themes.vsLight,
darkTheme: themes.vsDark,
},
}),
};

module.exports = config;
20 changes: 10 additions & 10 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,18 @@
"test": "yarn build"
},
"dependencies": {
"@docusaurus/core": "2.0.0-beta.18",
"@docusaurus/preset-classic": "2.0.0-beta.18",
"@mdx-js/react": "^1.6.22",
"clsx": "^1.1.1",
"prism-react-renderer": "^1.3.1",
"react": "^17.0.2",
"react-dom": "^17.0.2"
"@docusaurus/core": "3.1.1",
"@docusaurus/preset-classic": "3.1.1",
"@mdx-js/react": "^3.0.1",
"clsx": "^2.1.0",
"prism-react-renderer": "^2.3.1",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
"devDependencies": {
"@docusaurus/module-type-aliases": "2.0.0-beta.18",
"@tsconfig/docusaurus": "^1.0.5",
"typescript": "^4.6.3"
"@docusaurus/module-type-aliases": "3.1.1",
"@tsconfig/docusaurus": "^2.0.2",
"typescript": "^5.3.3"
},
"browserslist": {
"production": [
Expand Down
16 changes: 1 addition & 15 deletions docs/sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@
// @ts-check

/** @type {import('@docusaurus/plugin-content-docs').SidebarsConfig} */
const sidebars = {
// By default, Docusaurus generates a sidebar from the docs folder structure
export default {
default: [
{ type: "autogenerated", dirName: "." },
{
Expand All @@ -22,17 +21,4 @@ const sidebars = {
href: "https://github.com/zhouzi/graphql-codegen-factories/blob/main/changelog.md",
},
],

// But you can create a sidebar manually
/*
tutorialSidebar: [
{
type: 'category',
label: 'Tutorial',
items: ['hello'],
},
],
*/
};

module.exports = sidebars;
10 changes: 5 additions & 5 deletions examples/minimal/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@
"posttest": "tsc"
},
"devDependencies": {
"@graphql-codegen/cli": "^2.6.2",
"@graphql-codegen/typescript": "^2.4.8",
"@graphql-codegen/typescript-operations": "^2.3.7",
"@tsconfig/recommended": "^1.0.1",
"@graphql-codegen/cli": "^5.0.2",
"@graphql-codegen/typescript": "^4.0.6",
"@graphql-codegen/typescript-operations": "^4.2.0",
"@tsconfig/recommended": "^1.0.3",
"graphql": "^16.3.0",
"graphql-codegen-factories": "1.2.1",
"typescript": "^4.6.3"
"typescript": "^5.3.3"
}
}
12 changes: 6 additions & 6 deletions examples/usage-with-faker/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
"posttest": "tsc"
},
"devDependencies": {
"@faker-js/faker": "^6.2.0",
"@graphql-codegen/add": "^3.1.1",
"@graphql-codegen/cli": "^2.6.2",
"@graphql-codegen/typescript": "^2.4.8",
"@tsconfig/recommended": "^1.0.1",
"@faker-js/faker": "^8.4.1",
"@graphql-codegen/add": "^5.0.2",
"@graphql-codegen/cli": "^5.0.2",
"@graphql-codegen/typescript": "^4.0.6",
"@tsconfig/recommended": "^1.0.3",
"graphql": "^16.3.0",
"graphql-codegen-factories": "1.2.1",
"typescript": "^4.6.3"
"typescript": "^5.3.3"
}
}
12 changes: 6 additions & 6 deletions examples/usage-with-near-operation-file-preset/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
"posttest": "tsc"
},
"devDependencies": {
"@graphql-codegen/cli": "^2.6.2",
"@graphql-codegen/near-operation-file-preset": "^2.2.9",
"@graphql-codegen/typescript": "^2.4.8",
"@graphql-codegen/typescript-operations": "^2.3.5",
"@tsconfig/recommended": "^1.0.1",
"@graphql-codegen/cli": "^5.0.2",
"@graphql-codegen/near-operation-file-preset": "^3.0.0",
"@graphql-codegen/typescript": "^4.0.6",
"@graphql-codegen/typescript-operations": "^4.2.0",
"@tsconfig/recommended": "^1.0.3",
"graphql": "^16.3.0",
"graphql-codegen-factories": "1.2.1",
"typescript": "^4.6.3"
"typescript": "^5.3.3"
}
}
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@
"lint": "eslint --ext .ts,.tsx ."
},
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^5.16.0",
"@typescript-eslint/parser": "^5.16.0",
"eslint": "^8.12.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-jest": "^26.1.5",
"prettier": "^2.6.1"
"@typescript-eslint/eslint-plugin": "^7.1.0",
"@typescript-eslint/parser": "^7.1.0",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-jest": "^27.9.0",
"prettier": "^3.2.5"
}
}
16 changes: 8 additions & 8 deletions packages/graphql-codegen-factories/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,20 +28,20 @@
"url": "https://github.com/zhouzi/graphql-codegen-factories.git"
},
"devDependencies": {
"@tsconfig/recommended": "^1.0.1",
"@types/jest": "^27.4.1",
"@tsconfig/recommended": "^1.0.3",
"@types/jest": "^29.5.12",
"graphql": "^16.3.0",
"jest": "^27.5.1",
"ts-jest": "^27.1.4",
"typescript": "^4.6.3"
"jest": "^29.7.0",
"ts-jest": "^29.1.2",
"typescript": "^5.3.3"
},
"peerDependencies": {
"graphql": "^16.3.0"
},
"dependencies": {
"@graphql-codegen/plugin-helpers": "^2.4.2",
"@graphql-codegen/visitor-plugin-common": "^2.7.4",
"change-case-all": "^1.0.14"
"@graphql-codegen/plugin-helpers": "^5.0.3",
"@graphql-codegen/visitor-plugin-common": "^5.1.0",
"change-case-all": "^2.1.0"
},
"scripts": {
"prebuild": "rm -rf ./build",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ type PrintLines = Array<string | PrintLines>;

export class FactoriesBaseVisitor<
RawConfig extends FactoriesBaseVisitorRawConfig,
ParsedConfig extends FactoriesBaseVisitorParsedConfig
ParsedConfig extends FactoriesBaseVisitorParsedConfig,
> extends BaseVisitor<RawConfig, ParsedConfig> {
constructor(config: RawConfig, parsedConfig: ParsedConfig) {
super(config, {
Expand All @@ -35,7 +35,7 @@ export class FactoriesBaseVisitor<

protected convertNameWithNamespace(
name: string,
namespace: string | undefined
namespace: string | undefined,
) {
const convertedName = this.convertName(name);
return namespace ? `${namespace}.${convertedName}` : convertedName;
Expand Down
Loading
Loading