forked from aperturerobotics/goscript
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpackage.json
More file actions
103 lines (103 loc) · 3.8 KB
/
package.json
File metadata and controls
103 lines (103 loc) · 3.8 KB
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
{
"name": "goscript",
"description": "Go to TypeScript transpiler",
"version": "0.0.57",
"author": {
"name": "Aperture Robotics LLC.",
"email": "support@aperture.us",
"url": "http://aperture.us"
},
"contributors": [
{
"name": "Christian Stewart",
"email": "christian@aperture.us",
"url": "http://github.com/paralin"
}
],
"repository": {
"url": "git+ssh://git@github.com/aperturerobotics/goscript.git"
},
"type": "module",
"bin": {
"goscript": "./cmd/goscript/main.js"
},
"exports": {
".": {
"import": {
"types": "./dist/compiler/index.d.ts",
"default": "./dist/compiler/index.js"
}
},
"./compiler": {
"import": {
"types": "./dist/compiler/index.d.ts",
"default": "./dist/compiler/index.js"
}
},
"./gs/builtin": {
"import": {
"types": "./dist/gs/builtin/index.d.ts",
"default": "./dist/gs/builtin/index.js"
}
}
},
"scripts": {
"build": "npm run build:updategover && tsc -p tsconfig.build.json",
"build:updategover": "node -e \"const fs = require('fs'); const { execSync } = require('child_process'); const goVersion = execSync('go mod edit -json', { encoding: 'utf8' }); const goData = JSON.parse(goVersion); const version = goData.Go; const runtimePath = 'gs/runtime/runtime.ts'; const content = fs.readFileSync(runtimePath, 'utf8'); const updatedContent = content.replace(/export const GOVERSION = 'go[^']*'/, \\`export const GOVERSION = 'go\\${version}'\\`); fs.writeFileSync(runtimePath, updatedContent);\"",
"prepublishOnly": "npm run build",
"example": "cd ./example/simple && bash run.bash",
"test": "npm run test:go && npm run test:js",
"test:go": "go test -v ./...",
"test:js": "npm run typecheck && vitest run",
"typecheck": "tsgo --noEmit -p tsconfig.build.json",
"format": "npm run format:go && npm run format:js && npm run format:config",
"format:config": "prettier --write tsconfig.json package.json",
"format:go": "gofumpt -w .",
"format:js": "prettier --write './{src,gs,example}/**/(*.ts|*.tsx|*.html|*.css|*.scss)'",
"release": "npm run release:version && npm run release:commit",
"release:minor": "npm run release:version:minor && npm run release:commit",
"release:version": "npm version patch -m \"release: v%s\" --no-git-tag-version",
"release:version:minor": "npm version minor -m \"release: v%s\" --no-git-tag-version",
"release:commit": "git reset && git add package.json && git commit -s -m \"release: v$npm_package_version\" && git tag v$npm_package_version",
"release:publish": "git push && git push --tags && npm run build && npm publish",
"lint": "npm run lint:go && npm run lint:js",
"lint:go": "golangci-lint run .",
"lint:js": "eslint -c eslint.config.mjs ./",
"lint:js:fix": "eslint -c eslint.config.mjs ./ --fix",
"prepare": "husky",
"precommit": "lint-staged"
},
"files": [
"!**/*.tsbuildinfo",
"dist",
"cmd",
"compiler",
"gs",
"!compliance",
"go.mod",
"go.sum",
"LICENSE",
"README.md"
],
"lint-staged": {
"package.json": "prettier --config .prettierrc.yaml --write",
"./{src,builtin,example}/**/(*.ts|*.tsx|*.html|*.css|*.scss)": "prettier --config .prettierrc.yaml --write"
},
"devDependencies": {
"@aptre/protobuf-es-lite": "^0.5.2",
"@eslint/js": "^9.31.0",
"@types/node": "^24.0.13",
"@typescript-eslint/eslint-plugin": "^8.36.0",
"@typescript-eslint/parser": "^8.36.0",
"@typescript/native-preview": "^7.0.0-dev.20250711.1",
"eslint": "^9.31.0",
"eslint-config-prettier": "^10.0.2",
"husky": "^9.1.7",
"lint-staged": "^16.0.0",
"prettier": "^3.6.2",
"tsx": "^4.0.0",
"typescript": "^5.8.3",
"typescript-eslint": "^8.36.0",
"vitest": "^3.1.2"
}
}