@adbayb/stack 0.0.0-next-84ccbde → 0.0.0-next-a8b5c70
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/README.md +2 -2
- package/dist/index.mjs +24 -108
- package/package.json +3 -3
- package/{template → templates/multi-projects}/.editorconfig +1 -1
- package/templates/multi-projects/applications/README.md +6 -0
- package/{template → templates/multi-projects}/libraries/README.md +0 -6
- package/templates/multi-projects/libraries/{{projectName}}/package.json.tmpl +39 -0
- package/templates/multi-projects/libraries/{{projectName}}/tsconfig.json +5 -0
- package/{template → templates/multi-projects}/pnpm-workspace.yaml.tmpl +0 -1
- package/templates/single-project/.changeset/README.md +8 -0
- package/templates/single-project/.changeset/config.json.tmpl +13 -0
- package/templates/single-project/.changeset/welcome.md.tmpl +5 -0
- package/templates/single-project/.commitlintrc.json +3 -0
- package/templates/single-project/.editorconfig +4 -0
- package/templates/single-project/.github/ISSUE_TEMPLATE/bug_report.md +34 -0
- package/templates/single-project/.github/ISSUE_TEMPLATE/config.yml +4 -0
- package/templates/single-project/.github/PULL_REQUEST_TEMPLATE.md.tmpl +29 -0
- package/templates/single-project/.github/renovate.json +69 -0
- package/templates/single-project/.github/workflows/continuous_delivery.yml +53 -0
- package/templates/single-project/.github/workflows/continuous_integration.yml +9 -0
- package/templates/single-project/.github/workflows/conventional_commit.yml +48 -0
- package/templates/single-project/.github/workflows/dependency_changelog.yml +117 -0
- package/templates/single-project/.github/workflows/workflow.yml +96 -0
- package/templates/single-project/.gitignore.tmpl +134 -0
- package/templates/single-project/.npmrc.tmpl +8 -0
- package/templates/single-project/.nvmrc.tmpl +1 -0
- package/templates/single-project/.vscode/extensions.json +8 -0
- package/templates/single-project/.vscode/settings.json +27 -0
- package/templates/single-project/CONTRIBUTING.md.tmpl +21 -0
- package/templates/single-project/LICENSE.tmpl +21 -0
- package/templates/single-project/eslint.config.js.tmpl +1 -0
- package/templates/single-project/examples/README.md +6 -0
- package/templates/single-project/examples/default/package.json.tmpl +14 -0
- package/templates/single-project/examples/default/src/index.ts.tmpl +3 -0
- package/templates/single-project/examples/default/tsconfig.json +5 -0
- package/templates/single-project/package.json.tmpl +27 -0
- package/templates/single-project/pnpm-workspace.yaml.tmpl +4 -0
- package/templates/single-project/tools/README.md +6 -0
- package/templates/single-project/tsconfig.json +4 -0
- package/templates/single-project/turbo.json +24 -0
- package/templates/single-project/{{projectName}}/README.md.tmpl +42 -0
- package/templates/single-project/{{projectName}}/src/index.test.ts.tmpl +5 -0
- package/templates/single-project/{{projectName}}/src/index.ts +1 -0
- package/template/applications/README.md +0 -9
- /package/{template → templates/multi-projects}/.changeset/README.md +0 -0
- /package/{template → templates/multi-projects}/.changeset/config.json.tmpl +0 -0
- /package/{template → templates/multi-projects}/.changeset/welcome.md.tmpl +0 -0
- /package/{template → templates/multi-projects}/.commitlintrc.json +0 -0
- /package/{template → templates/multi-projects}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
- /package/{template → templates/multi-projects}/.github/ISSUE_TEMPLATE/config.yml +0 -0
- /package/{template → templates/multi-projects}/.github/PULL_REQUEST_TEMPLATE.md.tmpl +0 -0
- /package/{template → templates/multi-projects}/.github/renovate.json +0 -0
- /package/{template → templates/multi-projects}/.github/workflows/continuous_delivery.yml +0 -0
- /package/{template → templates/multi-projects}/.github/workflows/continuous_integration.yml +0 -0
- /package/{template → templates/multi-projects}/.github/workflows/conventional_commit.yml +0 -0
- /package/{template → templates/multi-projects}/.github/workflows/dependency_changelog.yml +0 -0
- /package/{template → templates/multi-projects}/.github/workflows/workflow.yml +0 -0
- /package/{template → templates/multi-projects}/.gitignore.tmpl +0 -0
- /package/{template → templates/multi-projects}/.npmrc.tmpl +0 -0
- /package/{template → templates/multi-projects}/.nvmrc.tmpl +0 -0
- /package/{template → templates/multi-projects}/.vscode/extensions.json +0 -0
- /package/{template → templates/multi-projects}/.vscode/settings.json +0 -0
- /package/{template → templates/multi-projects}/CONTRIBUTING.md.tmpl +0 -0
- /package/{template → templates/multi-projects}/LICENSE.tmpl +0 -0
- /package/{template → templates/multi-projects}/eslint.config.js.tmpl +0 -0
- /package/{template → templates/multi-projects}/examples/README.md +0 -0
- /package/{template → templates/multi-projects}/examples/default/package.json.tmpl +0 -0
- /package/{template → templates/multi-projects}/examples/default/src/index.ts.tmpl +0 -0
- /package/{template → templates/multi-projects}/examples/default/tsconfig.json +0 -0
- /package/{template → templates/multi-projects/libraries}/{{projectName}}/README.md.tmpl +0 -0
- /package/{template → templates/multi-projects/libraries}/{{projectName}}/src/index.test.ts.tmpl +0 -0
- /package/{template → templates/multi-projects/libraries}/{{projectName}}/src/index.ts +0 -0
- /package/{template → templates/multi-projects}/package.json.tmpl +0 -0
- /package/{template → templates/multi-projects}/tools/README.md +0 -0
- /package/{template → templates/multi-projects}/tsconfig.json +0 -0
- /package/{template → templates/multi-projects}/turbo.json +0 -0
- /package/{template → templates/single-project}/{{projectName}}/package.json.tmpl +0 -0
- /package/{template → templates/single-project}/{{projectName}}/tsconfig.json +0 -0
package/README.md
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
- Support for several application templates (for now, only a default template is available, but others can be added later)
|
|
14
14
|
- Standardized file structure including optional folder creation such as `examples`, `packages`, ...
|
|
15
15
|
- Enable all project lifecycle steps with commands from the setup, check, fix, build, and test to the versioning and release
|
|
16
|
-
- Built-in configuration preset setup (including Node/NPM runtime, Git ignore/hooks, TypeScript, ESLint, Prettier, EditorConfig, Renovate, Changesets, and VSCode)
|
|
16
|
+
- Built-in configuration preset setup (including Node/NPM runtime, Git ignore/hooks, [TypeScript](./config/typescript/), [ESLint](./config/eslint), [Prettier](./config/prettier/), EditorConfig, Renovate, Changesets, and VSCode)
|
|
17
17
|
- A welcoming environment for users and contributors with the continuous integration setup, and the creation of `README.md`, `CONTRIBUTING.md`, and GitHub template files (including issue and pull request ones), ...
|
|
18
18
|
- An optimized development environment with command caching (no build needed if nothing changes)
|
|
19
19
|
|
|
@@ -85,7 +85,7 @@ flowchart TD
|
|
|
85
85
|
|
|
86
86
|
- [Commits](https://www.conventionalcommits.org/)
|
|
87
87
|
- [Scripts](https://conventionalscripts.org/)
|
|
88
|
-
- [File Structure](https://nx.dev/concepts/
|
|
88
|
+
- [File Structure](https://nx.dev/concepts/decisions/folder-structure)
|
|
89
89
|
- Monorepo-first structure to:
|
|
90
90
|
- Keep a consistent file structure pattern across templates (ease template familiarity and onboarding)
|
|
91
91
|
- Ease examples setup
|
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { helpers, termost } from 'termost';
|
|
2
2
|
import { existsSync, readdirSync, cpSync, readFileSync, renameSync, writeFileSync } from 'node:fs';
|
|
3
3
|
import { createRequire } from 'node:module';
|
|
4
|
-
import { resolve } from 'node:path';
|
|
4
|
+
import { resolve, join } from 'node:path';
|
|
5
|
+
import process from 'node:process';
|
|
5
6
|
import { fdir } from 'fdir';
|
|
6
7
|
import { mkdir, symlink, writeFile, chmod } from 'node:fs/promises';
|
|
7
8
|
|
|
@@ -51,7 +52,7 @@ ${input.body}
|
|
|
51
52
|
* @example
|
|
52
53
|
* resolveFromStackDirectory("./templates");
|
|
53
54
|
*/ const resolveFromStackDirectory = (path)=>{
|
|
54
|
-
return resolve(
|
|
55
|
+
return resolve(import.meta.dirname, "../", path);
|
|
55
56
|
};
|
|
56
57
|
const getNpmVersion = async ()=>{
|
|
57
58
|
try {
|
|
@@ -326,106 +327,9 @@ const PRESERVE_FILES = [
|
|
|
326
327
|
".turbo"
|
|
327
328
|
];
|
|
328
329
|
|
|
329
|
-
var
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
var publishConfig = {
|
|
333
|
-
access: "public"
|
|
334
|
-
};
|
|
335
|
-
var files = [
|
|
336
|
-
"bin",
|
|
337
|
-
"config",
|
|
338
|
-
"dist",
|
|
339
|
-
"template"
|
|
340
|
-
];
|
|
341
|
-
var bin = {
|
|
342
|
-
stack: "./bin/index.mjs"
|
|
343
|
-
};
|
|
344
|
-
var type = "module";
|
|
345
|
-
var exports = {
|
|
346
|
-
".": {
|
|
347
|
-
source: "./src/index.ts",
|
|
348
|
-
"default": "./dist/index.mjs"
|
|
349
|
-
},
|
|
350
|
-
"./eslint": "./config/eslint/index.mjs",
|
|
351
|
-
"./prettier": "./config/prettier/index.mjs",
|
|
352
|
-
"./typescript": "./config/typescript/base.json",
|
|
353
|
-
"./typescript/react": "./config/typescript/react.json"
|
|
354
|
-
};
|
|
355
|
-
var scripts = {
|
|
356
|
-
prepublishOnly: "pnpm build",
|
|
357
|
-
prestart: "echo 'prestart'",
|
|
358
|
-
start: "./bin/index.mjs",
|
|
359
|
-
build: "quickbundle build",
|
|
360
|
-
watch: "quickbundle watch"
|
|
361
|
-
};
|
|
362
|
-
var keywords = [
|
|
363
|
-
"stack",
|
|
364
|
-
"scripts",
|
|
365
|
-
"toolchain",
|
|
366
|
-
"development"
|
|
367
|
-
];
|
|
368
|
-
var author = {
|
|
369
|
-
name: "Ayoub Adib",
|
|
370
|
-
email: "adbayb@gmail.com",
|
|
371
|
-
url: "https://twitter.com/adbayb"
|
|
372
|
-
};
|
|
373
|
-
var repository = {
|
|
374
|
-
type: "git",
|
|
375
|
-
url: "https://github.com/adbayb/stack.git",
|
|
376
|
-
directory: "applications/stack"
|
|
377
|
-
};
|
|
378
|
-
var license = "MIT";
|
|
379
|
-
var devDependencies = {
|
|
380
|
-
"@types/node": "20.16.12",
|
|
381
|
-
"@types/eslint-config-prettier": "6.11.3",
|
|
382
|
-
quickbundle: "2.5.0"
|
|
383
|
-
};
|
|
384
|
-
var dependencies = {
|
|
385
|
-
"@changesets/changelog-github": "^0.5.0",
|
|
386
|
-
"@changesets/cli": "^2.27.9",
|
|
387
|
-
"@commitlint/cli": "^19.5.0",
|
|
388
|
-
"@commitlint/config-conventional": "^19.5.0",
|
|
389
|
-
"@eslint/compat": "^1.2.1",
|
|
390
|
-
"@eslint/eslintrc": "^3.1.0",
|
|
391
|
-
"@vitest/eslint-plugin": "^1.1.7",
|
|
392
|
-
eslint: "^9.13.0",
|
|
393
|
-
"eslint-plugin-react": "^7.37.2",
|
|
394
|
-
globals: "^15.11.0",
|
|
395
|
-
"typescript-eslint": "^8.11.0",
|
|
396
|
-
"eslint-config-prettier": "^9.1.0",
|
|
397
|
-
"eslint-import-resolver-typescript": "^3.6.3",
|
|
398
|
-
"eslint-plugin-import": "^2.31.0",
|
|
399
|
-
"eslint-plugin-jest-formatting": "^3.1.0",
|
|
400
|
-
"eslint-plugin-jsdoc": "^50.4.3",
|
|
401
|
-
"eslint-plugin-mdx": "^3.1.5",
|
|
402
|
-
"eslint-plugin-prettier": "^5.2.1",
|
|
403
|
-
"eslint-plugin-react-hooks": "^5.0.0",
|
|
404
|
-
"eslint-plugin-sonarjs": "^2.0.4",
|
|
405
|
-
"eslint-plugin-sort-keys-custom-order": "^2.2.0",
|
|
406
|
-
fdir: "^6.4.2",
|
|
407
|
-
prettier: "^3.3.3",
|
|
408
|
-
termost: "^0.17.0",
|
|
409
|
-
turbo: "^2.2.3",
|
|
410
|
-
typescript: "^5.6.3"
|
|
411
|
-
};
|
|
412
|
-
var pkg = {
|
|
413
|
-
name: name,
|
|
414
|
-
version: version,
|
|
415
|
-
description: description,
|
|
416
|
-
publishConfig: publishConfig,
|
|
417
|
-
files: files,
|
|
418
|
-
bin: bin,
|
|
419
|
-
type: type,
|
|
420
|
-
exports: exports,
|
|
421
|
-
scripts: scripts,
|
|
422
|
-
keywords: keywords,
|
|
423
|
-
author: author,
|
|
424
|
-
repository: repository,
|
|
425
|
-
license: license,
|
|
426
|
-
devDependencies: devDependencies,
|
|
427
|
-
dependencies: dependencies
|
|
428
|
-
};
|
|
330
|
+
var version = "0.0.0-next-a8b5c70";
|
|
331
|
+
|
|
332
|
+
const VERSION = version;
|
|
429
333
|
|
|
430
334
|
const createCreateCommand = (program)=>{
|
|
431
335
|
program.command({
|
|
@@ -434,7 +338,7 @@ const createCreateCommand = (program)=>{
|
|
|
434
338
|
}).task({
|
|
435
339
|
handler () {
|
|
436
340
|
botMessage({
|
|
437
|
-
title: `I'm Stack v${
|
|
341
|
+
title: `I'm Stack v${VERSION}, your bot assistant`,
|
|
438
342
|
description: "I can guarantee you a project creation in under 1 minute 🚀"
|
|
439
343
|
}, {
|
|
440
344
|
type: "information"
|
|
@@ -451,7 +355,17 @@ const createCreateCommand = (program)=>{
|
|
|
451
355
|
}).input({
|
|
452
356
|
key: "inputUrl",
|
|
453
357
|
label: "Where will it be stored? (Git remote URL)",
|
|
358
|
+
defaultValue: "git@github.com:adbayb/stack.git",
|
|
454
359
|
type: "text"
|
|
360
|
+
}).input({
|
|
361
|
+
key: "inputTemplate",
|
|
362
|
+
label: "Which template you would like to apply?",
|
|
363
|
+
defaultValue: "single-project",
|
|
364
|
+
options: [
|
|
365
|
+
"single-project",
|
|
366
|
+
"multi-projects"
|
|
367
|
+
],
|
|
368
|
+
type: "select"
|
|
455
369
|
}).task({
|
|
456
370
|
label: label$2("Checking pre-requisites"),
|
|
457
371
|
async handler () {
|
|
@@ -495,8 +409,8 @@ const createCreateCommand = (program)=>{
|
|
|
495
409
|
}
|
|
496
410
|
}).task({
|
|
497
411
|
label: label$2("Applying template"),
|
|
498
|
-
handler ({ data }) {
|
|
499
|
-
applyTemplate(data);
|
|
412
|
+
handler ({ data, inputTemplate }) {
|
|
413
|
+
applyTemplate(inputTemplate, data);
|
|
500
414
|
}
|
|
501
415
|
}).task({
|
|
502
416
|
label: label$2("Installing dependencies"),
|
|
@@ -558,14 +472,15 @@ const createCreateCommand = (program)=>{
|
|
|
558
472
|
const label$2 = (message)=>`${message} 🔨`;
|
|
559
473
|
/**
|
|
560
474
|
* A simple template engine to evaluate dynamic expressions and apply side effets (such as hydrating a content with values from an input object) on impacted template files.
|
|
475
|
+
* @param template - The selected template.
|
|
561
476
|
* @param dataModel - Data model mapping the template expression key with its corresponding value.
|
|
562
477
|
* @example
|
|
563
478
|
* applyTemplate(
|
|
564
479
|
* { toReplace: "value" },
|
|
565
480
|
* );
|
|
566
|
-
*/ const applyTemplate = (dataModel)=>{
|
|
481
|
+
*/ const applyTemplate = (template, dataModel)=>{
|
|
567
482
|
const templateExtension = ".tmpl";
|
|
568
|
-
const templateRootPath = resolveFromStackDirectory("./template
|
|
483
|
+
const templateRootPath = resolveFromStackDirectory(join("./templates", template));
|
|
569
484
|
const projectRootPath = resolveFromProjectDirectory("./");
|
|
570
485
|
const templateExpressionRegExp = /{{(.*?)}}/g;
|
|
571
486
|
const evaluate = (content)=>{
|
|
@@ -716,7 +631,8 @@ const createWatchCommand = (program)=>{
|
|
|
716
631
|
const createProgram = (...commandFactories)=>{
|
|
717
632
|
const program = termost({
|
|
718
633
|
name: "stack",
|
|
719
|
-
description: "Toolbox to easily scaffold and maintain a project"
|
|
634
|
+
description: "Toolbox to easily scaffold and maintain a project",
|
|
635
|
+
version: VERSION
|
|
720
636
|
});
|
|
721
637
|
for (const commandBuilder of commandFactories){
|
|
722
638
|
commandBuilder(program);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adbayb/stack",
|
|
3
|
-
"version": "0.0.0-next-
|
|
3
|
+
"version": "0.0.0-next-a8b5c70",
|
|
4
4
|
"description": "My opinionated JavaScript-based toolchain",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"bin",
|
|
10
10
|
"config",
|
|
11
11
|
"dist",
|
|
12
|
-
"
|
|
12
|
+
"templates"
|
|
13
13
|
],
|
|
14
14
|
"bin": {
|
|
15
15
|
"stack": "./bin/index.mjs"
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
"typescript": "^5.6.3"
|
|
77
77
|
},
|
|
78
78
|
"scripts": {
|
|
79
|
-
"prestart": "
|
|
79
|
+
"prestart": "pnpm build",
|
|
80
80
|
"start": "./bin/index.mjs",
|
|
81
81
|
"build": "quickbundle build",
|
|
82
82
|
"watch": "quickbundle watch"
|
|
@@ -1,9 +1,3 @@
|
|
|
1
1
|
# Libraries
|
|
2
2
|
|
|
3
|
-
> [!note]
|
|
4
|
-
> Optional folder that can be either:
|
|
5
|
-
>
|
|
6
|
-
> - Kept if the root package needs to be moved into it (when several package types (applications, libraries, ...) need to be created and the root package is by its nature a library)
|
|
7
|
-
> - Otherwise, removed if no planned use case
|
|
8
|
-
|
|
9
3
|
A collection of internal and/or publishable libraries (referred to as packages in the Node ecosystem) that are leveraged during software development to implement/share a specific aspect/functionality. A library generally encapsulates highly cohesive modules together.
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "{{projectName}}",
|
|
3
|
+
"description": "{{projectDescription}}",
|
|
4
|
+
"version": "0.0.0",
|
|
5
|
+
"publishConfig": {
|
|
6
|
+
"access": "public"
|
|
7
|
+
},
|
|
8
|
+
"files": [
|
|
9
|
+
"dist"
|
|
10
|
+
],
|
|
11
|
+
"sideEffects": false,
|
|
12
|
+
"type": "module",
|
|
13
|
+
"exports": {
|
|
14
|
+
".": {
|
|
15
|
+
"source": "./src/index.ts",
|
|
16
|
+
"types": "./dist/index.d.ts",
|
|
17
|
+
"require": "./dist/index.cjs",
|
|
18
|
+
"import": "./dist/index.mjs",
|
|
19
|
+
"default": "./dist/index.mjs"
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"license": "MIT",
|
|
23
|
+
"author": "Ayoub Adib <adbayb@gmail.com> (https://twitter.com/adbayb)",
|
|
24
|
+
"bugs": "https://github.com/{{repoId}}/issues",
|
|
25
|
+
"homepage": "https://github.com/{{repoId}}/tree/main/{{projectName}}#readme",
|
|
26
|
+
"repository": {
|
|
27
|
+
"type": "git",
|
|
28
|
+
"url": "{{projectUrl}}",
|
|
29
|
+
"directory": "libraries/{{projectName}}"
|
|
30
|
+
},
|
|
31
|
+
"scripts": {
|
|
32
|
+
"prepublishOnly": "pnpm build",
|
|
33
|
+
"clean": "rm -rf dist",
|
|
34
|
+
"start": "pnpm watch",
|
|
35
|
+
"build": "pnpm clean && quickbundle build",
|
|
36
|
+
"watch": "quickbundle watch",
|
|
37
|
+
"test": "vitest"
|
|
38
|
+
}
|
|
39
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# Changesets
|
|
2
|
+
|
|
3
|
+
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
|
|
4
|
+
with multi-package repos, or single-package repos to help you version and publish your code. You can
|
|
5
|
+
find the full documentation for it [in our repository](https://github.com/changesets/changesets)
|
|
6
|
+
|
|
7
|
+
We have a quick list of common questions to get you started engaging with this project in
|
|
8
|
+
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://raw.githubusercontent.com/changesets/changesets/main/packages/config/schema.json",
|
|
3
|
+
"access": "public",
|
|
4
|
+
"baseBranch": "main",
|
|
5
|
+
"changelog": ["@changesets/changelog-github", { "repo": "{{repoId}}" }],
|
|
6
|
+
"commit": false,
|
|
7
|
+
"ignore": ["@examples/*"],
|
|
8
|
+
"updateInternalDependencies": "patch",
|
|
9
|
+
"___experimentalUnsafeOptions_WILL_CHANGE_IN_PATCH": {
|
|
10
|
+
"onlyUpdatePeerDependentsWhenOutOfRange": true,
|
|
11
|
+
"updateInternalDependents": "out-of-range"
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: "🐛 Bug Report"
|
|
3
|
+
about: Report a reproducible bug or regression.
|
|
4
|
+
title: "Bug: "
|
|
5
|
+
labels: ["bug", "triage"]
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Description
|
|
9
|
+
|
|
10
|
+
<!--
|
|
11
|
+
Please provide a clear and concise description of what the bug is with the current and expected behavior(s). Include
|
|
12
|
+
screenshots if needed. Please test using the latest version of the relevant package to make sure your issue has not already been fixed.
|
|
13
|
+
-->
|
|
14
|
+
|
|
15
|
+
## Reproduction
|
|
16
|
+
|
|
17
|
+
<!--
|
|
18
|
+
Issues without reproduction steps or code examples may be immediately closed as not actionable. Your bug will get fixed much faster if we can run your code. You may provide a screenshot of the application if you think it is relevant to your bug report. Here are some tips for providing a minimal example: https://stackoverflow.com/help/mcve.
|
|
19
|
+
-->
|
|
20
|
+
|
|
21
|
+
## Environment
|
|
22
|
+
|
|
23
|
+
<!--
|
|
24
|
+
Please provide the environment you discovered this bug in.
|
|
25
|
+
It must include following informations:
|
|
26
|
+
- OS [eg. Android, iOS, mac OS, Windows, ...]
|
|
27
|
+
- Browser [eg. Chrome@110, Safari@16, ...]
|
|
28
|
+
-->
|
|
29
|
+
|
|
30
|
+
## Additional context
|
|
31
|
+
|
|
32
|
+
<!--
|
|
33
|
+
Add any other context about the problem (eg. issue URL, related issues, documentation, etc...)
|
|
34
|
+
-->
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
Thanks for submitting a pull request!
|
|
3
|
+
We appreciate you spending the time to work on these changes. Before requesting reviews, please make sure that:
|
|
4
|
+
|
|
5
|
+
1. Your contribution follows coding conventions
|
|
6
|
+
2. Some valuable tests have been added
|
|
7
|
+
3. For non-internal change, a changelog entry is added
|
|
8
|
+
|
|
9
|
+
Learn more about contributing [here](https://github.com/{{repoId}}/blob/main/CONTRIBUTING.md)
|
|
10
|
+
-->
|
|
11
|
+
|
|
12
|
+
## Description
|
|
13
|
+
|
|
14
|
+
Please include a concise summary of the change with the relevant context and main highlights:
|
|
15
|
+
|
|
16
|
+
- [ ] What I've done 1
|
|
17
|
+
- [ ] What I've done 2...
|
|
18
|
+
|
|
19
|
+
## Screenshots
|
|
20
|
+
|
|
21
|
+
| Before | After |
|
|
22
|
+
| ------ | ----- |
|
|
23
|
+
| Image | Image |
|
|
24
|
+
|
|
25
|
+
## Resources
|
|
26
|
+
|
|
27
|
+
- Issue (GitHub, ...)
|
|
28
|
+
- Specification (ADRs, RFCs, ...)
|
|
29
|
+
- ...
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
|
3
|
+
"extends": [
|
|
4
|
+
":automergeAll",
|
|
5
|
+
":automergePr",
|
|
6
|
+
":automergeRequireAllStatusChecks",
|
|
7
|
+
":enableVulnerabilityAlerts",
|
|
8
|
+
":label(dependencies)",
|
|
9
|
+
":maintainLockFilesMonthly",
|
|
10
|
+
":prConcurrentLimit10",
|
|
11
|
+
":rebaseStalePrs",
|
|
12
|
+
":semanticCommits",
|
|
13
|
+
":semanticCommitScopeDisabled",
|
|
14
|
+
":semanticPrefixFixDepsChoreOthers",
|
|
15
|
+
":timezone(Europe/Paris)",
|
|
16
|
+
"npm:unpublishSafe",
|
|
17
|
+
"replacements:all",
|
|
18
|
+
"schedule:monthly",
|
|
19
|
+
"workarounds:all"
|
|
20
|
+
],
|
|
21
|
+
"commitBodyTable": true,
|
|
22
|
+
"platformAutomerge": false,
|
|
23
|
+
"ignoreDeps": [],
|
|
24
|
+
"packageRules": [
|
|
25
|
+
{
|
|
26
|
+
"matchPackagePatterns": ["*"],
|
|
27
|
+
"rangeStrategy": "auto"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"matchDepTypes": ["devDependencies"],
|
|
31
|
+
"rangeStrategy": "pin"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"matchDepTypes": ["dependencies"],
|
|
35
|
+
"rangeStrategy": "bump"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"description": "Synchronize CircleCI Docker image version with the Node.js one",
|
|
39
|
+
"matchPackageNames": ["cimg/node"],
|
|
40
|
+
"versioning": "node"
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"groupName": "package dependencies",
|
|
44
|
+
"matchManagers": ["npm"],
|
|
45
|
+
"matchDepTypes": [
|
|
46
|
+
"dependencies",
|
|
47
|
+
"devDependencies",
|
|
48
|
+
"optionalDependencies",
|
|
49
|
+
"peerDependencies"
|
|
50
|
+
]
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"groupName": "infrastructure dependencies",
|
|
54
|
+
"matchManagers": [
|
|
55
|
+
"circleci",
|
|
56
|
+
"github-actions",
|
|
57
|
+
"dockerfile",
|
|
58
|
+
"terraform",
|
|
59
|
+
"terraform-version",
|
|
60
|
+
"docker-compose",
|
|
61
|
+
"kubernetes"
|
|
62
|
+
]
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"groupName": "engine dependencies",
|
|
66
|
+
"matchPackagePatterns": ["node", "pnpm"]
|
|
67
|
+
}
|
|
68
|
+
]
|
|
69
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
name: Continous delivery
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
|
|
8
|
+
concurrency: ${{ github.workflow }}-${{ github.ref }}
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
integrate:
|
|
12
|
+
uses: ./.github/workflows/workflow.yml
|
|
13
|
+
release:
|
|
14
|
+
timeout-minutes: 5
|
|
15
|
+
needs: integrate
|
|
16
|
+
runs-on: ubuntu-latest
|
|
17
|
+
permissions:
|
|
18
|
+
contents: write
|
|
19
|
+
pull-requests: write
|
|
20
|
+
steps:
|
|
21
|
+
- uses: actions/checkout@v4
|
|
22
|
+
- uses: pnpm/action-setup@v4
|
|
23
|
+
- name: Get node version
|
|
24
|
+
run: echo "version=$(cat .nvmrc)" >> $GITHUB_OUTPUT
|
|
25
|
+
id: node
|
|
26
|
+
- name: Setup node ${{ steps.node.outputs.version }}
|
|
27
|
+
uses: actions/setup-node@v4
|
|
28
|
+
with:
|
|
29
|
+
node-version: ${{ steps.node.outputs.version }}
|
|
30
|
+
cache: pnpm
|
|
31
|
+
- name: Setup .npmrc
|
|
32
|
+
run: |
|
|
33
|
+
cat << EOF > "$HOME/.npmrc"
|
|
34
|
+
//registry.npmjs.org/:_authToken=$NPM_TOKEN
|
|
35
|
+
EOF
|
|
36
|
+
env:
|
|
37
|
+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
38
|
+
- name: Install dependencies
|
|
39
|
+
run: pnpm install --frozen-lockfile
|
|
40
|
+
- name: Publish pre-release version(s)
|
|
41
|
+
run: |
|
|
42
|
+
pnpm --recursive exec pnpm version "$(pnpm show ./ version)-next-${GITHUB_SHA::7}"
|
|
43
|
+
pnpm --recursive exec pnpm publish --tag next --no-git-checks
|
|
44
|
+
- name: Prepare or Publish stable version(s)
|
|
45
|
+
uses: changesets/action@v1
|
|
46
|
+
with:
|
|
47
|
+
commit: "chore: release package(s)"
|
|
48
|
+
title: "chore: release package(s)"
|
|
49
|
+
version: pnpm release:version
|
|
50
|
+
publish: pnpm release:publish
|
|
51
|
+
env:
|
|
52
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
53
|
+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
name: Conventional commit
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
types: [opened, edited]
|
|
6
|
+
|
|
7
|
+
jobs:
|
|
8
|
+
main:
|
|
9
|
+
timeout-minutes: 5
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
steps:
|
|
12
|
+
- uses: amannn/action-semantic-pull-request@v5
|
|
13
|
+
id: check_pr_rule
|
|
14
|
+
env:
|
|
15
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
16
|
+
with:
|
|
17
|
+
types: |
|
|
18
|
+
build
|
|
19
|
+
chore
|
|
20
|
+
ci
|
|
21
|
+
docs
|
|
22
|
+
feat
|
|
23
|
+
fix
|
|
24
|
+
perf
|
|
25
|
+
refactor
|
|
26
|
+
revert
|
|
27
|
+
style
|
|
28
|
+
test
|
|
29
|
+
requireScope: false
|
|
30
|
+
subjectPattern: ^(?![A-Z]).+$
|
|
31
|
+
subjectPatternError: The subject must start with a lowercase character
|
|
32
|
+
# Create a sticky comment to display the detailed error
|
|
33
|
+
- uses: marocchino/sticky-pull-request-comment@v2
|
|
34
|
+
if: always() && (steps.check_pr_rule.outputs.error_message != null)
|
|
35
|
+
with:
|
|
36
|
+
header: check_pr_comment
|
|
37
|
+
message: |
|
|
38
|
+
Pull request titles must follow the [Conventional Commits specification](https://www.conventionalcommits.org/).
|
|
39
|
+
Please adjust your title following:
|
|
40
|
+
```
|
|
41
|
+
${{ steps.check_pr_rule.outputs.error_message }}
|
|
42
|
+
```
|
|
43
|
+
# Delete a previous comment when the issue has been resolved
|
|
44
|
+
- if: ${{ steps.check_pr_rule.outputs.error_message == null }}
|
|
45
|
+
uses: marocchino/sticky-pull-request-comment@v2
|
|
46
|
+
with:
|
|
47
|
+
header: check_pr_comment
|
|
48
|
+
delete: true
|