@temir.ra/create-workspace 0.4.0 → 0.4.1
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/CHANGELOG.md +5 -0
- package/README.md +5 -18
- package/buildinfo.txt +1 -1
- package/package.json +2 -2
- package/template/gitignore +0 -1
- package/template/package.json +2 -6
- package/template/tsconfig.json +0 -1
- package/template/tests/buildinfo.test.ts +0 -23
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
# Version 0
|
|
2
2
|
|
|
3
|
+
## 0.4.1
|
|
4
|
+
|
|
5
|
+
1. Cleaned up coding-specific aspects.
|
|
6
|
+
2. Updated the description in `package.json`.
|
|
7
|
+
|
|
3
8
|
## 0.4.0
|
|
4
9
|
|
|
5
10
|
1. Updated `.gitignore`: added `buildinfo-template.txt`, `CHANGELOG-template.md`, `README-template.md`, `buildinfo.txt`, and `*.tsbuildinfo`; replaced nested `template/.gitignore` with `template/gitignore` to prevent template files from being excluded during distribution.
|
package/README.md
CHANGED
|
@@ -91,27 +91,15 @@ See npmjs documentation on [package.json](https://docs.npmjs.com/cli/v11/configu
|
|
|
91
91
|
|
|
92
92
|
"scripts": {
|
|
93
93
|
|
|
94
|
-
//
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
// removes .tsbuildinfo files generated by TypeScript's incremental builds
|
|
98
|
-
"clean:tsbuildinfo": "rm -f *.tsbuildinfo || true",
|
|
99
|
-
|
|
100
|
-
// convenience script to run the clean steps in sequence
|
|
101
|
-
"clean": "bun run clean:dist && bun run clean:tsbuildinfo",
|
|
102
|
-
|
|
103
|
-
// generates buildinfo.txt (for use in lifecycle hooks and CI pipelines)
|
|
104
|
-
"buildinfo": "bun run scripts/buildinfo.ts",
|
|
105
|
-
|
|
106
|
-
// discovers and runs test files
|
|
107
|
-
"tests": "bun test",
|
|
94
|
+
// deletes node_modules and the lockfile, clears the Bun cache, then reinstalls
|
|
95
|
+
// useful for recovering from a corrupted node_modules or lockfile
|
|
96
|
+
"reinstall": "rm -rf node_modules && rm -f bun.lock && bun pm cache rm && bun install && bunx tsc --version",
|
|
108
97
|
|
|
109
98
|
// type-checks the project without emitting output
|
|
110
99
|
"typecheck": "tsc --noEmit",
|
|
111
100
|
|
|
112
|
-
//
|
|
113
|
-
|
|
114
|
-
"reinstall": "rm -rf node_modules && rm -f bun.lock && bun pm cache rm && bun install && bunx tsc --version"
|
|
101
|
+
// generates buildinfo.txt (for use in lifecycle hooks and CI pipelines)
|
|
102
|
+
"buildinfo": "bun run scripts/buildinfo.ts"
|
|
115
103
|
|
|
116
104
|
},
|
|
117
105
|
|
|
@@ -192,7 +180,6 @@ See the TypeScript documentation on [tsconfig.json](https://www.typescriptlang.o
|
|
|
192
180
|
|
|
193
181
|
// files matched by include are type-checked and visible to the IDE (IntelliSense, go-to-definition, etc.)
|
|
194
182
|
"include": [
|
|
195
|
-
"tests/**/*.ts",
|
|
196
183
|
"scripts/**/*.ts"
|
|
197
184
|
],
|
|
198
185
|
// files matched by exclude are hidden from the IDE and excluded from type-checking
|
package/buildinfo.txt
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.4.
|
|
1
|
+
0.4.1+f472194
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@temir.ra/create-workspace",
|
|
3
|
-
"version": "0.4.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.4.1",
|
|
4
|
+
"description": "Template for a generic TypeScript workspace.",
|
|
5
5
|
"author": "temir.ra",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"keywords": [
|
package/template/gitignore
CHANGED
package/template/package.json
CHANGED
|
@@ -11,13 +11,9 @@
|
|
|
11
11
|
},
|
|
12
12
|
"private": true,
|
|
13
13
|
"scripts": {
|
|
14
|
-
"
|
|
15
|
-
"clean:tsbuildinfo": "rm -f *.tsbuildinfo || true",
|
|
16
|
-
"clean": "bun run clean:dist && bun run clean:tsbuildinfo",
|
|
17
|
-
"buildinfo": "bun run scripts/buildinfo.ts",
|
|
18
|
-
"tests": "bun test",
|
|
14
|
+
"reinstall": "rm -rf node_modules && rm -f bun.lock && bun pm cache rm && bun install && bunx tsc --version",
|
|
19
15
|
"typecheck": "tsc --noEmit",
|
|
20
|
-
"
|
|
16
|
+
"buildinfo": "bun run scripts/buildinfo.ts"
|
|
21
17
|
},
|
|
22
18
|
"devDependencies": {
|
|
23
19
|
"@types/bun": "latest",
|
package/template/tsconfig.json
CHANGED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { describe, it, expect } from 'bun:test';
|
|
2
|
-
import { readFileSync } from 'fs';
|
|
3
|
-
import { fileURLToPath } from 'url';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const buildinfoUrl = new URL('../buildinfo.txt', import.meta.url);
|
|
7
|
-
|
|
8
|
-
// taken from https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string
|
|
9
|
-
// Captures: [1]=major, [2]=minor, [3]=patch, [4]=pre-release, [5]=build-metadata
|
|
10
|
-
const SEMVER_REGEX =
|
|
11
|
-
/^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/;
|
|
12
|
-
|
|
13
|
-
function readBuildinfo(): string {
|
|
14
|
-
return readFileSync(fileURLToPath(buildinfoUrl), 'utf-8').trim();
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
describe('buildInfo', () => {
|
|
18
|
-
|
|
19
|
-
it('should be a valid semver string', () => {
|
|
20
|
-
expect(readBuildinfo()).toMatch(SEMVER_REGEX);
|
|
21
|
-
});
|
|
22
|
-
|
|
23
|
-
});
|