@thi.ng/tangle 1.0.9 → 1.1.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 +8 -1
- package/bin/tangle +10 -2
- package/cli.d.ts +0 -1
- package/cli.js +2 -4
- package/package.json +14 -14
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
-
- **Last updated**: 2025-
|
|
3
|
+
- **Last updated**: 2025-02-13T16:03:11Z
|
|
4
4
|
- **Generator**: [thi.ng/monopub](https://thi.ng/monopub)
|
|
5
5
|
|
|
6
6
|
All notable changes to this project will be documented in this file.
|
|
@@ -11,6 +11,13 @@ See [Conventional Commits](https://conventionalcommits.org/) for commit guidelin
|
|
|
11
11
|
**Note:** Unlisted _patch_ versions only involve non-code or otherwise excluded changes
|
|
12
12
|
and/or version bumps of transitive dependencies.
|
|
13
13
|
|
|
14
|
+
## [1.1.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/tangle@1.1.0) (2025-02-11)
|
|
15
|
+
|
|
16
|
+
#### 🚀 Features
|
|
17
|
+
|
|
18
|
+
- update CLI wrapper ([8fd0ffb](https://github.com/thi-ng/umbrella/commit/8fd0ffb))
|
|
19
|
+
- check if `bun` is available, otherwise fallback to `node`
|
|
20
|
+
|
|
14
21
|
### [0.2.17](https://github.com/thi-ng/umbrella/tree/@thi.ng/tangle@0.2.17) (2024-06-21)
|
|
15
22
|
|
|
16
23
|
#### ♻️ Refactoring
|
package/bin/tangle
CHANGED
|
@@ -2,11 +2,19 @@
|
|
|
2
2
|
|
|
3
3
|
# https://stackoverflow.com/a/246128/294515
|
|
4
4
|
SOURCE="${BASH_SOURCE[0]}"
|
|
5
|
-
while [ -
|
|
5
|
+
while [ -L "$SOURCE" ]; do
|
|
6
6
|
DIR="$( cd -P "$( dirname "$SOURCE" )" >/dev/null 2>&1 && pwd )"
|
|
7
7
|
SOURCE="$(readlink "$SOURCE")"
|
|
8
8
|
[[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE"
|
|
9
9
|
done
|
|
10
10
|
DIR="$( cd -P "$( dirname "$SOURCE" )" >/dev/null 2>&1 && pwd )"
|
|
11
|
+
DIR="$(dirname $DIR)"
|
|
11
12
|
|
|
12
|
-
|
|
13
|
+
# prefer using bun
|
|
14
|
+
if [ -x "$(command -v bun)" ]; then
|
|
15
|
+
CMD=bun
|
|
16
|
+
else
|
|
17
|
+
CMD=node
|
|
18
|
+
fi
|
|
19
|
+
|
|
20
|
+
/usr/bin/env $CMD "$DIR/cli.js" "$DIR" "$@"
|
package/cli.d.ts
CHANGED
package/cli.js
CHANGED
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
} from "@thi.ng/args";
|
|
7
7
|
import { readJSON, writeText } from "@thi.ng/file-io";
|
|
8
8
|
import { ConsoleLogger } from "@thi.ng/logger";
|
|
9
|
-
import {
|
|
9
|
+
import { join } from "node:path";
|
|
10
10
|
import { tangleFile } from "./tangle.js";
|
|
11
11
|
const argOpts = {
|
|
12
12
|
noComments: flag({ default: false, desc: "don't generate comments" }),
|
|
@@ -16,8 +16,7 @@ const argOpts = {
|
|
|
16
16
|
desc: "enable dry run (don't overwrite files)"
|
|
17
17
|
})
|
|
18
18
|
};
|
|
19
|
-
const
|
|
20
|
-
const PKG = readJSON(`${INSTALL_DIR}/package.json`);
|
|
19
|
+
const PKG = readJSON(join(process.argv[2], "package.json"));
|
|
21
20
|
const APP_NAME = PKG.name.split("/")[1];
|
|
22
21
|
const HEADER = `
|
|
23
22
|
\u2588 \u2588 \u2588 \u2502
|
|
@@ -65,6 +64,5 @@ try {
|
|
|
65
64
|
export {
|
|
66
65
|
APP_NAME,
|
|
67
66
|
HEADER,
|
|
68
|
-
INSTALL_DIR,
|
|
69
67
|
PKG
|
|
70
68
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thi.ng/tangle",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.1",
|
|
4
4
|
"description": "Literate programming code block tangling / codegen utility, inspired by org-mode & noweb",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./index.js",
|
|
@@ -40,20 +40,20 @@
|
|
|
40
40
|
"tool:tangle": "../../node_modules/.bin/tangle src/**/*.ts"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@thi.ng/api": "^8.11.
|
|
44
|
-
"@thi.ng/args": "^2.3.
|
|
45
|
-
"@thi.ng/checks": "^3.6.
|
|
46
|
-
"@thi.ng/compare": "^2.4.
|
|
47
|
-
"@thi.ng/date": "^2.7.
|
|
48
|
-
"@thi.ng/errors": "^2.5.
|
|
49
|
-
"@thi.ng/file-io": "^2.1.
|
|
50
|
-
"@thi.ng/logger": "^3.1.
|
|
51
|
-
"@thi.ng/strings": "^3.9.
|
|
52
|
-
"@thi.ng/transducers": "^9.2.
|
|
43
|
+
"@thi.ng/api": "^8.11.20",
|
|
44
|
+
"@thi.ng/args": "^2.3.59",
|
|
45
|
+
"@thi.ng/checks": "^3.6.23",
|
|
46
|
+
"@thi.ng/compare": "^2.4.12",
|
|
47
|
+
"@thi.ng/date": "^2.7.43",
|
|
48
|
+
"@thi.ng/errors": "^2.5.26",
|
|
49
|
+
"@thi.ng/file-io": "^2.1.27",
|
|
50
|
+
"@thi.ng/logger": "^3.1.1",
|
|
51
|
+
"@thi.ng/strings": "^3.9.5",
|
|
52
|
+
"@thi.ng/transducers": "^9.2.18"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
|
-
"esbuild": "^0.
|
|
56
|
-
"typedoc": "^0.27.
|
|
55
|
+
"esbuild": "^0.25.0",
|
|
56
|
+
"typedoc": "^0.27.7",
|
|
57
57
|
"typescript": "^5.7.3"
|
|
58
58
|
},
|
|
59
59
|
"keywords": [
|
|
@@ -102,5 +102,5 @@
|
|
|
102
102
|
"thi.ng": {
|
|
103
103
|
"year": 2022
|
|
104
104
|
},
|
|
105
|
-
"gitHead": "
|
|
105
|
+
"gitHead": "9a0b33253fef092aaf301decf6ecd54317874d4c\n"
|
|
106
106
|
}
|