@tixyel/cli 2.6.4 → 2.6.5

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/widget.js CHANGED
@@ -379,7 +379,7 @@ export async function processBuild(widget, workspaceConfig, verbose = false) {
379
379
  const transpiled = transformSync(content, {
380
380
  loader: 'ts',
381
381
  target: 'es2021',
382
- format: 'iife',
382
+ format: 'cjs',
383
383
  });
384
384
  mergedTS += transpiled.code + '\n';
385
385
  }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,14 @@
1
+ import { describe, expect, it } from 'bun:test';
2
+ import { transformSync } from 'esbuild';
3
+ describe('Should parse typescript into javascript', () => {
4
+ const tsContent = `function wait(ms: number) { return new Promise((resolve) => setTimeout(resolve, ms));}`;
5
+ const transpiled = transformSync(tsContent, {
6
+ loader: 'ts',
7
+ target: 'es2021',
8
+ format: 'cjs',
9
+ });
10
+ it('should transpile TypeScript to JavaScript', () => {
11
+ expect(transpiled.code).toContain('function wait(ms) {');
12
+ expect(transpiled.code).toContain('return new Promise((resolve) => setTimeout(resolve, ms));');
13
+ });
14
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tixyel/cli",
3
- "version": "2.6.4",
3
+ "version": "2.6.5",
4
4
  "description": "CLI tool for streamelements widgets",
5
5
  "keywords": [
6
6
  "cli",
@@ -50,7 +50,8 @@
50
50
  "scripts": {
51
51
  "build": "cross-env TIXYEL_VERSION=$npm_package_version tsc",
52
52
  "dev": "cross-env TIXYEL_VERSION=$npm_package_version tsc --watch",
53
- "check-types": "tsc --noEmit"
53
+ "check-types": "tsc --noEmit",
54
+ "test": "bun test"
54
55
  },
55
56
  "dependencies": {
56
57
  "autoprefixer": "^10.4.22",
@@ -72,6 +73,7 @@
72
73
  "ws": "^8.18.0"
73
74
  },
74
75
  "devDependencies": {
76
+ "@types/bun": "^1.3.5",
75
77
  "@types/html-minifier": "^4.0.6",
76
78
  "@types/html-minifier-terser": "^7.0.2",
77
79
  "@types/inquirer": "^9.0.9",