@danielx/civet 0.7.9 → 0.7.10

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/dist/types.d.ts CHANGED
@@ -57,14 +57,21 @@ declare module "@danielx/civet" {
57
57
 
58
58
  // TODO: Import ParseError class from Hera
59
59
  export type ParseError = {
60
- message: string
61
- name: string
60
+ name: "ParseError"
61
+ message: string // filename:line:column header\nbody
62
+ header: string
63
+ body: string
62
64
  filename: string
63
65
  line: number
64
66
  column: number
65
67
  offset: number
66
68
  }
67
- export function isCompileError(err: any): err is ParseError
69
+ export type ParseErrors = {
70
+ name: "ParseErrors"
71
+ message: string
72
+ errors: ParseError[]
73
+ }
74
+ export function isCompileError(err: any): err is ParseError | ParseErrors
68
75
 
69
76
  type CompileOutput<T extends CompileOptions> =
70
77
  T extends { ast: true } ? CivetAST :
@@ -87,7 +94,7 @@ declare module "@danielx/civet" {
87
94
  isCompileError: typeof isCompileError
88
95
  parse: typeof parse
89
96
  generate: typeof generate
90
- util: {
97
+ sourcemap: {
91
98
  locationTable(input: string): number[]
92
99
  lookupLineColumn(table: number[], pos: number): [number, number]
93
100
  SourceMap(input: string): SourceMap
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@danielx/civet",
3
3
  "type": "commonjs",
4
- "version": "0.7.9",
4
+ "version": "0.7.10",
5
5
  "description": "CoffeeScript style syntax for TypeScript",
6
6
  "main": "dist/main.js",
7
7
  "module": "dist/main.mjs",
@@ -75,8 +75,8 @@
75
75
  },
76
76
  "devDependencies": {
77
77
  "@danielx/civet": "0.7.4",
78
- "@danielx/hera": "^0.8.13",
79
- "@prettier/sync": "^0.3.0",
78
+ "@danielx/hera": "^0.8.14",
79
+ "@prettier/sync": "^0.5.2",
80
80
  "@types/assert": "^1.5.6",
81
81
  "@types/mocha": "^9.1.1",
82
82
  "@types/node": "^20.12.2",
@@ -84,7 +84,7 @@
84
84
  "esbuild": "0.20.0",
85
85
  "marked": "^4.2.4",
86
86
  "mocha": "^10.0.0",
87
- "prettier": "^3.1.1",
87
+ "prettier": "^3.2.5",
88
88
  "terser": "^5.16.1",
89
89
  "ts-node": "^10.9.1",
90
90
  "tslib": "^2.4.0",