@jakubmazanec/carson-templates 1.0.0 → 2.0.0-next.2fa8a2c

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.
Files changed (139) hide show
  1. package/LICENSE.md +0 -2
  2. package/README.md +1 -1
  3. package/build/constants.d.ts +60 -0
  4. package/build/constants.js +89 -0
  5. package/build/constants.js.map +7 -0
  6. package/build/dependency-versions.d.ts +1 -0
  7. package/build/dependency-versions.js +58 -0
  8. package/build/dependency-versions.js.map +7 -0
  9. package/build/getDependencies.d.ts +2 -0
  10. package/build/getDependencies.js +44 -0
  11. package/build/getDependencies.js.map +7 -0
  12. package/build/getDevelopmentBranch.d.ts +2 -0
  13. package/build/getDevelopmentBranch.js +11 -0
  14. package/build/getDevelopmentBranch.js.map +7 -0
  15. package/build/getMainBranch.d.ts +2 -0
  16. package/build/getMainBranch.js +11 -0
  17. package/build/getMainBranch.js.map +7 -0
  18. package/build/getReferences.d.ts +4 -0
  19. package/build/getReferences.js +20 -0
  20. package/build/getReferences.js.map +7 -0
  21. package/build/getWorkspaceName.d.ts +2 -0
  22. package/build/getWorkspaceName.js +16 -0
  23. package/build/getWorkspaceName.js.map +7 -0
  24. package/build/main.d.ts +8 -0
  25. package/build/main.js +10 -0
  26. package/build/main.js.map +7 -0
  27. package/package.json +31 -20
  28. package/source/constants.ts +94 -0
  29. package/source/dependency-versions.ts +69 -0
  30. package/source/getDependencies.ts +58 -0
  31. package/source/getDevelopmentBranch.ts +13 -0
  32. package/source/getMainBranch.ts +13 -0
  33. package/source/getReferences.ts +29 -0
  34. package/source/getWorkspaceName.ts +20 -0
  35. package/source/main.ts +8 -0
  36. package/templates/projects/carson-templates/.eslintrc.cjs.ejs +21 -0
  37. package/templates/projects/carson-templates/.prettierignore.ejs +3 -0
  38. package/templates/projects/carson-templates/CONTRIBUTING.md.ejs +3 -0
  39. package/templates/projects/carson-templates/package.json.ejs +26 -12
  40. package/templates/projects/carson-templates/prettier.config.cjs.ejs +3 -0
  41. package/templates/projects/carson-templates/source/main.ts.check.ejs +4 -0
  42. package/templates/projects/carson-templates/source/main.ts.create.ejs +6 -0
  43. package/templates/projects/carson-templates/tests/tsconfig.json.ejs +19 -12
  44. package/templates/projects/carson-templates/tsconfig.json.ejs +23 -9
  45. package/templates/projects/carson-templates/tsconfig.typecheck.json.ejs +1 -12
  46. package/templates/projects/carson-templates/typedoc.config.cjs.ejs +1 -10
  47. package/templates/projects/changesets-changelog/.eslintrc.cjs.ejs +21 -0
  48. package/templates/projects/changesets-changelog/.prettierignore.ejs +3 -0
  49. package/templates/projects/changesets-changelog/CONTRIBUTING.md.ejs +3 -0
  50. package/templates/projects/changesets-changelog/package.json.ejs +38 -20
  51. package/templates/projects/changesets-changelog/prettier.config.cjs.ejs +3 -0
  52. package/templates/projects/changesets-changelog/source/main.ts.check.ejs +4 -0
  53. package/templates/projects/changesets-changelog/source/main.ts.create.ejs +6 -0
  54. package/templates/projects/changesets-changelog/tests/tsconfig.json.ejs +19 -12
  55. package/templates/projects/changesets-changelog/tsconfig.json.ejs +23 -9
  56. package/templates/projects/changesets-changelog/tsconfig.typecheck.json.ejs +21 -10
  57. package/templates/projects/eslint-config/.eslintrc.cjs.ejs +21 -0
  58. package/templates/projects/eslint-config/.prettierignore.ejs +3 -0
  59. package/templates/projects/eslint-config/CONTRIBUTING.md.ejs +3 -0
  60. package/templates/projects/eslint-config/package.json.ejs +39 -25
  61. package/templates/projects/eslint-config/prettier.config.cjs.ejs +3 -0
  62. package/templates/projects/eslint-config/source/main.ts.check.ejs +4 -0
  63. package/templates/projects/eslint-config/source/main.ts.create.ejs +6 -0
  64. package/templates/projects/eslint-config/tsconfig.json.ejs +23 -9
  65. package/templates/projects/eslint-config/tsconfig.typecheck.json.ejs +20 -9
  66. package/templates/projects/library/.eslintrc.cjs.ejs +21 -0
  67. package/templates/projects/library/.prettierignore.ejs +3 -0
  68. package/templates/projects/library/CONTRIBUTING.md.ejs +18 -0
  69. package/templates/projects/library/README.md.create.ejs +36 -0
  70. package/templates/projects/library/package.json.create.ejs +1 -1
  71. package/templates/projects/library/package.json.ejs +35 -13
  72. package/templates/projects/library/prettier.config.cjs.ejs +3 -0
  73. package/templates/projects/library/source/main.ts.check.ejs +4 -0
  74. package/templates/projects/library/source/main.ts.create.ejs +5 -0
  75. package/templates/projects/library/tests/tsconfig.json.ejs +19 -12
  76. package/templates/projects/library/tsconfig.json.ejs +23 -9
  77. package/templates/projects/library/tsconfig.typecheck.json.ejs +20 -9
  78. package/templates/projects/library/typedoc.config.cjs.ejs +13 -7
  79. package/templates/projects/remix-app/.eslintrc.cjs.ejs +21 -0
  80. package/templates/projects/remix-app/.prettierignore.ejs +3 -0
  81. package/templates/projects/remix-app/CONTRIBUTING.md.ejs +3 -0
  82. package/templates/projects/remix-app/Dockerfile.ejs +47 -0
  83. package/templates/projects/remix-app/README.md.create.ejs +26 -0
  84. package/templates/projects/remix-app/app/entry.client.tsx.create.ejs +16 -0
  85. package/templates/projects/remix-app/app/root.tsx.create.ejs +26 -0
  86. package/templates/projects/remix-app/app/routes/_index.tsx.create.ejs +18 -0
  87. package/templates/projects/remix-app/app/tailwind.css.create.ejs +7 -0
  88. package/templates/projects/remix-app/config.json +4 -0
  89. package/templates/projects/remix-app/env.d.ts.ejs +14 -0
  90. package/templates/projects/remix-app/fly.toml.ejs +18 -0
  91. package/templates/projects/remix-app/package.json.create.ejs +14 -0
  92. package/templates/projects/remix-app/package.json.ejs +67 -0
  93. package/templates/projects/remix-app/postcss.config.cjs.ejs +18 -0
  94. package/templates/projects/remix-app/prettier.config.cjs.ejs +19 -0
  95. package/templates/projects/remix-app/tailwind.config.ts.ejs +21 -0
  96. package/templates/projects/remix-app/tests/setup.ts.ejs +13 -0
  97. package/templates/projects/remix-app/tests/tsconfig.json.ejs +24 -0
  98. package/templates/projects/remix-app/tsconfig.json.ejs +30 -0
  99. package/templates/projects/remix-app/tsconfig.typecheck.json.ejs +19 -0
  100. package/templates/projects/remix-app/vite.config.ts.ejs +40 -0
  101. package/templates/workspace/.eslintrc.cjs.ejs +9 -13
  102. package/templates/workspace/.github/workflows/{pull-request.yaml.ejs → check-pull-request.yaml.ejs} +30 -7
  103. package/templates/workspace/.github/workflows/merge-to-main-branch.yaml.ejs +12 -4
  104. package/templates/workspace/.github/workflows/release-pull-request.yaml.ejs +105 -0
  105. package/templates/workspace/.github/workflows/release.yaml.ejs +65 -105
  106. package/templates/workspace/.github/workflows/update-pull-request.yaml.ejs +139 -0
  107. package/templates/workspace/.gitignore.ejs +9 -1
  108. package/templates/workspace/.prettierignore.ejs +9 -10
  109. package/templates/workspace/CONTRIBUTING.md.ejs +18 -0
  110. package/templates/workspace/README.md.create.ejs +16 -0
  111. package/templates/workspace/README.md.insert.ejs +1 -0
  112. package/templates/workspace/package.json.ejs +6 -16
  113. package/templates/workspace/prettier.config.cjs.ejs +19 -0
  114. package/templates/workspace/tsconfig.json.ejs +23 -0
  115. package/templates/workspace/tsconfig.typecheck.json.ejs +10 -4
  116. package/templates/workspace/turbo.json.ejs +1 -1
  117. package/dist/main.d.ts +0 -10
  118. package/dist/main.js +0 -128
  119. package/dist/main.js.map +0 -1
  120. package/src/main.ts +0 -166
  121. package/templates/projects/carson-templates/.swcrc.ejs +0 -23
  122. package/templates/projects/carson-templates/jest.config.ts.ejs +0 -30
  123. package/templates/projects/carson-templates/src/main.ts.check.ejs +0 -5
  124. package/templates/projects/carson-templates/src/main.ts.create.ejs +0 -4
  125. package/templates/projects/changesets-changelog/.swcrc.ejs +0 -25
  126. package/templates/projects/changesets-changelog/jest.config.ts.ejs +0 -24
  127. package/templates/projects/changesets-changelog/src/main.ts.check.ejs +0 -5
  128. package/templates/projects/changesets-changelog/src/main.ts.create.ejs +0 -4
  129. package/templates/projects/eslint-config/.swcrc.ejs +0 -25
  130. package/templates/projects/eslint-config/jest.config.ts.ejs +0 -24
  131. package/templates/projects/eslint-config/src/main.ts.check.ejs +0 -5
  132. package/templates/projects/eslint-config/src/main.ts.create.ejs +0 -4
  133. package/templates/projects/eslint-config/tests/tsconfig.json.ejs +0 -17
  134. package/templates/projects/library/.swcrc.ejs +0 -23
  135. package/templates/projects/library/jest.config.ts.ejs +0 -30
  136. package/templates/projects/library/src/main.ts.check.ejs +0 -5
  137. package/templates/projects/library/src/main.ts.create.ejs +0 -4
  138. package/templates/workspace/prettier.config.js.ejs +0 -19
  139. package/templates/workspace/tsconfig.options.json.ejs +0 -24
@@ -0,0 +1,47 @@
1
+ ---
2
+ to: 'Dockerfile'
3
+ strategy: overwrite
4
+ ---
5
+ <%
6
+ let lines = [];
7
+
8
+ for (let project of workspace.projects) {
9
+ lines.push(`COPY --chown=nodeuser ${project.relativePath} ${project.relativePath}`);
10
+ }
11
+ -%>
12
+ #
13
+ # DO NOT EDIT!
14
+ # This file was autogenerated by Carson.
15
+ # Changes may cause incorrect behavior and will be lost when the file is regenerated.
16
+ #
17
+ # Run `npx carson update workspace` to regenerate.
18
+ #
19
+
20
+ FROM node:16-alpine
21
+
22
+ # Create a new user and change directory ownership
23
+ RUN adduser --disabled-password --home /app --uid 12000 --gecos '' nodeuser
24
+ RUN chown -R nodeuser /app
25
+ USER nodeuser
26
+
27
+ WORKDIR /app
28
+
29
+ # Copy files
30
+ # We need to copy files needed for installing dependencies, app, and its direct and indirect dependencies that are located in the same workspace
31
+ COPY --chown=nodeuser package.json package.json
32
+ COPY --chown=nodeuser package-lock.json package-lock.json
33
+ <%- lines.join('\n') %>
34
+
35
+ # Install dependencies
36
+ RUN npm ci --ignore-scripts
37
+
38
+ # Add stuff to process.env
39
+ ENV IS_DOCKER=true
40
+ ENV TZ=Europe/Prague
41
+ ENV NODE_ENV=production
42
+ ENV NODE_OPTIONS=--enable-source-maps
43
+
44
+ WORKDIR /app/<%- project.relativePath %>
45
+
46
+ EXPOSE 5000
47
+ ENTRYPOINT ["npm", "start"]
@@ -0,0 +1,26 @@
1
+ ---
2
+ to: 'README.md'
3
+ strategy: create
4
+ ---
5
+ <!-- header --><!-- header -->
6
+
7
+ ## Installation
8
+
9
+ 🚧 This section is under development. Please check back later for updates.
10
+
11
+ ## Usage
12
+
13
+ 🚧 This section is under development. Please check back later for updates.
14
+
15
+ ## Documentation
16
+
17
+ 🚧 This section is under development. Please check back later for updates.
18
+
19
+ ## Contributing
20
+
21
+ If you want to contribute, see [CONTRIBUTING](./CONTRIBUTING.md) for details.
22
+
23
+ ## License
24
+
25
+ This package is licensed under the GNU Affero General Public License v3. See [LICENSE](./LICENSE.md)
26
+ for details.
@@ -0,0 +1,16 @@
1
+ ---
2
+ to: 'app/entry.client.tsx'
3
+ strategy: create
4
+ ---
5
+ import {RemixBrowser} from '@remix-run/react';
6
+ import {startTransition, StrictMode} from 'react';
7
+ import {hydrateRoot} from 'react-dom/client';
8
+
9
+ startTransition(() => {
10
+ hydrateRoot(
11
+ document,
12
+ <StrictMode>
13
+ <RemixBrowser />
14
+ </StrictMode>,
15
+ );
16
+ });
@@ -0,0 +1,26 @@
1
+ ---
2
+ to: 'app/root.tsx'
3
+ strategy: create
4
+ ---
5
+ import {Links, Meta, Outlet, Scripts, ScrollRestoration} from '@remix-run/react';
6
+
7
+ import './tailwind.css';
8
+
9
+ export default function Root() {
10
+ return (
11
+ <html lang="en">
12
+ <head>
13
+ <meta charSet="utf-8" />
14
+ <meta name="viewport" content="width=device-width,initial-scale=1" />
15
+ <Meta />
16
+ <Links />
17
+ </head>
18
+ <body>
19
+ <Outlet />
20
+
21
+ <ScrollRestoration />
22
+ <Scripts />
23
+ </body>
24
+ </html>
25
+ );
26
+ }
@@ -0,0 +1,18 @@
1
+ ---
2
+ to: 'app/routes/_index.tsx'
3
+ strategy: create
4
+ ---
5
+ import {type MetaFunction} from '@remix-run/node';
6
+
7
+ export const meta: MetaFunction = () => [
8
+ {title: 'Hello, world!'},
9
+ {name: 'description', content: 'Hello world page.'},
10
+ ];
11
+
12
+ export default function Index() {
13
+ return (
14
+ <div>
15
+ <h1>Hello, world!</h1>
16
+ </div>
17
+ );
18
+ }
@@ -0,0 +1,7 @@
1
+ ---
2
+ to: 'app/tailwind.css'
3
+ strategy: create
4
+ ---
5
+ @tailwind base;
6
+ @tailwind components;
7
+ @tailwind utilities;
@@ -0,0 +1,4 @@
1
+ {
2
+ "disallowMultiProjectWorkspace": false,
3
+ "disallowSingleProjectWorkspace": false
4
+ }
@@ -0,0 +1,14 @@
1
+ ---
2
+ to: 'env.d.ts'
3
+ strategy: overwrite
4
+ ---
5
+ /**
6
+ * DO NOT EDIT!
7
+ * This file was autogenerated by Carson.
8
+ * Changes may cause incorrect behavior and will be lost when the file is regenerated.
9
+ *
10
+ * Run `npx carson update workspace` to regenerate.
11
+ */
12
+
13
+ /// <reference types="@remix-run/node" />
14
+ /// <reference types="vite/client" />
@@ -0,0 +1,18 @@
1
+ ---
2
+ to: 'fly.toml'
3
+ if: <%- Boolean(project.config.deployment?.appName) %>
4
+ strategy: overwrite
5
+ ---
6
+ app = <%- JSON.stringify(project.config.deployment?.appName, null, 2) %>
7
+ primary_region = "ams"
8
+
9
+ [build]
10
+ dockerfile = "./Dockerfile"
11
+
12
+ [http_service]
13
+ internal_port = 5000
14
+ force_https = true
15
+ auto_stop_machines = true
16
+ auto_start_machines = true
17
+ min_machines_running = 0
18
+ processes = ["app"]
@@ -0,0 +1,14 @@
1
+ ---
2
+ to: 'package.json'
3
+ strategy: create
4
+ ---
5
+ {
6
+ "name": "<%- project.name %>",
7
+ "version": "0.0.0",
8
+ "description": "",
9
+ "repository": {
10
+ "url": "<%- workspace.repository?.url ?? '' %>"
11
+ },
12
+ "license": "AGPL-3.0-only",
13
+ "author": "Jakub Mazanec <jakub@mazanec.dev>"
14
+ }
@@ -0,0 +1,67 @@
1
+ ---
2
+ to: 'package.json'
3
+ strategy: merge
4
+ ---
5
+ <%
6
+ let dependencies = [
7
+ '@remix-run/express',
8
+ '@remix-run/node',
9
+ '@remix-run/react',
10
+ '@remix-run/serve',
11
+ 'cross-env',
12
+ 'isbot',
13
+ 'react',
14
+ 'react-dom'
15
+ ];
16
+ let developmentDependencies = [
17
+ '@remix-run/dev',
18
+ '@types/node',
19
+ '@types/react',
20
+ '@types/react-dom',
21
+ '@vitest/coverage-v8',
22
+ 'autoprefixer',
23
+ 'cross-env',
24
+ 'del-cli',
25
+ 'eslint',
26
+ 'prettier',
27
+ 'prettier-plugin-packagejson',
28
+ 'prettier-plugin-tailwindcss',
29
+ 'tailwindcss',
30
+ 'vite',
31
+ 'vitest',
32
+ 'typescript',
33
+ ];
34
+
35
+ let packageJson = lodash.merge(
36
+ {
37
+ private: true,
38
+ repository: {
39
+ type: 'git',
40
+ directory: project.relativePath,
41
+ },
42
+ type: 'module',
43
+ scripts: {
44
+ build: 'del-cli build && remix vite:build',
45
+ clean: 'del-cli coverage build *.tsbuildinfo',
46
+ develop: 'cross-env PORT=5000 remix vite:dev',
47
+ format: FORMAT_COMMAND,
48
+ start:
49
+ 'cross-env NODE_ENV=production PORT=5000 remix-serve ./build/server/index.js --port 5000',
50
+ test: 'del-cli coverage && vitest run --coverage',
51
+ typecheck: 'tsc --project tsconfig.typecheck.json',
52
+ },
53
+ dependencies: getDependencies(dependencies, workspace),
54
+ devDependencies: getDependencies(developmentDependencies, workspace),
55
+ packageManager: 'npm@10.1.0',
56
+ engines: {
57
+ node: '^20.8.0',
58
+ },
59
+ },
60
+ project.config.overrides?.packageJson ?? {},
61
+ );
62
+
63
+ if (project.config.deployment?.appName) {
64
+ packageJson.scripts.deploy = `flyctl deploy ../.. --config ${project.relativePath}/fly.toml`;
65
+ }
66
+ -%>
67
+ <%- JSON.stringify(packageJson) %>
@@ -0,0 +1,18 @@
1
+ ---
2
+ to: 'postcss.config.cjs'
3
+ strategy: overwrite
4
+ ---
5
+ /**
6
+ * DO NOT EDIT!
7
+ * This file was autogenerated by Carson.
8
+ * Changes may cause incorrect behavior and will be lost when the file is regenerated.
9
+ *
10
+ * Run `npx carson update workspace` to regenerate.
11
+ */
12
+
13
+ module.exports = {
14
+ plugins: {
15
+ tailwindcss: {},
16
+ autoprefixer: {},
17
+ },
18
+ };
@@ -0,0 +1,19 @@
1
+ ---
2
+ to: 'prettier.config.cjs'
3
+ strategy: overwrite
4
+ ---
5
+ <%
6
+ let prettierConfig = {
7
+ ...PRETTIER_OPTIONS,
8
+ plugins: ['prettier-plugin-packagejson', 'prettier-plugin-tailwindcss'],
9
+ };
10
+ -%>
11
+ /**
12
+ * DO NOT EDIT!
13
+ * This file was autogenerated by Carson.
14
+ * Changes may cause incorrect behavior and will be lost when the file is regenerated.
15
+ *
16
+ * Run `npx carson update workspace` to regenerate.
17
+ */
18
+
19
+ module.exports = <%- JSON.stringify(prettierConfig, null, 2) %>;
@@ -0,0 +1,21 @@
1
+ ---
2
+ to: 'tailwind.config.ts'
3
+ strategy: overwrite
4
+ ---
5
+ /**
6
+ * DO NOT EDIT!
7
+ * This file was autogenerated by Carson.
8
+ * Changes may cause incorrect behavior and will be lost when the file is regenerated.
9
+ *
10
+ * Run `npx carson update workspace` to regenerate.
11
+ */
12
+
13
+ import {type Config} from 'tailwindcss';
14
+
15
+ export default {
16
+ content: ['./app/**/*.{js,jsx,ts,tsx}'],
17
+ theme: {
18
+ extend: {},
19
+ },
20
+ plugins: [],
21
+ } satisfies Config;
@@ -0,0 +1,13 @@
1
+ ---
2
+ to: 'tests/setup.ts'
3
+ strategy: overwrite
4
+ ---
5
+ /**
6
+ * DO NOT EDIT!
7
+ * This file was autogenerated by Carson.
8
+ * Changes may cause incorrect behavior and will be lost when the file is regenerated.
9
+ *
10
+ * Run `npx carson update workspace` to regenerate.
11
+ */
12
+
13
+ import '@testing-library/jest-dom/vitest';
@@ -0,0 +1,24 @@
1
+ ---
2
+ to: 'tests/tsconfig.json'
3
+ strategy: overwrite
4
+ ---
5
+ <%
6
+ let tsconfig = {
7
+ compilerOptions: {
8
+ ...TSCONFIG_COMPILER_OPTIONS,
9
+ composite: false,
10
+ noEmit: true,
11
+ },
12
+ include: ['./**/*'],
13
+ references: [{path: '..'}],
14
+ };
15
+ -%>
16
+ //
17
+ // DO NOT EDIT!
18
+ // This file was autogenerated by Carson.
19
+ // Changes may cause incorrect behavior and will be lost when the file is regenerated.
20
+ //
21
+ // Run `npx carson update workspace` to regenerate.
22
+ //
23
+
24
+ <%- JSON.stringify(tsconfig, null, 2) %>
@@ -0,0 +1,30 @@
1
+ ---
2
+ to: 'tsconfig.json'
3
+ strategy: overwrite
4
+ ---
5
+ <%
6
+ let tsconfig = lodash.merge(
7
+ {
8
+ compilerOptions: {
9
+ ...TSCONFIG_COMPILER_OPTIONS,
10
+ allowJs: true,
11
+ esModuleInterop: true,
12
+ noEmit: true,
13
+ resolveJsonModule: true,
14
+ rootDir: '.',
15
+ },
16
+ include: ['./env.d.ts', './*', './app/**/*'],
17
+ references: getReferences(workspace, project),
18
+ },
19
+ project.config.overrides?.tsconfig ?? {},
20
+ );
21
+ -%>
22
+ //
23
+ // DO NOT EDIT!
24
+ // This file was autogenerated by Carson.
25
+ // Changes may cause incorrect behavior and will be lost when the file is regenerated.
26
+ //
27
+ // Run `npx carson update workspace` to regenerate.
28
+ //
29
+
30
+ <%- JSON.stringify(tsconfig, null, 2) %>
@@ -0,0 +1,19 @@
1
+ ---
2
+ to: 'tsconfig.typecheck.json'
3
+ strategy: overwrite
4
+ ---
5
+ //
6
+ // DO NOT EDIT!
7
+ // This file was autogenerated by Carson.
8
+ // Changes may cause incorrect behavior and will be lost when the file is regenerated.
9
+ //
10
+ // Run `npx carson update workspace` to regenerate.
11
+ //
12
+
13
+ {
14
+ "extends": "./tsconfig.json",
15
+ "compilerOptions": {
16
+ "composite": false
17
+ },
18
+ "include": ["./app/**/*", "./tests/**/*", "./*"]
19
+ }
@@ -0,0 +1,40 @@
1
+ ---
2
+ to: 'vite.config.ts'
3
+ strategy: overwrite
4
+ ---
5
+ /**
6
+ * DO NOT EDIT!
7
+ * This file was autogenerated by Carson.
8
+ * Changes may cause incorrect behavior and will be lost when the file is regenerated.
9
+ *
10
+ * Run `npx carson update workspace` to regenerate.
11
+ */
12
+
13
+ import {unstable_vitePlugin as remix} from '@remix-run/dev';
14
+ import {installGlobals} from '@remix-run/node';
15
+ import _ from 'lodash';
16
+ import {defineConfig} from 'vitest/config';
17
+
18
+ installGlobals();
19
+
20
+ export default defineConfig(
21
+ _.merge(
22
+ {
23
+ server: {
24
+ port: 5000,
25
+ strictPort: true,
26
+ },
27
+ plugins: [remix({
28
+ future: {
29
+ v3_fetcherPersist: true,
30
+ v3_relativeSplatPath: true,
31
+ v3_throwAbortReason: true,
32
+ },
33
+ })],
34
+ test: {
35
+ setupFiles: ['tests/setup.ts'],
36
+ },
37
+ },
38
+ <%- JSON.stringify(project.config.overrides?.viteConfig ?? {}, null, 2) %>,
39
+ ),
40
+ );
@@ -2,6 +2,14 @@
2
2
  to: '.eslintrc.cjs'
3
3
  strategy: overwrite
4
4
  ---
5
+ /**
6
+ * DO NOT EDIT!
7
+ * This file was autogenerated by Carson.
8
+ * Changes may cause incorrect behavior and will be lost when the file is regenerated.
9
+ *
10
+ * Run `npx carson update workspace` to regenerate.
11
+ */
12
+
5
13
  module.exports = {
6
14
  root: true,
7
15
  extends: [
@@ -9,17 +17,5 @@ module.exports = {
9
17
  '@jakubmazanec/eslint-config/nodejs',
10
18
  '@jakubmazanec/eslint-config/prettier',
11
19
  ],
12
- ignorePatterns: [
13
- '.next/',
14
- 'bin/',
15
- 'build/',
16
- 'coverage/',
17
- 'dist/',
18
- 'node_modules/',
19
- 'public/',
20
- '*.json',
21
- '*.md',
22
- '*.mdx',
23
- '*.d.ts',
24
- ],
20
+ ignorePatterns: <%- JSON.stringify(LINT_IGNORE_PATTERNS, null, 2) %>,
25
21
  };
@@ -1,7 +1,15 @@
1
1
  ---
2
- to: '.github/workflows/pull-request.yaml'
2
+ to: '.github/workflows/check-pull-request.yaml'
3
3
  strategy: overwrite
4
4
  ---
5
+ #
6
+ # DO NOT EDIT!
7
+ # This file was autogenerated by Carson.
8
+ # Changes may cause incorrect behavior and will be lost when the file is regenerated.
9
+ #
10
+ # Run `npx carson update workspace` to regenerate.
11
+ #
12
+
5
13
  name: Check pull request
6
14
 
7
15
  on:
@@ -9,19 +17,33 @@ on:
9
17
  branches:
10
18
  - development
11
19
 
20
+ concurrency:
21
+ group: ${{ github.workflow }}-${{ github.ref }}
22
+ cancel-in-progress: true
23
+
12
24
  jobs:
13
- pull_request_check:
25
+ check_pull_request:
26
+ name: Check pull request
27
+ if: ${{ github.actor != 'renovate[bot]' }}
14
28
  runs-on: ubuntu-latest
15
29
  timeout-minutes: 15
30
+ permissions:
31
+ contents: read
32
+ id-token: write
16
33
  steps:
17
- - uses: actions/checkout@v3
34
+ - uses: actions/checkout@v4
18
35
  with:
19
- token: ${{secrets.GITHUB_TOKEN}}
36
+ token: ${{ secrets.PAT }}
20
37
  fetch-depth: 0
21
38
 
22
- - uses: actions/setup-node@v3
39
+ - name: Configure git
40
+ run: |
41
+ git config user.email "bot@mazanec.dev"
42
+ git config user.name "Bot"
43
+
44
+ - uses: actions/setup-node@v4
23
45
  with:
24
- node-version: 16
46
+ node-version: 20
25
47
 
26
48
  - name: Install packages
27
49
  run: npm ci
@@ -58,4 +80,5 @@ jobs:
58
80
  git config --unset core.filemode
59
81
 
60
82
  - name: Check for changesets
61
- run: npx changeset status --since=origin/development
83
+ if: "github.actor != 'renovate[bot]'"
84
+ run: npx changeset status --since=origin/<%- getDevelopmentBranch(workspace) %>
@@ -15,6 +15,14 @@ function getRepoFromUrl(url) {
15
15
  return urlToShortGithubUrl(url).split('/')[1] ?? '';
16
16
  }
17
17
  -%>
18
+ #
19
+ # DO NOT EDIT!
20
+ # This file was autogenerated by Carson.
21
+ # Changes may cause incorrect behavior and will be lost when the file is regenerated.
22
+ #
23
+ # Run `npx carson update workspace` to regenerate.
24
+ #
25
+
18
26
  name: Merge development branch to main branch
19
27
 
20
28
  on: [workflow_dispatch]
@@ -25,9 +33,9 @@ jobs:
25
33
  runs-on: ubuntu-latest
26
34
  timeout-minutes: 15
27
35
  steps:
28
- - uses: actions/checkout@v3
36
+ - uses: actions/checkout@v4
29
37
  with:
30
- token: ${{secrets.PAT}}
38
+ token: ${{ secrets.PAT }}
31
39
  fetch-depth: 0
32
40
 
33
41
  - name: Configure git
@@ -35,9 +43,9 @@ jobs:
35
43
  git config user.email "bot@mazanec.dev"
36
44
  git config user.name "Bot"
37
45
 
38
- - uses: actions/setup-node@v3
46
+ - uses: actions/setup-node@v4
39
47
  with:
40
- node-version: 16
48
+ node-version: 20
41
49
  registry-url: 'https://registry.npmjs.org'
42
50
 
43
51
  - name: Install packages