Skip to content

Commit 20cb5b0

Browse files
authored
feat: initial release (#1)
1 parent cb5c6f1 commit 20cb5b0

File tree

16 files changed

+2453
-1558
lines changed

16 files changed

+2453
-1558
lines changed
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
name: "\U0001F41E Bug Report"
3+
about: Report an issue or bug with the project
4+
title: "\U0001F41E (fix): <add description>"
5+
labels: ""
6+
assignees: ""
7+
---
8+
9+
## 🐞 Bug Description
10+
11+
<!--A clear and concise description of what the bug is.-->
12+
13+
### 🔍 Steps to Reproduce
14+
15+
Steps to reproduce the behavior:
16+
17+
1. Go to '...'
18+
2. Click on '...'
19+
3. Scroll down to '...'
20+
4. See error
21+
22+
### 🤔 Expected Behavior
23+
24+
<!--What you expected to happen instead of the issue.-->
25+
26+
### 📷 Screenshots or Logs
27+
28+
<!--If applicable, add screenshots or logs to help explain the issue.-->
29+
30+
### 🌐 Environment
31+
32+
- **OS**: (e.g., macOS, Windows, Linux)
33+
- **Browser**: (e.g., Chrome, Firefox, Safari)
34+
- **Backstage Version**: (if applicable)
35+
- **Node Version**: (e.g., 14.x, 16.x)
36+
37+
### 📋 Additional Context
38+
39+
<!--Any other context about the problem here. Can you think of potential solutions or workarounds?-->
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
name: "\U0001F680 Feature request"
3+
about: Suggest a new feature or enhancement for the project
4+
title: "\U0001F680 (feat): <add description>"
5+
labels: enhancement
6+
assignees: ""
7+
---
8+
9+
## ✨ Feature Description
10+
11+
<!--Clearly and concisely describe the feature or enhancement you'd like to see.-->
12+
13+
### 🎯 Why do we need this feature?
14+
15+
<!--Explain why this feature is important or how it benefits the project.-->
16+
17+
### 📋 Additional Context
18+
19+
<!--Is there any other information, mockups, or ideas that would help us better understand this request? If so, please provide them here.-->
20+
21+
### 🤔 Alternatives
22+
23+
<!--If applicable, mention any alternative solutions or features you've considered.-->

.github/workflows/build.yml

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
name: Build
2+
on:
3+
push:
4+
branches:
5+
- main
6+
pull_request:
7+
branches:
8+
- main
9+
jobs:
10+
lint:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
node-version: [20.x, 22.x]
15+
steps:
16+
- uses: actions/checkout@v3
17+
- name: Install Ubuntu dependencies
18+
run: |
19+
sudo apt-get update && sudo apt-get install -y \
20+
libkrb5-dev
21+
- name: Setup Node.js ${{ matrix.node-version }}
22+
uses: actions/setup-node@v3
23+
with:
24+
node-version: ${{ matrix.node-version }}
25+
cache: "yarn"
26+
- run: yarn install
27+
- run: yarn lint
28+
29+
test:
30+
runs-on: ubuntu-latest
31+
strategy:
32+
matrix:
33+
node-version: [20.x, 22.x]
34+
steps:
35+
- uses: actions/checkout@v3
36+
- name: Install Ubuntu dependencies
37+
run: |
38+
sudo apt-get update && sudo apt-get install -y \
39+
libkrb5-dev
40+
- name: Setup Node.js ${{ matrix.node-version }}
41+
uses: actions/setup-node@v3
42+
with:
43+
node-version: ${{ matrix.node-version }}
44+
cache: "yarn"
45+
- run: yarn install
46+
- run: yarn test
47+
- name: Upload results to Codecov
48+
uses: codecov/codecov-action@v4
49+
with:
50+
token: ${{ secrets.CODECOV_TOKEN }}
51+
52+
build:
53+
runs-on: ubuntu-latest
54+
strategy:
55+
matrix:
56+
node-version: [20.x, 22.x]
57+
steps:
58+
- uses: actions/checkout@v3
59+
- name: Install Ubuntu dependencies
60+
run: |
61+
sudo apt-get update && sudo apt-get install -y \
62+
libkrb5-dev
63+
- name: Setup Node.js ${{ matrix.node-version }}
64+
uses: actions/setup-node@v3
65+
with:
66+
node-version: ${{ matrix.node-version }}
67+
cache: "yarn"
68+
- run: yarn install
69+
- run: yarn build
70+
71+
release-dry-run:
72+
runs-on: ubuntu-latest
73+
needs: [lint, test]
74+
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
75+
steps:
76+
- uses: actions/checkout@v3
77+
with:
78+
fetch-depth: 0
79+
- name: Install Ubuntu dependencies
80+
run: |
81+
sudo apt-get update && sudo apt-get install -y \
82+
libkrb5-dev
83+
- name: Setup Node.js 20.x
84+
uses: actions/setup-node@v3
85+
with:
86+
node-version: 20.x
87+
cache: "yarn"
88+
- run: yarn install
89+
- run: yarn build
90+
- run: yarn semantic-release --dry-run
91+
env:
92+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
93+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

.github/workflows/release.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Release
2+
on:
3+
workflow_dispatch:
4+
5+
jobs:
6+
release:
7+
runs-on: ubuntu-latest
8+
permissions:
9+
contents: write
10+
issues: write
11+
pull-requests: write
12+
id-token: write
13+
steps:
14+
- uses: actions/checkout@v3
15+
with:
16+
fetch-depth: 0
17+
- name: Install Ubuntu dependencies
18+
run: |
19+
sudo apt-get update && sudo apt-get install -y \
20+
libkrb5-dev
21+
- name: Setup Node.js 20.x
22+
uses: actions/setup-node@v3
23+
with:
24+
node-version: 20.x
25+
cache: "yarn"
26+
- run: yarn install
27+
- run: yarn build
28+
- run: yarn semantic-release
29+
env:
30+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
31+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

.npmignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.tsbuildinfo

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# codeowners
22

3-
A way to manage CODEOWNERS files programatically.
3+
A way to manage CODEOWNERS files programmatically.
44

55
## Packages
66

7-
- `@bckr/codeowners` - A TypeScript library for parsing and composing CODEOWNERS files. [View documentation](./packages/codeowners/README.md)
7+
- `@bbckr/codeowners` - A TypeScript library for parsing and composing CODEOWNERS files, [view documentation.](./packages/codeowners/README.md)

babel.config.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1-
module.exports = {
1+
/** @type {import('@babel/core').TransformOptions} */
2+
const config = {
23
presets: [["@babel/preset-env", { targets: { node: "current" } }]],
34
};
5+
6+
export default config;

lerna.json

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,8 @@
33
"version": "independent",
44
"npmClient": "yarn",
55
"command": {
6-
"publish": {
7-
"conventionalCommits": true,
8-
"message": "chore(release): publish",
9-
"registry": "https://registry.npmjs.org/"
6+
"version": {
7+
"conventionalCommits": true
108
}
119
}
1210
}

package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "root",
3-
"version": "1.0.0",
3+
"version": "0.0.0-semantically-released",
44
"description": "A way to manage CODEOWNERS files programatically.",
55
"author": "bri becker <bri@bckr.io>",
66
"license": "MIT",
@@ -11,15 +11,16 @@
1111
"scripts": {
1212
"build": "lerna run build --no-private",
1313
"test": "lerna run test",
14+
"clean": "lerna run clean",
1415
"lint": "eslint . && prettier --check .",
1516
"format": "eslint . --fix && prettier --write .",
16-
"prepare": "yarn build",
17-
"publish-packages": "lerna publish"
17+
"semantic-release": "lerna run semantic-release"
1818
},
1919
"devDependencies": {
2020
"@babel/core": "^7.25.2",
2121
"@babel/preset-env": "^7.25.4",
2222
"@eslint/js": "^9.10.0",
23+
"@semantic-release/changelog": "^6.0.3",
2324
"@types/eslint__js": "^8.42.3",
2425
"@types/jest": "^29.5.13",
2526
"@types/node": "^22.5.5",

packages/codeowners/.releaserc.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"branches": ["main"],
3+
"plugins": [
4+
"@semantic-release/commit-analyzer",
5+
"@semantic-release/release-notes-generator",
6+
"@semantic-release/changelog",
7+
["@semantic-release/npm", { "npmPublish": true, "tarballDir": "./dist" }],
8+
"@semantic-release/github"
9+
]
10+
}

0 commit comments

Comments
 (0)