@mrshmllw/campfire 0.0.0
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/.github/CODEOWNERS +19 -0
- package/.github/dependabot.yml +15 -0
- package/.github/pull_request_template.md +28 -0
- package/.github/workflows/auto-merge-dependabot.yml +9 -0
- package/.github/workflows/bump_and_publish.yml +30 -0
- package/.github/workflows/merge_main.yml +25 -0
- package/.github/workflows/preview_bump_and_publish.yml +30 -0
- package/.github/workflows/pull_request.yml +23 -0
- package/README.md +1 -0
- package/dist/configs/index.js +1 -0
- package/dist/index.js +1 -0
- package/dist/utils/index.js +1 -0
- package/libs/configs/index.ts +0 -0
- package/libs/index.ts +0 -0
- package/libs/utils/index.ts +0 -0
- package/package.json +29 -0
- package/release.config.js +116 -0
- package/tsconfig.build.json +6 -0
- package/tsconfig.json +17 -0
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Lines starting with '#' are comments.
|
|
2
|
+
|
|
3
|
+
# Each line is a file pattern followed by one or more owners.
|
|
4
|
+
|
|
5
|
+
# More details are here: https://help.github.com/articles/about-codeowners/
|
|
6
|
+
|
|
7
|
+
# The '\*' pattern is global owners.
|
|
8
|
+
|
|
9
|
+
# Order is important. The last matching pattern has the most precedence.
|
|
10
|
+
|
|
11
|
+
# The folders are ordered as follows:
|
|
12
|
+
|
|
13
|
+
# In each subsection folders are ordered first by depth, then alphabetically.
|
|
14
|
+
|
|
15
|
+
# This should make it easy to add new rules without breaking existing ones.
|
|
16
|
+
|
|
17
|
+
# Global - These owners will be the default owners for everything in the repo.
|
|
18
|
+
|
|
19
|
+
- @marshmallow-insurance/frontend
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
version: 2
|
|
2
|
+
updates:
|
|
3
|
+
- package-ecosystem: npm
|
|
4
|
+
commit-message:
|
|
5
|
+
prefix: "chore(npm-dep): "
|
|
6
|
+
directory: '/'
|
|
7
|
+
schedule:
|
|
8
|
+
interval: daily
|
|
9
|
+
time: '05:00'
|
|
10
|
+
timezone: Europe/London
|
|
11
|
+
open-pull-requests-limit: 99
|
|
12
|
+
reviewers:
|
|
13
|
+
- marshmallow-insurance/frontend
|
|
14
|
+
assignees:
|
|
15
|
+
- marshmallow-insurance/frontend
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
## What does this do?
|
|
2
|
+
<!--
|
|
3
|
+
- A short description of what the PR changes and why it's necessary
|
|
4
|
+
- Give the reviewers context
|
|
5
|
+
- Is the impact global or localised?
|
|
6
|
+
- Any tech debt created or discovered?
|
|
7
|
+
-->
|
|
8
|
+
|
|
9
|
+
## Screenshot / Video
|
|
10
|
+
<!--
|
|
11
|
+
- applicable for UI changes, can be skipped if not relevant. You can drag and drop images/videos to upload them to GitHub.
|
|
12
|
+
- Example with image with fixed width
|
|
13
|
+
- <img src="https://github.com/marshmallow-insurance/uk-auto-signup-www/assets/57456071/3dbf1ec1-2363-4e20-8236-b1f1581b0953" width="300px" />
|
|
14
|
+
shortcuts:
|
|
15
|
+
- Screenshot: cmd + shift + 4
|
|
16
|
+
- Screen recording: cmd + shift + 5
|
|
17
|
+
-->
|
|
18
|
+
|
|
19
|
+
## Relevant tickets / Documentation
|
|
20
|
+
<!--
|
|
21
|
+
- Link to any relevant issue tracking software (jira, GitHub etc), documentation (PRDs, engineering plans, Figma designs) or slack threads
|
|
22
|
+
- If applicable, list any new documentation that has been created/updated e.g. diagrams/flows etc
|
|
23
|
+
-->
|
|
24
|
+
|
|
25
|
+
## Testing
|
|
26
|
+
<!--
|
|
27
|
+
- Tests should have been updated/created to cover the changes made in this PR, if not please explain why
|
|
28
|
+
-->
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
name: Bump and Publish
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_dispatch:
|
|
5
|
+
|
|
6
|
+
permissions:
|
|
7
|
+
contents: write
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
bump-and-publish:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
steps:
|
|
13
|
+
- name: Checkout 🛎️
|
|
14
|
+
uses: actions/checkout@v4
|
|
15
|
+
with:
|
|
16
|
+
persist-credentials: false
|
|
17
|
+
|
|
18
|
+
- name: Setup Node 👾
|
|
19
|
+
uses: actions/setup-node@v4
|
|
20
|
+
with:
|
|
21
|
+
node-version: '20'
|
|
22
|
+
|
|
23
|
+
- name: Install Dependencies 🔧
|
|
24
|
+
run: |
|
|
25
|
+
npm ci
|
|
26
|
+
- name: Generate CHANGELOG.md & Bump & Release to NPM 🦫
|
|
27
|
+
env:
|
|
28
|
+
GITHUB_TOKEN: ${{ secrets.MARSHMALLOW_CI_PAT }}
|
|
29
|
+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
30
|
+
run: npx semantic-release
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
name: Build and Fossa Check
|
|
2
|
+
on:
|
|
3
|
+
push:
|
|
4
|
+
branches:
|
|
5
|
+
- main
|
|
6
|
+
jobs:
|
|
7
|
+
build-and-fossa-check:
|
|
8
|
+
runs-on: ubuntu-latest
|
|
9
|
+
steps:
|
|
10
|
+
- name: Checkout 🛎️
|
|
11
|
+
uses: actions/checkout@v4
|
|
12
|
+
with:
|
|
13
|
+
persist-credentials: false
|
|
14
|
+
- name: Setup Node 👾
|
|
15
|
+
uses: actions/setup-node@v4
|
|
16
|
+
with:
|
|
17
|
+
node-version: '20'
|
|
18
|
+
- name: Install and Build 🔧
|
|
19
|
+
run: |
|
|
20
|
+
npm ci
|
|
21
|
+
npm run check-types
|
|
22
|
+
- name: Fossa dependency analysis 🐛
|
|
23
|
+
uses: fossas/fossa-action@main
|
|
24
|
+
with:
|
|
25
|
+
api-key: ${{ secrets.FOSSA_API_KEY }}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
name: Preview Bump and Publish
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_dispatch:
|
|
5
|
+
|
|
6
|
+
permissions:
|
|
7
|
+
contents: write
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
preview-bump-and-publish:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
steps:
|
|
13
|
+
- name: Checkout 🛎️
|
|
14
|
+
uses: actions/checkout@v4
|
|
15
|
+
with:
|
|
16
|
+
persist-credentials: false
|
|
17
|
+
|
|
18
|
+
- name: Setup Node 👾
|
|
19
|
+
uses: actions/setup-node@v4
|
|
20
|
+
with:
|
|
21
|
+
node-version: '20'
|
|
22
|
+
|
|
23
|
+
- name: Install Dependencies 🔧
|
|
24
|
+
run: |
|
|
25
|
+
npm ci
|
|
26
|
+
- name: Generate preview CHANGELOG.md
|
|
27
|
+
env:
|
|
28
|
+
GITHUB_TOKEN: ${{ secrets.MARSHMALLOW_CI_PAT }}
|
|
29
|
+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
30
|
+
run: npx semantic-release --dry-run
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
name: Build and Check Types
|
|
2
|
+
on:
|
|
3
|
+
pull_request:
|
|
4
|
+
|
|
5
|
+
jobs:
|
|
6
|
+
build-and-check-types:
|
|
7
|
+
runs-on: ubuntu-latest
|
|
8
|
+
steps:
|
|
9
|
+
- name: Checkout 🛎️
|
|
10
|
+
uses: actions/checkout@v4
|
|
11
|
+
with:
|
|
12
|
+
persist-credentials: false
|
|
13
|
+
- name: Setup Node 👾
|
|
14
|
+
uses: actions/setup-node@v4
|
|
15
|
+
with:
|
|
16
|
+
node-version: '20'
|
|
17
|
+
- name: Install and Check Types 🔧
|
|
18
|
+
run: |
|
|
19
|
+
npm ci
|
|
20
|
+
npm run check-types
|
|
21
|
+
- name: Test 🧪
|
|
22
|
+
run: |
|
|
23
|
+
npm run test
|
package/README.md
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# campfire
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
File without changes
|
package/libs/index.ts
ADDED
|
File without changes
|
|
File without changes
|
package/package.json
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@mrshmllw/campfire",
|
|
3
|
+
"version": "0.0.0",
|
|
4
|
+
"description": "Collection of toasty utils and configs used by Marshmallow Technology",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"clean": "rimraf ./dist",
|
|
9
|
+
"test": "echo \"Error: no test specified\" && exit 1",
|
|
10
|
+
"check-types": "tsc --noEmit",
|
|
11
|
+
"build": "npm run clean && tsc --p tsconfig.build.json",
|
|
12
|
+
"prepublishOnly": "npm run build"
|
|
13
|
+
},
|
|
14
|
+
"dependencies": {
|
|
15
|
+
"typescript": "^5.6.3",
|
|
16
|
+
"micromatch": "^4.0.8"
|
|
17
|
+
},
|
|
18
|
+
"devDependencies": {
|
|
19
|
+
"semantic-release": "^24.2.0",
|
|
20
|
+
"@semantic-release/changelog": "^6.0.3",
|
|
21
|
+
"@semantic-release/git": "^10.0.1",
|
|
22
|
+
"@semantic-release/github": "^11.0.1",
|
|
23
|
+
"@semantic-release/npm": "^12.0.1",
|
|
24
|
+
"conventional-changelog-conventionalcommits": "^8.0.0",
|
|
25
|
+
"rimraf": "^6.0.1"
|
|
26
|
+
},
|
|
27
|
+
"author": "",
|
|
28
|
+
"license": "ISC"
|
|
29
|
+
}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import micromatch from "micromatch";
|
|
2
|
+
|
|
3
|
+
const branch = process.env.GITHUB_REF_NAME;
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* @type {import('semantic-release').GlobalConfig}
|
|
7
|
+
*/
|
|
8
|
+
const config = {
|
|
9
|
+
branches: [
|
|
10
|
+
"main",
|
|
11
|
+
{
|
|
12
|
+
name: "(feature|fix|chore)/*",
|
|
13
|
+
prerelease: 'sticks-${name.replace(/\\//g, "-")}',
|
|
14
|
+
},
|
|
15
|
+
],
|
|
16
|
+
tagFormat: "dev.${version}",
|
|
17
|
+
repositoryUrl: "https://github.com/marshmallow-insurance/campfire.git",
|
|
18
|
+
plugins: [
|
|
19
|
+
[
|
|
20
|
+
"@semantic-release/commit-analyzer",
|
|
21
|
+
{
|
|
22
|
+
preset: "angular",
|
|
23
|
+
releaseRules: [
|
|
24
|
+
{ type: "feat", release: "minor" },
|
|
25
|
+
{ type: "fix", release: "patch" },
|
|
26
|
+
{ type: "docs", release: "patch" },
|
|
27
|
+
{ type: "bump", release: "patch" },
|
|
28
|
+
{ type: "dependabot", release: "patch" },
|
|
29
|
+
{ type: "style", release: "patch" },
|
|
30
|
+
{ type: "refactor", release: "patch" },
|
|
31
|
+
{ type: "perf", release: "patch" },
|
|
32
|
+
{ type: "test", release: "patch" },
|
|
33
|
+
{ type: "revert", release: "patch" },
|
|
34
|
+
{ type: "chore", release: "patch" },
|
|
35
|
+
],
|
|
36
|
+
parserOpts: {
|
|
37
|
+
noteKeywords: [
|
|
38
|
+
"BREAKING CHANGE",
|
|
39
|
+
"BREAKING-CHANGE",
|
|
40
|
+
"BREAKING CHANGES",
|
|
41
|
+
"BREAKING-CHANGES",
|
|
42
|
+
],
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
],
|
|
46
|
+
[
|
|
47
|
+
"@semantic-release/release-notes-generator",
|
|
48
|
+
{
|
|
49
|
+
preset: "conventionalcommits",
|
|
50
|
+
presetConfig: {
|
|
51
|
+
types: [
|
|
52
|
+
{ type: "feat", section: "Features" },
|
|
53
|
+
{ type: "fix", section: "Bug Fixes" },
|
|
54
|
+
{ type: "docs", section: "Documentation" },
|
|
55
|
+
{ type: "bump", hidden: true },
|
|
56
|
+
{ type: "dependabot", hidden: true },
|
|
57
|
+
{ type: "style", section: "Styles" },
|
|
58
|
+
{ type: "refactor", section: "Refactors" },
|
|
59
|
+
{ type: "perf", section: "Performance Improvements" },
|
|
60
|
+
{ type: "test", section: "Tests" },
|
|
61
|
+
{ type: "revert", hidden: true },
|
|
62
|
+
{ type: "chore", hidden: true },
|
|
63
|
+
{ type: "*", section: "Others" },
|
|
64
|
+
],
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
],
|
|
68
|
+
[
|
|
69
|
+
"@semantic-release/github",
|
|
70
|
+
{
|
|
71
|
+
assets: ["dist"],
|
|
72
|
+
},
|
|
73
|
+
],
|
|
74
|
+
[
|
|
75
|
+
"@semantic-release/npm",
|
|
76
|
+
{
|
|
77
|
+
npmPublish: true,
|
|
78
|
+
pkgRoot: ".",
|
|
79
|
+
},
|
|
80
|
+
],
|
|
81
|
+
],
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
const isAcceptedBranch = micromatch.isMatch(
|
|
85
|
+
branch,
|
|
86
|
+
config.branches.map((b) => (typeof b === "object" ? b.name : b))
|
|
87
|
+
);
|
|
88
|
+
|
|
89
|
+
if (!isAcceptedBranch) {
|
|
90
|
+
console.log(
|
|
91
|
+
`Branch ${branch} is not accepted for release. Skipping release.`
|
|
92
|
+
);
|
|
93
|
+
console.log(
|
|
94
|
+
`Accepted branches: ${config.branches.join(
|
|
95
|
+
", "
|
|
96
|
+
)}. [Micromatch](https://github.com/micromatch/micromatch?tab=readme-ov-file#matching-features) is used for matching.`
|
|
97
|
+
);
|
|
98
|
+
process.exit(0);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
const isPrereleaseBranch = config.branches.some(
|
|
102
|
+
(b) => typeof b === "object" && isAcceptedBranch && b.prerelease
|
|
103
|
+
);
|
|
104
|
+
|
|
105
|
+
if (!isPrereleaseBranch) {
|
|
106
|
+
config.plugins.push("@semantic-release/changelog", [
|
|
107
|
+
"@semantic-release/git",
|
|
108
|
+
{
|
|
109
|
+
assets: ["package.json", "package-lock.json", "CHANGELOG.md"],
|
|
110
|
+
message:
|
|
111
|
+
"chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}",
|
|
112
|
+
},
|
|
113
|
+
]);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
export default config;
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"outDir": "./dist",
|
|
4
|
+
"target": "ESNext",
|
|
5
|
+
"module": "ESNext",
|
|
6
|
+
"esModuleInterop": true,
|
|
7
|
+
"forceConsistentCasingInFileNames": true,
|
|
8
|
+
"strict": true,
|
|
9
|
+
"skipLibCheck": true,
|
|
10
|
+
"baseUrl": "libs",
|
|
11
|
+
},
|
|
12
|
+
"include": [
|
|
13
|
+
"libs/**/*",
|
|
14
|
+
"release.config.js"
|
|
15
|
+
],
|
|
16
|
+
"exclude": ["node_modules", "dist"]
|
|
17
|
+
}
|