@smartive/graphql-magic 16.3.8 → 16.3.9-next.1

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.
@@ -3,6 +3,7 @@ on:
3
3
  push:
4
4
  branches:
5
5
  - 'main'
6
+ - 'next'
6
7
 
7
8
  jobs:
8
9
  release:
@@ -14,7 +15,7 @@ jobs:
14
15
  submodules: true
15
16
  - uses: actions/setup-node@v4
16
17
  with:
17
- node-version: 20
18
+ node-version: 22
18
19
  - run: npm ci
19
20
  - run: npm run build
20
21
  - name: semantic release
@@ -22,6 +23,7 @@ jobs:
22
23
  env:
23
24
  GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
24
25
  NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
26
+
25
27
  docs:
26
28
  runs-on: ubuntu-latest
27
29
  steps:
@@ -32,7 +34,7 @@ jobs:
32
34
  - name: Setup Node
33
35
  uses: actions/setup-node@v4
34
36
  with:
35
- node-version: '20'
37
+ node-version: 22
36
38
  - name: Install and Build
37
39
  run: |
38
40
  cd docs
package/.gqmrc.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "modelsPath": "tests/utils/models.ts",
3
3
  "generatedFolderPath": "tests/generated",
4
4
  "graphqlQueriesPath": "tests",
5
- "gqlModule": "../../../src",
5
+ "gqmModule": "../../../src",
6
6
  "knexfilePath": "knexfile.ts",
7
7
  "dateLibrary": "luxon"
8
- }
8
+ }
package/CHANGELOG.md CHANGED
@@ -1,6 +1,6 @@
1
- ## [16.3.8](https://github.com/smartive/graphql-magic/compare/v16.3.7...v16.3.8) (2025-02-26)
1
+ ## [16.3.9-next.1](https://github.com/smartive/graphql-magic/compare/v16.3.8...v16.3.9-next.1) (2025-02-27)
2
2
 
3
3
 
4
4
  ### Bug Fixes
5
5
 
6
- * **deps:** update dependency graphql to v16 ([#10](https://github.com/smartive/graphql-magic/issues/10)) ([e7ce67a](https://github.com/smartive/graphql-magic/commit/e7ce67a39271d1619370738db9fe36396661bae4))
6
+ * gqlModule to gqmModule ([#241](https://github.com/smartive/graphql-magic/issues/241)) ([3cd2bc2](https://github.com/smartive/graphql-magic/commit/3cd2bc25bbf6e07ede309503972ee87381c74146))
package/dist/bin/gqm.cjs CHANGED
@@ -1802,7 +1802,7 @@ var DEFAULTS = {
1802
1802
  ensureFileExists(`${path}/execute.ts`, EXECUTE);
1803
1803
  }
1804
1804
  },
1805
- gqlModule: {
1805
+ gqmModule: {
1806
1806
  defaultValue: "@smartive/graphql-magic"
1807
1807
  },
1808
1808
  dateLibrary: {
@@ -1847,7 +1847,7 @@ var initSettings = async () => {
1847
1847
  saveSettings(settings);
1848
1848
  };
1849
1849
  var saveSettings = (settings) => {
1850
- writeToFile(SETTINGS_PATH, JSON.stringify(settings, null, 2));
1850
+ writeToFile(SETTINGS_PATH, JSON.stringify(settings, null, 2) + "\n");
1851
1851
  };
1852
1852
  var getSettings = async () => {
1853
1853
  if (!(0, import_fs.existsSync)(SETTINGS_PATH)) {
@@ -2252,9 +2252,9 @@ import_commander.program.command("generate").description("Generate all the thing
2252
2252
  await getSetting("knexfilePath");
2253
2253
  const models = await parseModels();
2254
2254
  const generatedFolderPath = await getSetting("generatedFolderPath");
2255
- const gqlModule = await getSetting("gqlModule");
2255
+ const gqmModule = await getSetting("gqmModule");
2256
2256
  writeToFile(`${generatedFolderPath}/schema.graphql`, printSchemaFromModels(models));
2257
- writeToFile(`${generatedFolderPath}/client/mutations.ts`, generateMutations(models, gqlModule));
2257
+ writeToFile(`${generatedFolderPath}/client/mutations.ts`, generateMutations(models, gqmModule));
2258
2258
  const dateLibrary = await getSetting("dateLibrary");
2259
2259
  writeToFile(`${generatedFolderPath}/db/index.ts`, generateDBModels(models, dateLibrary));
2260
2260
  writeToFile(`${generatedFolderPath}/db/knex.ts`, generateKnexTables(models));
@@ -0,0 +1,19 @@
1
+ # Migration Guides
2
+
3
+ ## Upgrading to v17.0.0
4
+
5
+ ### Configuration changes
6
+
7
+ - The `gqlModule` configuration property has been renamed to `gqmModule` to maintain consistency with the project naming. Please update your `.gqmrc.json` file accordingly:
8
+
9
+ ```diff
10
+ {
11
+ "modelsPath": "path/to/models.ts",
12
+ "generatedFolderPath": "path/to/generated",
13
+ "graphqlQueriesPath": "path/to/queries",
14
+ - "gqlModule": "../path/to/module",
15
+ + "gqmModule": "../path/to/module",
16
+ "knexfilePath": "knexfile.ts",
17
+ "dateLibrary": "luxon"
18
+ }
19
+ ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smartive/graphql-magic",
3
- "version": "16.3.8",
3
+ "version": "16.3.9-next.1",
4
4
  "description": "",
5
5
  "source": "src/index.ts",
6
6
  "type": "module",
@@ -5,12 +5,12 @@ import { config } from 'dotenv';
5
5
  import knex from 'knex';
6
6
  import { simpleGit } from 'simple-git';
7
7
  import {
8
- MigrationGenerator,
9
- generateDBModels,
10
- generateKnexTables,
11
- generateMutations,
12
- getMigrationDate,
13
- printSchemaFromModels,
8
+ MigrationGenerator,
9
+ generateDBModels,
10
+ generateKnexTables,
11
+ generateMutations,
12
+ getMigrationDate,
13
+ printSchemaFromModels,
14
14
  } from '../..';
15
15
  import { DateLibrary } from '../../utils/dates';
16
16
  import { generateGraphqlApiTypes, generateGraphqlClientTypes } from './codegen';
@@ -35,9 +35,9 @@ program
35
35
  await getSetting('knexfilePath');
36
36
  const models = await parseModels();
37
37
  const generatedFolderPath = await getSetting('generatedFolderPath');
38
- const gqlModule = await getSetting('gqlModule');
38
+ const gqmModule = await getSetting('gqmModule');
39
39
  writeToFile(`${generatedFolderPath}/schema.graphql`, printSchemaFromModels(models));
40
- writeToFile(`${generatedFolderPath}/client/mutations.ts`, generateMutations(models, gqlModule));
40
+ writeToFile(`${generatedFolderPath}/client/mutations.ts`, generateMutations(models, gqmModule));
41
41
  const dateLibrary = (await getSetting('dateLibrary')) as DateLibrary;
42
42
  writeToFile(`${generatedFolderPath}/db/index.ts`, generateDBModels(models, dateLibrary));
43
43
  writeToFile(`${generatedFolderPath}/db/knex.ts`, generateKnexTables(models));
@@ -58,7 +58,7 @@ const DEFAULTS = {
58
58
  ensureFileExists(`${path}/execute.ts`, EXECUTE);
59
59
  },
60
60
  },
61
- gqlModule: {
61
+ gqmModule: {
62
62
  defaultValue: '@smartive/graphql-magic',
63
63
  },
64
64
  dateLibrary: {
@@ -111,7 +111,7 @@ const initSettings = async () => {
111
111
  };
112
112
 
113
113
  const saveSettings = (settings: Settings) => {
114
- writeToFile(SETTINGS_PATH, JSON.stringify(settings, null, 2));
114
+ writeToFile(SETTINGS_PATH, JSON.stringify(settings, null, 2) + '\n');
115
115
  };
116
116
 
117
117
  export const getSettings = async (): Promise<Settings> => {