ether-code 0.2.8 → 0.2.9

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/cli/compiler.js CHANGED
@@ -107,7 +107,7 @@ class EtherCompiler {
107
107
  return mappings[target] || target
108
108
  }
109
109
 
110
- async compileFile(filePath) {
110
+ compileFile(filePath) {
111
111
  const content = fs.readFileSync(filePath, 'utf-8')
112
112
  const fileName = path.basename(filePath, '.eth')
113
113
 
@@ -116,11 +116,11 @@ class EtherCompiler {
116
116
  const code = this.generate(ast, target)
117
117
 
118
118
  const extension = this.getExtension(target)
119
- const outputPath = `${fileName}${extension}`
119
+ const outputPath = fileName + extension
120
120
 
121
121
  return {
122
122
  source: filePath,
123
- target,
123
+ target: target,
124
124
  outputs: [{
125
125
  path: outputPath,
126
126
  content: code
@@ -227,17 +227,17 @@ class EtherCompiler {
227
227
  return TARGET_EXTENSIONS[target] || TARGET_EXTENSIONS[normalizedTarget] || '.js'
228
228
  }
229
229
 
230
- async check(filePath) {
230
+ check(filePath) {
231
231
  const content = fs.readFileSync(filePath, 'utf-8')
232
232
  const target = this.detectTarget(content, filePath)
233
233
 
234
234
  try {
235
235
  this.parse(content, target)
236
236
  } catch (err) {
237
- throw new Error(`Erreur de syntaxe: ${err.message}`)
237
+ throw new Error('Erreur de syntaxe: ' + err.message)
238
238
  }
239
239
 
240
- return { valid: true, target }
240
+ return { valid: true, target: target }
241
241
  }
242
242
 
243
243
  getTargets() {
package/cli/ether.js CHANGED
@@ -6,7 +6,7 @@ const http = require('http')
6
6
  const { EtherCompiler } = require('./compiler')
7
7
  const { Watcher } = require('./watcher')
8
8
 
9
- const VERSION = '0.2.8'
9
+ const VERSION = '0.2.9'
10
10
 
11
11
  const COLORS = {
12
12
  reset: '\x1b[0m',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ether-code",
3
- "version": "0.2.8",
3
+ "version": "0.2.9",
4
4
  "description": "Ether - Le langage intentionnel",
5
5
  "main": "cli/compiler.js",
6
6
  "bin": {