Skip to content

Commit 5092967

Browse files
authored
Merge pull request #3 from hmerritt/dev
Update Go, and all dependencies
2 parents 06670d4 + 46ac886 commit 5092967

14 files changed

Lines changed: 1796 additions & 1154 deletions

File tree

AGENTS.md

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
# AGENTS
2+
3+
Short rules for working in this repo.
4+
5+
## Scope
6+
7+
- This is a Go CLI project to inject environment variables into **bundled** javascript files.
8+
- All changes must be clean and testable.
9+
10+
## Setup
11+
12+
- See `magefile.go` for all available scripts
13+
14+
```sh
15+
# setup
16+
mage -v bootstrap
17+
```
18+
19+
```sh
20+
# build single debug binary (current platform), outputs to root directory
21+
mage -v build:debug
22+
```
23+
24+
```sh
25+
# build all release binaries (cross platform), outputs to bin/
26+
mage -v build:release
27+
```
28+
29+
```sh
30+
# bundles all binaries into zips, ready for release/distribution
31+
mage -v release
32+
```
33+
34+
## Structure
35+
36+
- `bin/` output directory for binaries
37+
- `command/` package containing all CLI commands
38+
- `npm/` npm release directories
39+
- `reactenv/` core package for logic
40+
- `tools/` package for build tools. ensures tool dependencies are kept in sync
41+
- `ui/` package for terminal UI logic
42+
- `version/` package just for the version
43+
44+
## Conventions
45+
46+
- Add brief code comments for tricky or non-obvious logic.
47+
48+
## Tests
49+
50+
- Tests are written in `Vitest`
51+
- Everything should be tested, and be testable
52+
- New behavior requires tests (unit or e2e).
53+
54+
### Test tips
55+
56+
A few tips to write better tests:
57+
58+
[Russ Cox - Go Testing By Example](https://www.youtube.com/watch?v=1-o-iJlL4ak)
59+
60+
- Make it easy to add new tests.
61+
- Use test coverage to find untested code.
62+
- Coverage is no substitute for thought.
63+
- Write exhaustive tests.
64+
- Separate test cases from test logic (i.e use test case tables, separate from logic).
65+
- Look for special cases.
66+
- If you didn't add a test, you didn't fix the bug.
67+
- Test cases can be in testdata files.
68+
- Compare against other implementations.
69+
- Make test failures readable.
70+
- If the answers can change, wtite coed to update them.
71+
- Code quality is limited by test quality.
72+
- Scripts make good test cases.
73+
- Improve your tests over time.
74+
75+
## Commits
76+
77+
- Follow `CONTRIBUTING.md` prefix rules and lowercase messages.
78+
79+
## Agent-Specific Notes
80+
81+
- When answering questions, respond with high-confidence answers only: verify in code; do not guess.

CONTRIBUTING.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Contributing
2+
3+
#1 Rule. Try to write good code; no worries if not.
4+
5+
## Commit rules
6+
7+
### Commit message
8+
9+
A good commit message should describe what changed and why.
10+
11+
It should:
12+
13+
- contain a short description of the change (preferably 50 characters or less)
14+
- be entirely in lowercase with the exception of proper nouns, acronyms, and the words that refer to code, like function/variable names
15+
- be prefixed with one of the following word:
16+
- `fix` : bug fix
17+
- `hotfix` : urgent bug fix
18+
- `feat` : new or updated feature
19+
- `refactor` : code refactoring (no functional change)
20+
- `test` : tests updates
21+
- `ci` : ci and build updates
22+
- `chore` : miscellaneous housekeeping updates
23+
- `Merge branch` : when merging branch
24+
- `Merge pull request` : when merging PR
25+
26+
### Test tips
27+
28+
A few tips to write better tests:
29+
30+
[Russ Cox - Go Testing By Example](https://www.youtube.com/watch?v=1-o-iJlL4ak)
31+
32+
- Make it easy to add new tests.
33+
- Use test coverage to find untested code.
34+
- Coverage is no substitute for thought.
35+
- Write exhaustive tests.
36+
- Separate test cases from test logic (i.e use test case tables, separate from logic).
37+
- Look for special cases.
38+
- If you didn't add a test, you didn't fix the bug.
39+
- Test cases can be in testdata files.
40+
- Compare against other implementations.
41+
- Make test failures readable.
42+
- If the answers can change, wtite coed to update them.
43+
- Code quality is limited by test quality.
44+
- Scripts make good test cases.
45+
- Improve your tests over time.

examples/react-webpack/package.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,20 @@
1212
"description": "",
1313
"packageManager": "yarn@4.5.3+sha512.3003a14012e2987072d244c720506549c1aab73ee728208f1b2580a9fd67b92d61ba6b08fe93f6dce68fd771e3af1e59a0afa28dd242dd0940d73b95fedd4e90",
1414
"devDependencies": {
15-
"@babel/core": "^7.26.0",
16-
"@babel/preset-env": "^7.26.0",
17-
"@babel/preset-react": "^7.26.3",
15+
"@babel/core": "^7.29.0",
16+
"@babel/preset-env": "^7.29.0",
17+
"@babel/preset-react": "^7.28.5",
1818
"@reactenv/webpack": "^0.1.47",
1919
"babel-loader": "^9.2.1",
20-
"css-loader": "^7.1.2",
21-
"dotenv": "^16.4.7",
20+
"css-loader": "^7.1.3",
21+
"dotenv": "^16.6.1",
2222
"file-loader": "^6.2.0",
23-
"html-webpack-plugin": "^5.6.3",
24-
"react": "^19.0.0",
25-
"react-dom": "^19.0.0",
23+
"html-webpack-plugin": "^5.6.6",
24+
"react": "^19.2.4",
25+
"react-dom": "^19.2.4",
2626
"style-loader": "^4.0.0",
27-
"webpack": "^5.97.1",
27+
"webpack": "^5.105.0",
2828
"webpack-cli": "^5.1.4",
29-
"webpack-dev-server": "^5.1.0"
29+
"webpack-dev-server": "^5.2.3"
3030
}
3131
}

0 commit comments

Comments
 (0)