@esportsplus/reactivity 0.25.14 → 0.26.1

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.
@@ -1,4 +1,4 @@
1
1
  import { ts } from '@esportsplus/typescript';
2
- import type { Bindings } from '../../types.js';
2
+ import type { Bindings } from '../types.js';
3
3
  declare const _default: (sourceFile: ts.SourceFile, bindings: Bindings, _ns: string) => string;
4
4
  export default _default;
@@ -1,6 +1,6 @@
1
- import { ast, code as c } from '@esportsplus/typescript/transformer';
1
+ import { ast, code as c } from '@esportsplus/typescript/compiler';
2
2
  import { ts } from '@esportsplus/typescript';
3
- import { COMPILER_TYPES } from '../../constants.js';
3
+ import { COMPILER_TYPES } from '../constants.js';
4
4
  function visit(ctx, node) {
5
5
  if (ts.isVariableDeclaration(node) && ts.isIdentifier(node.name) && node.initializer) {
6
6
  if (ts.isIdentifier(node.initializer) && ctx.bindings.get(node.initializer.text) === COMPILER_TYPES.Array) {
@@ -1,9 +1,9 @@
1
1
  import { ts } from '@esportsplus/typescript';
2
- import { code as c } from '@esportsplus/typescript/transformer';
2
+ import { code as c } from '@esportsplus/typescript/compiler';
3
3
  import { COMPILER_ENTRYPOINT, COMPILER_ENTRYPOINT_REGEX, COMPILER_NAMESPACE } from '../constants.js';
4
- import array from './transforms/array.js';
5
- import object from './transforms/object.js';
6
- import primitives from './transforms/primitives.js';
4
+ import array from './array.js';
5
+ import object from './object.js';
6
+ import primitives from './primitives.js';
7
7
  let transforms = [object, array, primitives];
8
8
  function contains(code) {
9
9
  if (!c.contains(code, { regex: COMPILER_ENTRYPOINT_REGEX })) {
@@ -1,4 +1,4 @@
1
1
  import { ts } from '@esportsplus/typescript';
2
- import type { Bindings } from '../../types.js';
2
+ import type { Bindings } from '../types.js';
3
3
  declare const _default: (sourceFile: ts.SourceFile, bindings: Bindings, ns: string) => string;
4
4
  export default _default;
@@ -1,6 +1,6 @@
1
1
  import { ts } from '@esportsplus/typescript';
2
- import { code as c } from '@esportsplus/typescript/transformer';
3
- import { COMPILER_TYPES, PACKAGE } from '../../constants.js';
2
+ import { code as c } from '@esportsplus/typescript/compiler';
3
+ import { COMPILER_TYPES, PACKAGE } from '../constants.js';
4
4
  function analyzeProperty(prop, sourceFile) {
5
5
  if (!ts.isPropertyAssignment(prop)) {
6
6
  return null;
@@ -1,3 +1,3 @@
1
- import { plugin } from '@esportsplus/typescript/transformer';
1
+ import { plugin } from '@esportsplus/typescript/compiler';
2
2
  declare const _default: ReturnType<typeof plugin.tsc>;
3
3
  export default _default;
@@ -1,3 +1,3 @@
1
- import { plugin } from '@esportsplus/typescript/transformer';
1
+ import { plugin } from '@esportsplus/typescript/compiler';
2
2
  import { transform } from '../index.js';
3
3
  export default plugin.tsc(transform);
@@ -1,5 +1,5 @@
1
1
  import { PACKAGE } from '../../constants.js';
2
- import { plugin } from '@esportsplus/typescript/transformer';
2
+ import { plugin } from '@esportsplus/typescript/compiler';
3
3
  import { transform } from '../index.js';
4
4
  export default plugin.vite({
5
5
  name: PACKAGE,
@@ -1,4 +1,4 @@
1
1
  import { ts } from '@esportsplus/typescript';
2
- import type { Bindings } from '../../types.js';
2
+ import type { Bindings } from '../types.js';
3
3
  declare const _default: (sourceFile: ts.SourceFile, bindings: Bindings, ns: string) => string;
4
4
  export default _default;
@@ -1,6 +1,6 @@
1
1
  import { ts } from '@esportsplus/typescript';
2
- import { ast, code as c } from '@esportsplus/typescript/transformer';
3
- import { COMPILER_ENTRYPOINT, COMPILER_TYPES, PACKAGE } from '../../constants.js';
2
+ import { ast, code as c } from '@esportsplus/typescript/compiler';
3
+ import { COMPILER_ENTRYPOINT, COMPILER_TYPES, PACKAGE } from '../constants.js';
4
4
  const COMPOUND_OPERATORS = new Map([
5
5
  [ts.SyntaxKind.AmpersandAmpersandEqualsToken, '&&'],
6
6
  [ts.SyntaxKind.AmpersandEqualsToken, '&'],
@@ -1,4 +1,4 @@
1
- import { uid } from '@esportsplus/typescript/transformer';
1
+ import { uid } from '@esportsplus/typescript/compiler';
2
2
  const COMPILER_ENTRYPOINT = 'reactive';
3
3
  const COMPILER_ENTRYPOINT_REGEX = /\breactive\b/;
4
4
  const COMPILER_NAMESPACE = uid(COMPILER_ENTRYPOINT);
package/package.json CHANGED
@@ -4,27 +4,22 @@
4
4
  "@esportsplus/utilities": "^0.27.2"
5
5
  },
6
6
  "devDependencies": {
7
- "@esportsplus/typescript": "^0.20.0",
7
+ "@esportsplus/typescript": "^0.21.0",
8
8
  "@types/node": "^25.0.3",
9
9
  "vite": "^7.3.0"
10
10
  },
11
11
  "exports": {
12
12
  ".": {
13
- "import": "./build/index.js",
14
- "types": "./build/index.d.ts"
13
+ "types": "./build/index.d.ts",
14
+ "default": "./build/index.js"
15
15
  },
16
- "./constants": {
17
- "import": "./build/constants.js",
18
- "types": "./build/constants.d.ts"
16
+ "./compiler/tsc": {
17
+ "types": "./build/compiler/plugins/tsc.d.ts",
18
+ "default": "./build/compiler/plugins/tsc.js"
19
19
  },
20
- "./plugins/tsc": {
21
- "types": "./build/transformer/plugins/tsc.d.ts",
22
- "import": "./build/transformer/plugins/tsc.js",
23
- "require": "./build/transformer/plugins/tsc.js"
24
- },
25
- "./plugins/vite": {
26
- "types": "./build/transformer/plugins/vite.d.ts",
27
- "import": "./build/transformer/plugins/vite.js"
20
+ "./compiler/vite": {
21
+ "types": "./build/compiler/plugins/vite.d.ts",
22
+ "default": "./build/compiler/plugins/vite.js"
28
23
  }
29
24
  },
30
25
  "main": "build/index.js",
@@ -36,7 +31,7 @@
36
31
  },
37
32
  "type": "module",
38
33
  "types": "build/index.d.ts",
39
- "version": "0.25.14",
34
+ "version": "0.26.1",
40
35
  "scripts": {
41
36
  "build": "tsc",
42
37
  "build:test": "pnpm build && vite build --config test/vite.config.ts",
@@ -1,4 +1,4 @@
1
- import { ast, code as c, type Replacement } from '@esportsplus/typescript/transformer';
1
+ import { ast, code as c, type Replacement } from '@esportsplus/typescript/compiler';
2
2
  import { ts } from '@esportsplus/typescript';
3
3
  import { COMPILER_TYPES } from '~/constants';
4
4
  import type { Bindings } from '~/types';
@@ -1,10 +1,10 @@
1
1
  import { ts } from '@esportsplus/typescript';
2
- import { code as c } from '@esportsplus/typescript/transformer';
2
+ import { code as c } from '@esportsplus/typescript/compiler';
3
3
  import { COMPILER_ENTRYPOINT, COMPILER_ENTRYPOINT_REGEX, COMPILER_NAMESPACE } from '~/constants';
4
4
  import type { Bindings, TransformResult } from '~/types';
5
- import array from './transforms/array';
6
- import object from './transforms/object';
7
- import primitives from './transforms/primitives';
5
+ import array from './array';
6
+ import object from './object';
7
+ import primitives from './primitives';
8
8
 
9
9
 
10
10
  let transforms = [object, array, primitives];
@@ -1,5 +1,5 @@
1
1
  import { ts } from '@esportsplus/typescript';
2
- import { code as c, type Replacement } from '@esportsplus/typescript/transformer';
2
+ import { code as c, type Replacement } from '@esportsplus/typescript/compiler';
3
3
  import { COMPILER_TYPES, PACKAGE } from '~/constants';
4
4
  import type { Bindings } from '~/types';
5
5
 
@@ -1,4 +1,4 @@
1
- import { plugin } from '@esportsplus/typescript/transformer';
1
+ import { plugin } from '@esportsplus/typescript/compiler';
2
2
  import { transform } from '..';
3
3
 
4
4
 
@@ -1,5 +1,5 @@
1
1
  import { PACKAGE } from '../../constants';
2
- import { plugin } from '@esportsplus/typescript/transformer';
2
+ import { plugin } from '@esportsplus/typescript/compiler';
3
3
  import { transform } from '..';
4
4
 
5
5
 
@@ -1,5 +1,5 @@
1
1
  import { ts } from '@esportsplus/typescript';
2
- import { ast, code as c, type Range, type Replacement } from '@esportsplus/typescript/transformer';
2
+ import { ast, code as c, type Range, type Replacement } from '@esportsplus/typescript/compiler';
3
3
  import type { Bindings } from '~/types';
4
4
  import { COMPILER_ENTRYPOINT, COMPILER_TYPES, PACKAGE } from '~/constants';
5
5
 
package/src/constants.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { uid } from '@esportsplus/typescript/transformer';
1
+ import { uid } from '@esportsplus/typescript/compiler';
2
2
 
3
3
 
4
4
  const COMPILER_ENTRYPOINT = 'reactive';
File without changes