Skip to content

Commit d395390

Browse files
committed
Update documentation
1 parent 0dc81bf commit d395390

3 files changed

Lines changed: 52 additions & 39 deletions

File tree

docs/about/roadmap.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
# Roadmap & release history
22

3-
What we're planning to do. Only includes minor and major releases, patch releases only fix errors, meaning they aren't planned, as our plan and hope is to write errorless code (which we'll never do, but we'll try our best to get as close as possible to that).
3+
What we're planning to do. Only includes minor and major releases, patch releases only fix errors, meaning they aren't really planned, as our plan and hope is to write errorless code (which we'll never do, but we'll try our best to get as close as possible to that).
44

55
We'll expand (and rarely, but not impossibly, shrink) this roadmap as we make progress and/or change our plans.
66

77
This page also lists all minor and major releases since 2.X. Patches aren't listed, and most bugfixes aren't included (as we don't "plan" to fix bugs).
88

9-
## 5.X (Upcoming)
9+
**Patch releases are made on a weekly basis, and feature releases are made on a monthly basis.** You can check more info in [our release schedule document here](https://github.com/FuckingNode/FuckingNode/blob/master/RELEASE_SCHEDULE.md).
10+
11+
## 5.X (Released)
1012

1113
- [x] Improve `setup`.
1214
- [x] Add more setups (LICENSEs, gitignores, etc...).

docs/learn/errors.md

Lines changed: 44 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
# Error codes
22

3-
Maybe you want to make a tool that automates our automation tool, or maybe you're just too lazy to read the error message. However, most (if not all) possible exceptions that abort execution are called "FknErrors" (internal name, shown to you), and include a readable, identifiable error code. These are all listed here, with a brief explanation of their meaning.
3+
Maybe you want to make a tool that automates our automation tool, or maybe you're just too lazy to read the error message. However, most (if not all) possible exceptions that abort execution are called "FknErrors", and include a readable, identifiable error code. These are all listed here, with a brief explanation of their meaning.
44

55
They follow this convention:
66

77
```ts
88
// IF IT'S TWO PARTS
99
CATEGORY__ERROR
1010
// IF IT'S THREE PARTS
11-
CATEGORY__COMPONENT_ERROR
11+
CATEGORY__COMPONENT__ERROR
1212
```
1313

1414
For example, `Env__NoPkgFile` (category:`Environment`, error:`NoPackageFile`).
1515

1616
---
1717

18-
## Operating system category [Os]
18+
## Operating system [Os]
1919

2020
Errors caused by the underlying OS.
2121

@@ -38,7 +38,7 @@ It's most often caused by either:
3838
- The entity indeed not existing (perhaps you had a typo).
3939
- On Windows, `echo 'hi'` or `Write-Output 'hi'` don't exist, `cmd echo 'hi'` or `powershell Write-Output 'hi'`. If you want to use Windows shell command you need to explicitly call a shell executable (preferably PowerShell). Blame it on Microsoft, not us.
4040

41-
## File system category [Fs]
41+
## File system [Fs]
4242

4343
Errors related to the filesystem.
4444

@@ -66,31 +66,47 @@ Happens whenever we ask for a DIRECTORY yet you give us a path that points to a
6666

6767
Usually happens with kickstart. You provided a path that is _not_ empty, but _has to_ be empty. Thus, we demand emptying of the directory.
6868

69-
## Git category [Git]
69+
## Configuration [Cfg]
70+
71+
Errors related to configuration.
72+
73+
### Invalid CmdKey
74+
75+
`Cfg__InvalidCmdK`
76+
77+
[Cmds](../manual/fknode-yaml.md#cmdsets) require to start with a key character, either `~`, `$`, `=`, or `<`. If the first character of a Cmd is not any of those, this error throws.
78+
79+
## Git [Git]
7080

7181
Errors related to Git operations.
7282

7383
### No branch
7484

75-
> `Git__NoBranch`
85+
`Git__NoBranch`
7686

7787
Happens when the user specifies a branch that does indeed not exist.
7888

7989
### No branch at all
8090

81-
> `Git__NoBranchAA`
91+
`Git__NoBranchAA`
8292

8393
Happens when there's no branches at all. Git repos are supposed to always have a branch, so it is very unlikely - and if it happens it's most likely a bug.
8494

85-
### Unknown Errors
95+
### Forbidden commit
8696

87-
All errors in this category are `Git__UE__[ACTION]`, which can be `IsRepo`, `Push`, or `Commit`. Any unexpected error when performing any of these actions for any project will trigger a Task category `FknError`.
97+
`Git__Forbidden`
8898

89-
If unclear, `Git__UE__IsRepo` fires if an error happens trying to determine if a directory is a Git repo.
99+
Happens when a forbidden file, like `.env`, is committed. These should be in your `gitignore`, but if for some reason they weren't there, FuckingNode disallows committing them.
90100

91-
A completely unknown error will fire `Git__UE` with no specified action.
101+
As of now, forbidden files are: `".env", ".env.local", ".sqlite", ".db", "node_modules", ".bak"`
92102

93-
## Environment category [Env]
103+
### Other errors
104+
105+
There are many Git errors, one for each operation FuckingNode may perform. Except for the above, these are considered obvious to understand, + they always include an error message mentioning the exact Git command that caused the failure together with its output.
106+
107+
To not spend too much time writing documentation they've been omitted.
108+
109+
## Environment [Env]
94110

95111
Errors related to environments; not in the sense of env variables, but in the sense of "project environments". That's how we refer to the structure we make of each of your projects in order to work with it.
96112

@@ -110,7 +126,7 @@ A "project" doesn't have the file that makes it a project (`package.json`, `Carg
110126

111127
`Env__PkgFileUnparsable`
112128

113-
If your package file is plain invalid (invalid JSON in a `package.json` file for example) or lacks the `name` field, we consider it unparsable.
129+
If a project's package file is plain invalid (invalid JSON in a `package.json` file for example) or lacks critical information (like `name` in `package.json` or `go` in `go.mod`), we consider it unparsable and throw this error.
114130

115131
### Cannot determine env
116132

@@ -124,52 +140,43 @@ Differentiating between npm, pnpm, Yarn, Bun, Deno, Rust, or Go projects, or no
124140

125141
_The name's a bit of a joke, but_ this error happens when the same project has two or more lockfiles. Lockfiles are our main tool to determine the "state" (env) of your project; your project is not Schrödinger's cat and shouldn't be in several states at the same time.
126142

127-
## Task category [Task]
143+
## Task [Task]
128144

129-
All errors in this category are `Task__[TASK TYPE]`, which can be `Release`, `Commit`, `Launch`, `Update`, `Lint`, `Pretty`, or `Build`. Any unexpected error when running any of these tasks for any project will trigger a Task category `FknError`.
145+
All errors in this category are `Task__[TASK TYPE]`, which can be `Release`, `Commit`, `Launch`, `Update`, `Lint`, `Pretty`, or `Build`. Any unexpected error when running any of these tasks for any project will trigger a Task category error.
130146

131-
## Parameter category [Param]
147+
## Parameter [Param]
132148

133-
All errors in this category are `Param__[PARAM TYPE]Invalid`, which can be `Target`, `CIntensity`, `Setup`, `Ver`, `GitTarget`, `GitTargetAlias`, or `Whatever` for anything else. When running a command that requires parameters (`fkstart <GIT TARGET>`, `fksetup <SETUP>`, and so on...), any missing or invalid parameter will trigger a Task category `FknError`.
149+
All errors in this category are `Param__[PARAM TYPE]Invalid`, which can be `Target`, `CIntensity`, `Setup`, `Ver`, `GitTarget`, `GitTargetAlias`, or `Whatever` for anything else. When running a command that requires parameters (`fkstart <GIT TARGET>`, `fksetup <SETUP>`, and so on...), any missing or invalid parameter will trigger a Task category error.
134150

135151
If unclear, `Ver` refers to "version" (for the `fkrelease` command), `CIntensity` refers to "cleaner intensity", and both `GitTarget` and `GitTargetAlias` refer to the kickstart parameter, respectively referring to Git URLs and Git aliases.
136152

137-
## Interop category [Interop]
153+
## Interop [Interop]
138154

139-
All errors in this category are `Interop__[ACTION TYPE]Unable`, which can be `Publish`, `Migrate`, or `JSRun`. Attempting to use a feature in a platform where it's unsupported (most likely Cargo or Go) will trigger a Task category `FknError`.
155+
All errors in this category are `Interop__[ACTION TYPE]Unable`, which can be `Publish`, `Migrate`, or `JSRun`. Attempting to use a feature in a platform where it's unsupported (most likely Cargo or Go) will trigger a Task category error.
140156

141157
If unclear, `JSRunUnable` means trying to define a task that would go like `npm run X` for Cargo or Go - you cannot do "JS-like run" with these two.
142158

143159
## Internal errors
144160

145161
Errors that are probably our fault for writing bad code. These errors are extremely unlikely to appear, but they're worth documenting.
146162

147-
### Non existent app path
148-
149-
`Internal__NonexistentAppPath`
150-
151-
Almost impossible, unless we make a mistake and don't realize until release. Happens if somewhere in the code we reference a path to an internal config file that doesn't exist.
152-
153-
### Improper assignment
154-
155-
`Internal__ImproperAssignment`
156-
157-
Happens if the CLI attempts to proceed with actions that are unsupported with the current project environment. Technically an Interop error should take precedence, making this nonexistent, but sometimes the TS compiler won't shut up, so this error is a thing.
158-
159163
### Invalid embedded file
160164

161165
`Internal__InvalidEmbedded`
162166

163-
If a developer references a file embedded within the binary that's indeed not embedded within the binary, this error happens.
167+
If FuckingNode references a file embedded within the binary that's indeed not embedded within the binary, this error happens.
164168

165169
### Lazy
166170

167171
`Internal__Lazy`
168172

169-
If we're lazy to implement a feature but want to quickly make a release for whatever reason, instead of removing references to the feature we'll show this error, indicating we were indeed lazy to implement it. As of now it's impossible (no code leads to it), but as we get bigger ideas for major releases you MIGHT get to see it once.
173+
More casual way to call a "NotImplemented" error. If we're lazy to finish a feature or can't finish it on time to fullfil our [release schedule](https://github.com/FuckingNode/FuckingNode/blob/master/RELEASE_SCHEDULE.md), instead of removing references to the feature we'll make it trigger this error, indicating we were indeed lazy to implement it.
170174

171175
## External errors
172176

177+
!!! warning
178+
This category will be removed by version 5.1, and these errors will be moved somewhere else.
179+
173180
Errors that depend on something external.
174181

175182
### Publish
@@ -180,8 +187,12 @@ When doing a release, if your package manager's publish command fails, this erro
180187

181188
### Setting / Favorite IDE
182189

190+
`External__Setting__FavIde`
191+
183192
If you changed your favorite IDE to something unsupported, then got us to attempt to launch it, this happens. You cannot directly set this setting to something invalid, you'd have to manually edit the config file - making this an "external" error.
184193

185194
### Project / Not found
186195

196+
`External__Proj__NotFound`
197+
187198
If a project from your list isn't found (in the sense of the filepath not being found), this error happens. You cannot add a project that doesn't exist unless modifying the config file; or adding one that does exist, then moving the directory - making this an "external" error too.

docs/manual/fknode-yaml.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -195,21 +195,21 @@ someCmd:
195195
- <powershell -c 'echo foo'
196196
```
197197

198-
They're an array of special strings / objects with a special prefix indicating type of Cmd. The type modifies the command by prefixing it before execution. Cmd type prefixes are:
198+
They're an array of special strings (or objects) with a key prefix indicating type of Cmd. The type modifies the command by prefixing it before execution. Cmd keys are:
199199

200-
| Cmd type prefix | Cmd type | Behavior |
200+
| Cmd key | Cmd type | Behavior |
201201
| :--- | :--- | ---: |
202202
| `~` | **SHELL SCRIPT** | Auto-prefixes with `powershell -c` on Windows and `bash -c` on macOS/Linux. |
203203
| `$` | **PROJECT SCRIPT** | Auto-prefixes with your runtime’s script run prefix (e.g. `npm run`, `deno task`). |
204204
| `=` | **PROJECT FILE** | Auto-prefixes with your runtime’s file run prefix. |
205205
| `<` | **RAW EXEC** | Doesn't auto-prefix. Use this for manually invoking other programs. |
206206

207-
For cross-platform scripting, you can use a `{ msft: Cmd, posix: Cmd }`, where MSFT runs on Windows and POSIX runs on macOS and Linux. Each Cmd needs to be prefixed. FuckingNode won't check if they're a different Cmd type whatsoever.
207+
For cross-platform scripting, you can use a `{ msft: Cmd, posix: Cmd }`, where MSFT runs on Windows and POSIX runs on macOS and Linux. Each Cmd needs to be prefixed with a key (they don't need to be the same).
208208

209209
It's something like this:
210210

211211
```yaml
212-
{ msft: ~Write-Host 'Ran from Windows!', posix: ~echo 'Ran from Linux/macOS!' }
212+
{ msft: ~Write-Host 'Hi from Windows!', posix: ~echo 'Hi from Linux/macOS!' }
213213
```
214214

215215
Info:

0 commit comments

Comments
 (0)