fluent-transpiler 0.3.1 → 0.4.0
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/README.md +37 -7
- package/cli.js +81 -78
- package/index.d.ts +34 -0
- package/index.js +432 -390
- package/license.json +28 -0
- package/license.template +2 -0
- package/package.json +94 -51
package/license.json
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"license": "license.template",
|
|
3
|
+
"licenseFormats": {
|
|
4
|
+
"js|ts": {
|
|
5
|
+
"eachLine": {
|
|
6
|
+
"prepend": "// "
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
},
|
|
10
|
+
"ignoreFile": ".gitignore",
|
|
11
|
+
"ignore": [
|
|
12
|
+
".github/**/*",
|
|
13
|
+
".husky/**/*",
|
|
14
|
+
"fixtures/*",
|
|
15
|
+
"commitlint.config.cjs",
|
|
16
|
+
"LICENSE",
|
|
17
|
+
"license.template",
|
|
18
|
+
"**/.gitignore",
|
|
19
|
+
"**/*.fuzz.js",
|
|
20
|
+
"**/*.perf.js",
|
|
21
|
+
"**/*.test.js",
|
|
22
|
+
"**/*.md",
|
|
23
|
+
"**/*.yml",
|
|
24
|
+
"**/.DS_Store",
|
|
25
|
+
"**/*.ftl",
|
|
26
|
+
"**/*.mjs"
|
|
27
|
+
]
|
|
28
|
+
}
|
package/license.template
ADDED
package/package.json
CHANGED
|
@@ -1,53 +1,96 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
2
|
+
"workspaces": [
|
|
3
|
+
".github"
|
|
4
|
+
],
|
|
5
|
+
"name": "fluent-transpiler",
|
|
6
|
+
"version": "0.4.0",
|
|
7
|
+
"description": "Transpile Fluent (ftl) files into optimized, tree-shakable, JavaScript EcmaScript Modules (esm).",
|
|
8
|
+
"main": "index.js",
|
|
9
|
+
"types": "index.d.ts",
|
|
10
|
+
"type": "module",
|
|
11
|
+
"sideEffects": false,
|
|
12
|
+
"exports": {
|
|
13
|
+
".": {
|
|
14
|
+
"types": "./index.d.ts",
|
|
15
|
+
"default": "./index.js"
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"engines": {
|
|
19
|
+
"node": ">=24"
|
|
20
|
+
},
|
|
21
|
+
"engineStrict": true,
|
|
22
|
+
"bin": {
|
|
23
|
+
"ftl": "cli.js"
|
|
24
|
+
},
|
|
25
|
+
"files": [
|
|
26
|
+
"cli.js",
|
|
27
|
+
"index.js",
|
|
28
|
+
"index.d.ts"
|
|
29
|
+
],
|
|
30
|
+
"scripts": {
|
|
31
|
+
"prepare": "husky",
|
|
32
|
+
"git:pre-commit": "npm run git:lint-staged && npm run git:test-staged",
|
|
33
|
+
"git:commit-msg": "commitlint --config commitlint.config.cjs --edit",
|
|
34
|
+
"git:lint-staged": "npm run test:lint",
|
|
35
|
+
"git:unit-staged": "node --test",
|
|
36
|
+
"git:test-staged": "npm run git:unit-staged",
|
|
37
|
+
"lint": "biome check --write --no-errors-on-unmatched",
|
|
38
|
+
"test": "npm run test:lint && npm run test:unit && npm run test:types && npm run test:sast && npm run test:perf && npm run test:dast",
|
|
39
|
+
"test:lint": "biome check --staged --no-errors-on-unmatched",
|
|
40
|
+
"test:unit": "node --test --test-force-exit --experimental-test-coverage --test-coverage-lines=100 --test-coverage-branches=100 --test-coverage-functions=100 ./**/*.test.js",
|
|
41
|
+
"test:types": "tstyche",
|
|
42
|
+
"test:perf": "node --test --test-concurrency=1 ./**/*.perf.js",
|
|
43
|
+
"test:sast": "npm run test:sast:license && npm run test:sast:lockfile && npm run test:sast:semgrep && npm run test:sast:trufflehog && npm run test:sast:trivy",
|
|
44
|
+
"test:sast:license": "license-check-and-add check -f license.json",
|
|
45
|
+
"test:sast:lockfile": "lockfile-lint --path package-lock.json --type npm --allowed-schemes \"https:\" --allowed-hosts npm --validate-integrity --validate-package-names",
|
|
46
|
+
"test:sast:semgrep": "semgrep scan --config auto",
|
|
47
|
+
"test:sast:trivy": "trivy fs --scanners vuln,license --include-dev-deps --ignored-licenses 0BSD,Apache-2.0,BSD-1-Clause,BSD-2-Clause,BSD-3-Clause,CC0-1.0,CC-BY-4.0,ISC,MIT,Python-2.0 --exit-code 1 --disable-telemetry .",
|
|
48
|
+
"test:sast:trufflehog": "trufflehog filesystem --only-verified --log-level=-1 ./",
|
|
49
|
+
"test:dast": "npm run test:dast:fuzz",
|
|
50
|
+
"test:dast:fuzz": "node --test ./**/*.fuzz.js",
|
|
51
|
+
"release:license:add": "license-check-and-add add -f license.json",
|
|
52
|
+
"release:license:remove": "license-check-and-add remove -f license.json"
|
|
53
|
+
},
|
|
54
|
+
"repository": {
|
|
55
|
+
"type": "git",
|
|
56
|
+
"url": "git+https://github.com/willfarrell/fluent-transpiler.git"
|
|
57
|
+
},
|
|
58
|
+
"keywords": [
|
|
59
|
+
"Fluent",
|
|
60
|
+
"@fluent",
|
|
61
|
+
"ftl",
|
|
62
|
+
"localization",
|
|
63
|
+
"l10n",
|
|
64
|
+
"internationalization",
|
|
65
|
+
"i18n",
|
|
66
|
+
"ast",
|
|
67
|
+
"compiler",
|
|
68
|
+
"transpiler"
|
|
69
|
+
],
|
|
70
|
+
"author": "willfarrell",
|
|
71
|
+
"license": "MIT",
|
|
72
|
+
"bugs": {
|
|
73
|
+
"url": "https://github.com/willfarrell/fluent-transpiler/issues"
|
|
74
|
+
},
|
|
75
|
+
"homepage": "https://github.com/willfarrell/fluent-transpiler",
|
|
76
|
+
"dependencies": {
|
|
77
|
+
"@fluent/syntax": "0.19.0",
|
|
78
|
+
"change-case": "5.4.4",
|
|
79
|
+
"commander": "14.0.3"
|
|
80
|
+
},
|
|
81
|
+
"devDependencies": {
|
|
82
|
+
"@biomejs/biome": "^2.0.0",
|
|
83
|
+
"@commitlint/cli": "^20.0.0",
|
|
84
|
+
"@commitlint/config-conventional": "^20.0.0",
|
|
85
|
+
"@fluent/bundle": "^0.19.0",
|
|
86
|
+
"fast-check": "^4.0.0",
|
|
87
|
+
"husky": "^9.0.0",
|
|
88
|
+
"license-check-and-add": "4.0.5",
|
|
89
|
+
"tinybench": "^6.0.0",
|
|
90
|
+
"tstyche": "^6.0.0"
|
|
91
|
+
},
|
|
92
|
+
"funding": {
|
|
93
|
+
"type": "github",
|
|
94
|
+
"url": "https://github.com/sponsors/willfarrell"
|
|
95
|
+
}
|
|
53
96
|
}
|