harmonyc 0.4.0 → 0.4.2

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/Router.js CHANGED
@@ -1,4 +1,4 @@
1
- import { xmur3 } from './util/xmur3';
1
+ import { xmur3 } from './util/xmur3.js';
2
2
  export class Router {
3
3
  constructor(outs, seed = 'TODO') {
4
4
  this.outs = outs;
package/cli.js CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
- import { compileFiles } from './compiler';
2
+ import { compileFiles } from './compiler.js';
3
3
  import { parseArgs } from 'node:util';
4
- import { watchFiles } from './watch';
4
+ import { watchFiles } from './watch.js';
5
5
  const args = parseArgs({
6
6
  options: {
7
7
  help: { type: 'boolean' },
@@ -13,6 +13,9 @@ if (args.positionals.length === 0 || args.values.help) {
13
13
  console.error('Usage: harmonyc <input files glob pattern>');
14
14
  process.exit(1);
15
15
  }
16
- if (args.values.watch)
17
- watchFiles(args.positionals);
18
- void compileFiles(args.positionals);
16
+ if (args.values.watch) {
17
+ void watchFiles(args.positionals);
18
+ }
19
+ else {
20
+ void compileFiles(args.positionals);
21
+ }
package/compile.js CHANGED
@@ -1,6 +1,6 @@
1
- import { NodeTest } from './languages/JavaScript';
2
- import { OutFile } from './outFile';
3
- import { parse } from './syntax';
1
+ import { NodeTest } from './languages/JavaScript.js';
2
+ import { OutFile } from './outFile.js';
3
+ import { parse } from './syntax.js';
4
4
  export function compileFeature(fileName, src) {
5
5
  const feature = parse({ fileName, src });
6
6
  const of = new OutFile();
package/compiler.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import glob from 'fast-glob';
2
2
  import { readFileSync, writeFileSync } from 'fs';
3
3
  import { basename } from 'path';
4
- import { compileFeature } from './compile';
4
+ import { compileFeature } from './compile.js';
5
5
  export async function compileFiles(pattern) {
6
6
  const fns = await glob(pattern);
7
7
  if (!fns.length)
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "harmonyc",
3
3
  "description": "Harmony Code - model-driven BDD for Vitest",
4
- "version": "0.4.0",
4
+ "version": "0.4.2",
5
5
  "author": "Bernát Kalló",
6
6
  "type": "module",
7
7
  "bin": {
@@ -16,8 +16,9 @@
16
16
  "url": "https://github.com/harmony-ac/code/issues"
17
17
  },
18
18
  "dependencies": {
19
+ "@cucumber/cucumber-expressions": "^17.1.0",
19
20
  "fast-glob": "^3.3.2",
20
- "typescript-parsec": "0.3.4"
21
+ "source-map-js": "^1.2.0"
21
22
  },
22
23
  "license": "MIT",
23
24
  "keywords": [
package/syntax.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import remarkParse from 'remark-parse';
2
2
  import { unified } from 'unified';
3
- import { Feature, Section, Step } from './model';
4
- import { definitions } from './definitions';
3
+ import { Feature, Section, Step } from './model.js';
4
+ import { definitions } from './definitions.js';
5
5
  export function parse({ fileName, src, }) {
6
6
  const tree = unified().use(remarkParse).parse(src);
7
7
  const rootNodes = tree.children;
package/watch.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { watch } from 'node:fs';
2
- import { compileFile, compileFiles } from './compiler';
2
+ import { compileFile, compileFiles } from './compiler.js';
3
3
  export async function watchFiles(patterns) {
4
4
  const fns = await compileFiles(patterns);
5
5
  for (const file of fns) {