@jakubmazanec/carson-templates 7.1.0 → 7.2.0-unstable.61aa4f35

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": "@jakubmazanec/carson-templates",
3
- "version": "7.1.0",
3
+ "version": "7.2.0-unstable.61aa4f35",
4
4
  "description": "Collection of Carson templates.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -34,7 +34,7 @@
34
34
  "semver": "^7.7.3"
35
35
  },
36
36
  "devDependencies": {
37
- "@jakubmazanec/carson": "^3.0.0",
37
+ "@jakubmazanec/carson": "3.0.4-unstable.61aa4f35",
38
38
  "@jakubmazanec/eslint-config": "^4.1.0",
39
39
  "@jakubmazanec/fs-utils": "^0.2.0",
40
40
  "@types/fs-extra": "^11.0.4",
@@ -58,7 +58,7 @@
58
58
  "zen-observable": "^0.10.0"
59
59
  },
60
60
  "peerDependencies": {
61
- "@jakubmazanec/carson": "^3.0.0"
61
+ "@jakubmazanec/carson": "3.0.4-unstable.61aa4f35"
62
62
  },
63
63
  "packageManager": "npm@11.3.0",
64
64
  "engines": {
@@ -3,10 +3,13 @@ to: 'prettier.config.cjs'
3
3
  strategy: overwrite
4
4
  ---
5
5
  <%
6
- let prettierConfig = {
7
- ...PRETTIER_OPTIONS,
8
- plugins: ['prettier-plugin-packagejson'],
9
- };
6
+ let prettierConfig = lodash.merge(
7
+ {
8
+ ...PRETTIER_OPTIONS,
9
+ plugins: ['prettier-plugin-packagejson'],
10
+ },
11
+ project.config.overrides?.prettierConfig ?? {},
12
+ );
10
13
  -%>
11
14
  /**
12
15
  * DO NOT EDIT!
@@ -9,6 +9,7 @@ strategy: overwrite
9
9
  *
10
10
  * Run `npx carson update workspace` to regenerate.
11
11
  */
12
+
12
13
  import main, {nodejs, prettier} from '@jakubmazanec/eslint-config';
13
14
 
14
15
  export default [
@@ -18,4 +19,5 @@ export default [
18
19
  {
19
20
  ignores: <%- JSON.stringify(LINT_IGNORES, null, 2) %>,
20
21
  },
22
+ <%- project.config.overrides?.eslintConfig ? JSON.stringify(project.config.overrides.eslintConfig, null, 2) : '' %>
21
23
  ];
@@ -19,4 +19,5 @@ export default [
19
19
  {
20
20
  ignores: <%- JSON.stringify(LINT_IGNORES, null, 2) %>,
21
21
  },
22
+ <%- project.config.overrides?.eslintConfig ? JSON.stringify(project.config.overrides.eslintConfig, null, 2) : '' %>
22
23
  ];
@@ -24,4 +24,5 @@ export default [
24
24
  '@typescript-eslint/naming-convention': 'off',
25
25
  },
26
26
  },
27
+ <%- project.config.overrides?.eslintConfig ? JSON.stringify(project.config.overrides.eslintConfig, null, 2) : '' %>
27
28
  ];
@@ -19,4 +19,5 @@ export default [
19
19
  {
20
20
  ignores: <%- JSON.stringify(LINT_IGNORES, null, 2) %>,
21
21
  },
22
+ <%- project.config.overrides?.eslintConfig ? JSON.stringify(project.config.overrides.eslintConfig, null, 2) : '' %>
22
23
  ];
@@ -3,10 +3,13 @@ to: 'prettier.config.cjs'
3
3
  strategy: overwrite
4
4
  ---
5
5
  <%
6
- let prettierConfig = {
7
- ...PRETTIER_OPTIONS,
8
- plugins: ['prettier-plugin-packagejson', 'prettier-plugin-tailwindcss'],
9
- };
6
+ let prettierConfig = lodash.merge(
7
+ {
8
+ ...PRETTIER_OPTIONS,
9
+ plugins: ['prettier-plugin-packagejson', 'prettier-plugin-tailwindcss'],
10
+ },
11
+ project.config.overrides?.prettierConfig ?? {},
12
+ );
10
13
  -%>
11
14
  /**
12
15
  * DO NOT EDIT!
@@ -26,4 +26,5 @@ export default [
26
26
  {
27
27
  ignores: <%- JSON.stringify(lintIgnores, null, 2) %>,
28
28
  },
29
+ <%- project.config.overrides?.eslintConfig ? JSON.stringify(project.config.overrides.eslintConfig, null, 2) : '' %>
29
30
  ];
@@ -3,10 +3,13 @@ to: 'prettier.config.cjs'
3
3
  strategy: overwrite
4
4
  ---
5
5
  <%
6
- let prettierConfig = {
7
- ...PRETTIER_OPTIONS,
8
- plugins: ['prettier-plugin-packagejson', 'prettier-plugin-tailwindcss'],
9
- };
6
+ let prettierConfig = lodash.merge(
7
+ {
8
+ ...PRETTIER_OPTIONS,
9
+ plugins: ['prettier-plugin-packagejson', 'prettier-plugin-tailwindcss'],
10
+ },
11
+ project.config.overrides?.prettierConfig ?? {},
12
+ );
10
13
  -%>
11
14
  /**
12
15
  * DO NOT EDIT!
@@ -2,6 +2,15 @@
2
2
  to: 'react-router.config.ts'
3
3
  strategy: overwrite
4
4
  ---
5
+ <%
6
+ let reactRouterConfig = lodash.merge(
7
+ {
8
+ appDirectory: SOURCE_DIRECTORY,
9
+ ssr: true,
10
+ },
11
+ project.config.overrides?.reactRouterConfig ?? {},
12
+ );
13
+ -%>
5
14
  /**
6
15
  * DO NOT EDIT!
7
16
  * This file was autogenerated by Carson.
@@ -11,12 +20,5 @@ strategy: overwrite
11
20
  */
12
21
 
13
22
  import {type Config} from '@react-router/dev/config';
14
- import _ from 'lodash';
15
23
 
16
- export default _.merge(
17
- {
18
- appDirectory: <%- JSON.stringify(SOURCE_DIRECTORY) %>,
19
- ssr: true,
20
- },
21
- <%- JSON.stringify(project.config.overrides?.reactRouterConfig ?? {}, null, 2) %>,
22
- ) satisfies Config;
24
+ export default <%- JSON.stringify(reactRouterConfig, null, 2) %> satisfies Config;
@@ -3,9 +3,10 @@ to: 'typedoc.config.cjs'
3
3
  strategy: overwrite
4
4
  ---
5
5
  <%
6
- let typedocConfig = {
7
- ...TYPEDOC_CONFIG
8
- };
6
+ let typedocConfig = lodash.merge(
7
+ TYPEDOC_CONFIG,
8
+ project.config.overrides?.typedocConfig ?? {},
9
+ );
9
10
  -%>
10
11
  /**
11
12
  * DO NOT EDIT!
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  to: 'tools/scripts/create-templates-changeset.mts'
3
+ if: <%- workspace.projects.some((project) => project.name === TEMPLATE_PACKAGE_NAME) %>
3
4
  strategy: overwrite
4
5
  ---
5
6
  /**
@@ -109,23 +110,18 @@ async function getDependencyBumps(files: string[]): Promise<DependencyBumps> {
109
110
  return bumps;
110
111
  }
111
112
 
112
- // eslint-disable-next-line no-constant-condition, @typescript-eslint/no-unnecessary-condition -- this is autogenerated
113
- if (<%- workspace.projects.some((project) => project.name === TEMPLATE_PACKAGE_NAME) %>) {
114
- let {stdout: diff} = await $`git diff --name-only HEAD~1`;
115
- let files = diff.split('\n').filter((file) => file.endsWith('package.json'));
116
- let {stdout: shortHash} = await $`git rev-parse --short HEAD`;
117
- let getChangesetName = (suffix?: string) =>
118
- suffix === undefined ?
119
- `.changeset/templates-update-${shortHash.trim()}.md`
120
- : `.changeset/templates-update-${shortHash.trim()}-${suffix.replaceAll('/', '-')}.md`;
113
+ let {stdout: diff} = await $`git diff --name-only HEAD~1`;
114
+ let files = diff.split('\n').filter((file) => file.endsWith('package.json'));
115
+ let {stdout: shortHash} = await $`git rev-parse --short HEAD`;
116
+ let getChangesetName = (suffix?: string) =>
117
+ suffix === undefined ?
118
+ `.changeset/templates-update-${shortHash.trim()}.md`
119
+ : `.changeset/templates-update-${shortHash.trim()}-${suffix.replaceAll('/', '-')}.md`;
121
120
 
122
- let dependencyBumps = await getDependencyBumps(files);
121
+ let dependencyBumps = await getDependencyBumps(files);
123
122
 
124
- console.log('Dependecy bumps:', dependencyBumps);
123
+ console.log('Dependecy bumps:', dependencyBumps);
125
124
 
126
- await checkCarsonTemplatesPackage(getChangesetName, dependencyBumps);
125
+ await checkCarsonTemplatesPackage(getChangesetName, dependencyBumps);
127
126
 
128
- console.log('Done!');
129
- } else {
130
- console.log(`Repository doesn't contain project "${TEMPLATE_PACKAGE_NAME}"!`);
131
- }
127
+ console.log('Done!');
@@ -19,4 +19,5 @@ export default [
19
19
  {
20
20
  ignores: <%- JSON.stringify(LINT_IGNORES, null, 2) %>,
21
21
  },
22
+ <%- workspace.config.overrides?.eslintConfig ? JSON.stringify(workspace.config.overrides.eslintConfig, null, 2) : '' %>
22
23
  ];
@@ -1,3 +1,22 @@
1
1
  ---
2
- extends: '../prettier.config.cjs.ejs'
2
+ to: 'prettier.config.cjs'
3
+ strategy: overwrite
3
4
  ---
5
+ <%
6
+ let prettierConfig = lodash.merge(
7
+ {
8
+ ...PRETTIER_OPTIONS,
9
+ plugins: ['prettier-plugin-packagejson'],
10
+ },
11
+ workspace.config.overrides?.prettierConfig ?? {},
12
+ );
13
+ -%>
14
+ /**
15
+ * DO NOT EDIT!
16
+ * This file was autogenerated by Carson.
17
+ * Changes may cause incorrect behavior and will be lost when the file is regenerated.
18
+ *
19
+ * Run `npx carson update workspace` to regenerate.
20
+ */
21
+
22
+ module.exports = <%- JSON.stringify(prettierConfig, null, 2) %>;
@@ -2,33 +2,41 @@
2
2
  to: 'renovate.json'
3
3
  strategy: overwrite
4
4
  ---
5
- {
6
- "$schema": "https://docs.renovatebot.com/renovate-schema.json",
7
- "extends": [
8
- ":dependencyDashboard",
9
- ":ignoreModulesAndTests",
10
- "group:monorepos",
11
- "group:recommended",
12
- "replacements:all",
13
- "workarounds:all"
14
- ],
5
+ <%
6
+ let renovateConfig = lodash.merge(
7
+ {
8
+ $schema: 'https://docs.renovatebot.com/renovate-schema.json',
9
+ extends: [
10
+ ':dependencyDashboard',
11
+ ':ignoreModulesAndTests',
12
+ 'group:monorepos',
13
+ 'group:recommended',
14
+ 'replacements:all',
15
+ 'workarounds:all',
16
+ ],
17
+
18
+ enabledManagers: ['npm', 'nodenv', 'nvm', 'github-actions'],
19
+ rangeStrategy: 'bump',
20
+ minimumReleaseAge: '14 days',
21
+
22
+ packageRules: [
23
+ {
24
+ matchUpdateTypes: ['major', 'minor', 'patch'],
25
+ matchDepTypes: ['devDependencies'],
26
+ },
27
+ {
28
+ matchDepTypes: ['peerDependencies'],
29
+ rangeStrategy: 'replace',
30
+ },
31
+ {
32
+ matchDepTypes: ['overrides'],
33
+ enabled: false,
34
+ },
35
+ ],
36
+ },
37
+ workspace.config.overrides?.renovate ?? {},
38
+ );
39
+ -%>
40
+ <%- JSON.stringify(renovateConfig, null, 2) %>
15
41
 
16
- "enabledManagers": ["npm", "nodenv", "nvm", "github-actions"],
17
- "rangeStrategy": "bump",
18
- "minimumReleaseAge": "14 days",
19
42
 
20
- "packageRules": [
21
- {
22
- "matchUpdateTypes": ["major", "minor", "patch"],
23
- "matchDepTypes": ["devDependencies"]
24
- },
25
- {
26
- "matchDepTypes": ["peerDependencies"],
27
- "rangeStrategy": "replace"
28
- },
29
- {
30
- "matchDepTypes": ["overrides"],
31
- "enabled": false
32
- }
33
- ]
34
- }
@@ -3,14 +3,17 @@ to: 'tsconfig.json'
3
3
  strategy: overwrite
4
4
  ---
5
5
  <%
6
- let tsconfig = {
7
- compilerOptions: {
8
- ...TSCONFIG_COMPILER_OPTIONS,
6
+ let tsconfig = lodash.merge(
7
+ {
8
+ compilerOptions: {
9
+ ...TSCONFIG_COMPILER_OPTIONS,
9
10
  noEmit: true,
10
11
  rootDir: '.',
12
+ },
13
+ include: ['./*', './tools/**/*'],
11
14
  },
12
- include: ['./*', './tools/**/*'],
13
- };
15
+ workspace.config.overrides?.tsconfig ?? {},
16
+ );
14
17
  -%>
15
18
  //
16
19
  // DO NOT EDIT!
@@ -3,54 +3,57 @@ to: 'turbo.json'
3
3
  strategy: overwrite
4
4
  ---
5
5
  <%
6
- let turboConfig = {
7
- $schema: 'https://turborepo.org/schema.json',
8
- tasks: {
9
- build: {
10
- dependsOn: ['^build', 'codegen'],
11
- outputs: [`${BUILD_DIRECTORY}/**`],
12
- },
13
- clean: {
14
- cache: false,
15
- },
16
- codegen: {
17
- cache: false,
18
- },
19
- develop: {
20
- dependsOn: ['^build', 'codegen'],
21
- cache: false,
22
- persistent: true,
23
- },
24
- document: {
25
- dependsOn: ['^build', 'codegen'],
26
- outputs: ['docs/**'],
27
- },
28
- format: {
29
- cache: false,
30
- },
31
- lint: {
32
- dependsOn: ['^build', 'codegen'],
33
- outputs: [],
34
- },
35
- test: {
36
- dependsOn: ['^build', 'codegen', 'typecheck', 'lint'],
37
- outputs: ['coverage/**'],
38
- },
39
- typecheck: {
40
- dependsOn: ['^build', 'codegen'],
41
- outputs: [],
6
+ let turboConfig = lodash.merge(
7
+ {
8
+ $schema: 'https://turborepo.org/schema.json',
9
+ tasks: {
10
+ build: {
11
+ dependsOn: ['^build', 'codegen'],
12
+ outputs: [`${BUILD_DIRECTORY}/**`],
13
+ },
14
+ clean: {
15
+ cache: false,
16
+ },
17
+ codegen: {
18
+ cache: false,
19
+ },
20
+ develop: {
21
+ dependsOn: ['^build', 'codegen'],
22
+ cache: false,
23
+ persistent: true,
24
+ },
25
+ document: {
26
+ dependsOn: ['^build', 'codegen'],
27
+ outputs: ['docs/**'],
28
+ },
29
+ format: {
30
+ cache: false,
31
+ },
32
+ lint: {
33
+ dependsOn: ['^build', 'codegen'],
34
+ outputs: [],
35
+ },
36
+ test: {
37
+ dependsOn: ['^build', 'codegen', 'typecheck', 'lint'],
38
+ outputs: ['coverage/**'],
39
+ },
40
+ typecheck: {
41
+ dependsOn: ['^build', 'codegen'],
42
+ outputs: [],
43
+ },
42
44
  },
45
+ globalEnv: ['CI'],
46
+ globalDependencies: [
47
+ '.editorconfig',
48
+ '.prettierignore',
49
+ 'eslint.config.js',
50
+ 'prettier.config.cjs',
51
+ 'tsconfig.json',
52
+ 'tsconfig.typecheck.json',
53
+ ],
43
54
  },
44
- globalEnv: ['CI'],
45
- globalDependencies: [
46
- '.editorconfig',
47
- '.prettierignore',
48
- 'eslint.config.js',
49
- 'prettier.config.cjs',
50
- 'tsconfig.json',
51
- 'tsconfig.typecheck.json',
52
- ],
53
- };
55
+ workspace.config.overrides?.turbo ?? {},
56
+ );
54
57
 
55
58
  if (workspace.projects.some((project) => project.config.deployment?.appName)) {
56
59
  turboConfig.globalEnv.push('VITE_APP_URL');