@toptal/davinci-graphql-codegen 0.2.25-alpha-fix-execute-graphql-command-7ac3a6ec.17 → 0.2.25-alpha-fix-execute-graphql-command-64ee6d5e.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@toptal/davinci-graphql-codegen",
3
- "version": "0.2.25-alpha-fix-execute-graphql-command-7ac3a6ec.17+7ac3a6ec",
3
+ "version": "0.2.25-alpha-fix-execute-graphql-command-64ee6d5e.19+64ee6d5e",
4
4
  "description": "Codegen",
5
5
  "author": "Toptal",
6
6
  "license": "ISC",
@@ -29,8 +29,8 @@
29
29
  "@graphql-codegen/typescript-operations": "^2.3.5",
30
30
  "@graphql-codegen/typescript-resolvers": "^2.2.1",
31
31
  "@graphql-typed-document-node/core": "^3.1.0",
32
- "@toptal/davinci-cli-shared": "1.10.1-alpha-fix-execute-graphql-command-7ac3a6ec.17+7ac3a6ec",
33
- "@toptal/davinci-monorepo": "6.8.6-alpha-fix-execute-graphql-command-7ac3a6ec.17+7ac3a6ec",
32
+ "@toptal/davinci-cli-shared": "1.10.1-alpha-fix-execute-graphql-command-64ee6d5e.19+64ee6d5e",
33
+ "@toptal/davinci-monorepo": "6.8.6-alpha-fix-execute-graphql-command-64ee6d5e.19+64ee6d5e",
34
34
  "chalk": "^4.1.2",
35
35
  "fs-extra": "^10.1.0",
36
36
  "graphql": "^15.7.1",
@@ -39,5 +39,5 @@
39
39
  "peerDependencies": {
40
40
  "prettier": "^2.6.2"
41
41
  },
42
- "gitHead": "7ac3a6ec8bc411bee3822fca79b4e3aef15d086b"
42
+ "gitHead": "64ee6d5e0f752824e63dc28ea753ec9415b9e483"
43
43
  }
@@ -2,6 +2,7 @@ const chalk = require('chalk')
2
2
  const { generate } = require('@graphql-codegen/cli')
3
3
  const { readFileSync, writeFileSync } = require('fs-extra')
4
4
  const prettier = require('prettier')
5
+ const { dirname } = require('path')
5
6
 
6
7
  const {
7
8
  commonOperationTypesConfig,
@@ -48,7 +49,7 @@ const generateOperations = async ({ schema, documents, extension }) => {
48
49
  async (...filePaths) => {
49
50
  for (const path of filePaths) {
50
51
  const rawText = readFileSync(path, 'utf8')
51
- const options = await prettier.resolveConfig(process.cwd())
52
+ const options = await prettier.resolveConfig(dirname(path))
52
53
 
53
54
  const formattedText = prettier.format(rawText, {
54
55
  parser: 'typescript',
@@ -2,6 +2,7 @@ const { generate } = require('@graphql-codegen/cli')
2
2
  const chalk = require('chalk')
3
3
  const { readFileSync, writeFileSync } = require('fs')
4
4
  const prettier = require('prettier')
5
+ const { dirname } = require('path')
5
6
 
6
7
  const {
7
8
  commonSchemaTypesConfig,
@@ -43,7 +44,7 @@ const generateSchema = async ({ schema, target, projectId }) => {
43
44
  async (...filePaths) => {
44
45
  for (const path of filePaths) {
45
46
  const rawText = readFileSync(path, 'utf8')
46
- const options = await prettier.resolveConfig(process.cwd())
47
+ const options = await prettier.resolveConfig(dirname(path))
47
48
 
48
49
  const formattedText = prettier.format(rawText, {
49
50
  parser: 'typescript',
@@ -6,7 +6,7 @@ const getMonorepoSchemaPath = require('./get-monorepo-schema-path')
6
6
  const getMonolithSchemaPath = require('./get-monolith-schema-path')
7
7
 
8
8
  const getSchemaPath = schema => {
9
- return checkIfMonorepo({ considerWorkspaces: true })
9
+ return checkIfMonorepo({ considerYarnWorkspaces: true })
10
10
  ? getMonorepoSchemaPath(schema)
11
11
  : getMonolithSchemaPath(schema)
12
12
  }