@danielx/civet 0.11.6 → 0.11.8
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 +341 -0
- package/README.md +3 -7
- package/dist/browser.js +24020 -9187
- package/dist/browser.min.js +1 -0
- package/dist/cache.js +128 -0
- package/dist/cache.mjs +89 -0
- package/dist/civet +68 -16
- package/dist/main.js +37775 -12145
- package/dist/main.mjs +37775 -12145
- package/dist/ts-diagnostic.js +42 -1
- package/dist/ts-diagnostic.mjs +41 -1
- package/dist/ts-service/index.js +1239 -0
- package/dist/ts-service/index.js.map +7 -0
- package/dist/ts-service/index.mjs +1188 -0
- package/dist/ts-service/index.mjs.map +7 -0
- package/dist/types.d.ts +2 -14
- package/dist/unplugin/astro.mjs +3 -3
- package/dist/unplugin/esbuild.d.ts +1 -1
- package/dist/unplugin/esbuild.mjs +3 -3
- package/dist/unplugin/farm.mjs +3 -3
- package/dist/unplugin/rolldown.d.ts +1 -1
- package/dist/unplugin/rolldown.mjs +3 -3
- package/dist/unplugin/rollup.d.ts +1 -1
- package/dist/unplugin/rollup.mjs +3 -3
- package/dist/unplugin/rspack.d.ts +1 -1
- package/dist/unplugin/rspack.mjs +3 -3
- package/dist/unplugin/unplugin.d.ts +54 -3
- package/dist/unplugin/unplugin.js +289 -285
- package/dist/unplugin/unplugin.mjs +293 -294
- package/dist/unplugin/vite.d.ts +1 -1
- package/dist/unplugin/vite.mjs +3 -3
- package/dist/unplugin/webpack.d.ts +1 -1
- package/dist/unplugin/webpack.mjs +3 -3
- package/package.json +47 -23
- package/dist/esbuild-plugin.js +0 -131
package/dist/unplugin/vite.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: (options
|
|
1
|
+
declare const _default: (options?: import("./unplugin.js").PluginOptions | undefined) => import("vite").Plugin<any> | import("vite").Plugin<any>[];
|
|
2
2
|
export default _default;
|
package/dist/unplugin/vite.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { createRequire as __civetCreateRequire } from 'node:module'; const require = __civetCreateRequire(import.meta.url);
|
|
2
2
|
|
|
3
|
-
// unplugin-civet:/home/runner/work/Civet/Civet/source/unplugin/vite.civet
|
|
3
|
+
// unplugin-civet:/home/runner/work/Civet/Civet/source/unplugin/vite.civet
|
|
4
4
|
import civetUnplugin from "./unplugin.mjs";
|
|
5
|
-
var
|
|
5
|
+
var vite_default = civetUnplugin.vite;
|
|
6
6
|
export {
|
|
7
|
-
|
|
7
|
+
vite_default as default
|
|
8
8
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: (options
|
|
1
|
+
declare const _default: (options?: import("./unplugin.js").PluginOptions | undefined) => import("unplugin").WebpackPluginInstance;
|
|
2
2
|
export default _default;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { createRequire as __civetCreateRequire } from 'node:module'; const require = __civetCreateRequire(import.meta.url);
|
|
2
2
|
|
|
3
|
-
// unplugin-civet:/home/runner/work/Civet/Civet/source/unplugin/webpack.civet
|
|
3
|
+
// unplugin-civet:/home/runner/work/Civet/Civet/source/unplugin/webpack.civet
|
|
4
4
|
import civetUnplugin from "./unplugin.mjs";
|
|
5
|
-
var
|
|
5
|
+
var webpack_default = civetUnplugin.webpack;
|
|
6
6
|
export {
|
|
7
|
-
|
|
7
|
+
webpack_default as default
|
|
8
8
|
};
|
package/package.json
CHANGED
|
@@ -1,8 +1,32 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@danielx/civet",
|
|
3
3
|
"type": "commonjs",
|
|
4
|
-
"version": "0.11.
|
|
4
|
+
"version": "0.11.8",
|
|
5
5
|
"description": "CoffeeScript style syntax for TypeScript",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"build": "bash ./build/build.sh",
|
|
8
|
+
"build:self": "pnpm build && bash ./build/build-self.sh",
|
|
9
|
+
"clean:cache": "rm -rf .cache",
|
|
10
|
+
"docs:dev": "pnpm build && pnpm -C lsp/server build && pnpm -C lsp/monaco build && vitepress dev civet.dev",
|
|
11
|
+
"docs:build": "pnpm build && pnpm -C lsp/server build && pnpm -C lsp/monaco build && vitepress build civet.dev",
|
|
12
|
+
"docs:preview": "pnpm build && pnpm -C lsp/server build && pnpm -C lsp/monaco build && vitepress preview civet.dev",
|
|
13
|
+
"prepublishOnly": "pnpm build && pnpm test:coverage && pnpm changelog --verify",
|
|
14
|
+
"test": "bash ./build/test.sh",
|
|
15
|
+
"typecheck": "./dist/civet --typecheck --tsbuildinfo .cache/typecheck.tsbuildinfo",
|
|
16
|
+
"typecheck:diff": "civet scripts/typecheck-diff.civet",
|
|
17
|
+
"probe-shapes": "civet scripts/probe-shapes.civet",
|
|
18
|
+
"test:coverage": "cross-env CIVET_COVERAGE=1 bash ./build/test.sh",
|
|
19
|
+
"coverage": "pnpm coverage:run && pnpm coverage:merge",
|
|
20
|
+
"coverage:run": "civet scripts/coverage-run.civet",
|
|
21
|
+
"coverage:merge": "civet scripts/coverage-merge.civet",
|
|
22
|
+
"coverage:check": "civet scripts/coverage-check.civet",
|
|
23
|
+
"coverage:show": "civet scripts/show-uncovered.civet",
|
|
24
|
+
"show-uncovered": "civet scripts/show-uncovered.civet",
|
|
25
|
+
"test:self": "cross-env CIVET_SOURCE=./dist/main.js pnpm test",
|
|
26
|
+
"test:brk": "cross-env CIVET_THREADS=0 pnpm test --inspect-brk",
|
|
27
|
+
"changelog": "civet build/changelog.civet",
|
|
28
|
+
"release": "pnpm changelog --release"
|
|
29
|
+
},
|
|
6
30
|
"main": "dist/main.js",
|
|
7
31
|
"module": "dist/main.mjs",
|
|
8
32
|
"repository": {
|
|
@@ -19,9 +43,10 @@
|
|
|
19
43
|
"require": "./dist/babel-plugin.js",
|
|
20
44
|
"import": "./dist/babel-plugin.mjs"
|
|
21
45
|
},
|
|
46
|
+
"./browser": "./dist/browser.js",
|
|
47
|
+
"./browser.min": "./dist/browser.min.js",
|
|
22
48
|
"./bun-civet": "./dist/bun-civet.mjs",
|
|
23
49
|
"./esm": "./dist/esm.mjs",
|
|
24
|
-
"./esbuild-plugin": "./dist/esbuild-plugin.js",
|
|
25
50
|
"./register": "./register.js",
|
|
26
51
|
"./register-noconfig": "./register-noconfig.js",
|
|
27
52
|
"./config": {
|
|
@@ -78,6 +103,10 @@
|
|
|
78
103
|
"require": "./dist/ts-diagnostic.js",
|
|
79
104
|
"import": "./dist/ts-diagnostic.mjs"
|
|
80
105
|
},
|
|
106
|
+
"./ts-service": {
|
|
107
|
+
"require": "./dist/ts-service/index.js",
|
|
108
|
+
"import": "./dist/ts-service/index.mjs"
|
|
109
|
+
},
|
|
81
110
|
"./*": "./*",
|
|
82
111
|
"./dist/*": "./dist/*"
|
|
83
112
|
},
|
|
@@ -93,20 +122,6 @@
|
|
|
93
122
|
"engines": {
|
|
94
123
|
"node": ">=19 || ^18.6.0 || ^16.17.0"
|
|
95
124
|
},
|
|
96
|
-
"scripts": {
|
|
97
|
-
"build": "bash ./build/build.sh",
|
|
98
|
-
"build:self": "pnpm build && bash ./build/build-self.sh",
|
|
99
|
-
"clean:cache": "rm -rf .cache",
|
|
100
|
-
"docs:dev": "pnpm build && vitepress dev civet.dev",
|
|
101
|
-
"docs:build": "pnpm build && vitepress build civet.dev",
|
|
102
|
-
"docs:preview": "pnpm build && vitepress preview civet.dev",
|
|
103
|
-
"prepublishOnly": "pnpm build && pnpm test:coverage && pnpm changelog --verify",
|
|
104
|
-
"test": "bash ./build/test.sh",
|
|
105
|
-
"test:coverage": "cross-env CIVET_COVERAGE=1 bash ./build/test.sh",
|
|
106
|
-
"test:self": "cross-env CIVET_SOURCE=./dist/main.js pnpm test",
|
|
107
|
-
"changelog": "civet build/changelog.civet",
|
|
108
|
-
"release": "pnpm changelog --release"
|
|
109
|
-
},
|
|
110
125
|
"author": "Daniel X. Moore",
|
|
111
126
|
"license": "MIT",
|
|
112
127
|
"dependencies": {
|
|
@@ -116,34 +131,41 @@
|
|
|
116
131
|
"devDependencies": {
|
|
117
132
|
"@babel/core": "^7.29.0",
|
|
118
133
|
"@babel/parser": "^7.29.2",
|
|
119
|
-
"@danielx/civet": "0.
|
|
120
|
-
"@danielx/hera": "0.
|
|
134
|
+
"@danielx/civet": "0.11.6",
|
|
135
|
+
"@danielx/hera": "0.9.2",
|
|
121
136
|
"@prettier/sync": "^0.5.2",
|
|
137
|
+
"@shikijs/monaco": "3.23.0",
|
|
122
138
|
"@types/assert": "^1.5.6",
|
|
139
|
+
"@types/babel__core": "7.20.5",
|
|
123
140
|
"@types/mocha": "^10.0.8",
|
|
124
141
|
"@types/node": "^22.10.2",
|
|
125
142
|
"@typescript/vfs": "^1.6.4",
|
|
126
|
-
"c8": "^
|
|
143
|
+
"c8": "^11.0.0",
|
|
127
144
|
"cross-env": "7.0.3",
|
|
128
145
|
"esbuild": "0.27.5",
|
|
129
146
|
"marked": "^4.2.4",
|
|
130
147
|
"mocha": "^10.7.3",
|
|
148
|
+
"monaco-editor": "^0.55.1",
|
|
131
149
|
"prettier": "^3.2.5",
|
|
132
150
|
"shiki": "^3.0.0",
|
|
133
151
|
"terser": "^5.16.1",
|
|
134
152
|
"tslib": "^2.4.0",
|
|
135
|
-
"typescript": "^
|
|
136
|
-
"vite": "^8.0.
|
|
153
|
+
"typescript": "^6.0.2",
|
|
154
|
+
"vite": "^8.0.8",
|
|
137
155
|
"vitepress": "^1.0.0-alpha.35",
|
|
138
156
|
"vscode-languageserver": "^8.1.0",
|
|
139
157
|
"vscode-languageserver-textdocument": "^1.0.8",
|
|
140
158
|
"vue": "^3.2.45"
|
|
141
159
|
},
|
|
142
160
|
"peerDependencies": {
|
|
161
|
+
"@danielx/hera": "^0.9.2",
|
|
143
162
|
"typescript": ">=4.5",
|
|
144
163
|
"yaml": "^2.4.5"
|
|
145
164
|
},
|
|
146
165
|
"peerDependenciesMeta": {
|
|
166
|
+
"@danielx/hera": {
|
|
167
|
+
"optional": true
|
|
168
|
+
},
|
|
147
169
|
"typescript": {
|
|
148
170
|
"optional": true
|
|
149
171
|
},
|
|
@@ -155,6 +177,7 @@
|
|
|
155
177
|
"all": true,
|
|
156
178
|
"reporter": [
|
|
157
179
|
"lcov",
|
|
180
|
+
"json",
|
|
158
181
|
"text"
|
|
159
182
|
],
|
|
160
183
|
"extension": [
|
|
@@ -171,7 +194,8 @@
|
|
|
171
194
|
],
|
|
172
195
|
"exclude": [
|
|
173
196
|
"source/parser/types.civet",
|
|
174
|
-
"source/bun-civet.civet"
|
|
197
|
+
"source/bun-civet.civet",
|
|
198
|
+
"source/node-worker.civet"
|
|
175
199
|
]
|
|
176
200
|
},
|
|
177
201
|
"packageManager": "pnpm@10.33.0",
|
|
@@ -180,7 +204,7 @@
|
|
|
180
204
|
"serialize-javascript": "^7.0.3",
|
|
181
205
|
"tmp": "^0.2.5",
|
|
182
206
|
"lodash": "^4.18.0",
|
|
183
|
-
"esbuild": "
|
|
207
|
+
"esbuild": "0.27.5",
|
|
184
208
|
"diff": "^8.0.3"
|
|
185
209
|
}
|
|
186
210
|
}
|
package/dist/esbuild-plugin.js
DELETED
|
@@ -1,131 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __copyProps = (to, from, except, desc) => {
|
|
13
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(from))
|
|
15
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
-
mod
|
|
27
|
-
));
|
|
28
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
|
|
30
|
-
// source/esbuild-plugin.civet
|
|
31
|
-
var esbuild_plugin_exports = {};
|
|
32
|
-
__export(esbuild_plugin_exports, {
|
|
33
|
-
default: () => esbuild_plugin_default
|
|
34
|
-
});
|
|
35
|
-
module.exports = __toCommonJS(esbuild_plugin_exports);
|
|
36
|
-
var import_promises = require("fs/promises");
|
|
37
|
-
var import_path = __toESM(require("path"));
|
|
38
|
-
var import_main = require("./main.js");
|
|
39
|
-
var civet = function(options = {}) {
|
|
40
|
-
const {
|
|
41
|
-
filter = /\.civet$/,
|
|
42
|
-
inlineMap = true,
|
|
43
|
-
js = true,
|
|
44
|
-
next
|
|
45
|
-
} = options;
|
|
46
|
-
let nextTransform;
|
|
47
|
-
let tmpPath;
|
|
48
|
-
if (next) {
|
|
49
|
-
next.setup({
|
|
50
|
-
onEnd() {
|
|
51
|
-
;
|
|
52
|
-
},
|
|
53
|
-
onStart() {
|
|
54
|
-
;
|
|
55
|
-
},
|
|
56
|
-
resolve() {
|
|
57
|
-
;
|
|
58
|
-
},
|
|
59
|
-
onResolve() {
|
|
60
|
-
;
|
|
61
|
-
},
|
|
62
|
-
initialOptions() {
|
|
63
|
-
;
|
|
64
|
-
},
|
|
65
|
-
esbuild() {
|
|
66
|
-
;
|
|
67
|
-
},
|
|
68
|
-
onLoad(_, handler) {
|
|
69
|
-
return nextTransform = handler;
|
|
70
|
-
}
|
|
71
|
-
});
|
|
72
|
-
}
|
|
73
|
-
return {
|
|
74
|
-
name: "civet",
|
|
75
|
-
setup(build) {
|
|
76
|
-
build.onStart(async function() {
|
|
77
|
-
if (next) {
|
|
78
|
-
const { tmpdir } = require("os");
|
|
79
|
-
tmpPath = await (0, import_promises.mkdtemp)(import_path.default.join(tmpdir(), "civet-"));
|
|
80
|
-
}
|
|
81
|
-
return;
|
|
82
|
-
});
|
|
83
|
-
build.onEnd(async function() {
|
|
84
|
-
if (tmpPath) {
|
|
85
|
-
await (0, import_promises.rmdir)(tmpPath, { recursive: true });
|
|
86
|
-
}
|
|
87
|
-
return;
|
|
88
|
-
});
|
|
89
|
-
return build.onLoad({ filter }, async function(args) {
|
|
90
|
-
try {
|
|
91
|
-
const source = await (0, import_promises.readFile)(args.path);
|
|
92
|
-
const filename = import_path.default.relative(process.cwd(), args.path);
|
|
93
|
-
const compiled = await (0, import_main.compile)(source, {
|
|
94
|
-
filename,
|
|
95
|
-
inlineMap,
|
|
96
|
-
js
|
|
97
|
-
});
|
|
98
|
-
if (next && tmpPath) {
|
|
99
|
-
const outputFileName = filename + js ? ".jsx" : ".tsx";
|
|
100
|
-
const outputFilePath = import_path.default.join(tmpPath, outputFileName);
|
|
101
|
-
await (0, import_promises.writeFile)(outputFilePath, compiled);
|
|
102
|
-
return await nextTransform({
|
|
103
|
-
...args,
|
|
104
|
-
path: outputFilePath
|
|
105
|
-
});
|
|
106
|
-
}
|
|
107
|
-
return {
|
|
108
|
-
contents: compiled
|
|
109
|
-
};
|
|
110
|
-
} catch (e) {
|
|
111
|
-
return {
|
|
112
|
-
errors: [{
|
|
113
|
-
text: e.message,
|
|
114
|
-
location: {
|
|
115
|
-
file: args.path,
|
|
116
|
-
namespace: args.namespace,
|
|
117
|
-
line: e.line,
|
|
118
|
-
column: e.column
|
|
119
|
-
},
|
|
120
|
-
detail: e
|
|
121
|
-
}]
|
|
122
|
-
};
|
|
123
|
-
}
|
|
124
|
-
});
|
|
125
|
-
}
|
|
126
|
-
};
|
|
127
|
-
};
|
|
128
|
-
var defaultPlugin = civet();
|
|
129
|
-
civet.setup = defaultPlugin.setup;
|
|
130
|
-
var esbuild_plugin_default = civet;
|
|
131
|
-
module.exports = module.exports.default;
|