Skip to content

Commit 40075cc

Browse files
authored
fix(reactively): circular dependency (#12)
1 parent 39ff2fd commit 40075cc

File tree

18 files changed

+39
-16
lines changed

18 files changed

+39
-16
lines changed

packages/core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
"license": "MIT",
3131
"devDependencies": {
3232
"@rollup/plugin-node-resolve": "^15.0.1",
33-
"csstype": "^3.1.1",
3433
"esbuild": "^0.16.9",
3534
"rollup": "^3.7.4",
3635
"rollup-plugin-esbuild": "^5.0.0",
@@ -39,6 +38,7 @@
3938
"dependencies": {
4039
"@jwcjs/reactively": "workspace:^1.0.0",
4140
"@jwcjs/runtime": "workspace:^1.0.0",
41+
"shared": "workspace:^1.0.0",
4242
"reflect-metadata": "^0.1.13",
4343
"rollup-plugin-ts": "^3.0.2"
4444
}

packages/core/src/decorators/component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { CustomElementProps } from "../types";
1+
import { CustomElementProps } from "shared";
22

33
export function Component(options: CustomElementProps) {
44
return function (_class: any) {

packages/core/src/decorators/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { defineWatcher } from "packages/reactively";
2-
import { WatcherOptions } from "../types";
2+
import { WatcherOptions } from "shared";
33

44
export * from "./props";
55
export * from "./event";

packages/core/src/decorators/props.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { defineProps } from "packages/reactively";
2-
import { PropOptions } from "../types";
2+
import { PropOptions } from "shared";
33

44
export function Prop(options: PropOptions): PropertyDecorator {
55
return (target, key) => {

packages/core/src/index.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import "reflect-metadata";
22

33
export * from "./wc-class";
4-
export * from "./types";
4+
export * from "shared";
55
export * from "./decorators";
6-
export * from "./constants";

packages/core/src/wc-class.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { createCSSElement, defineProxy } from "packages/reactively";
22
import { createElement, diff, removeAttrs } from "packages/runtime";
3-
import { COMPONENT_PROP_METADATA_KEY } from "./constants/metas.constant";
4-
import { JwcElement, PropOptions } from "./types/jwc-element.interface";
5-
import { WatcherOptions } from "./types/watcher.interface";
3+
import { COMPONENT_PROP_METADATA_KEY } from "../../shared/src/constants/metas.constant";
4+
import { JwcElement, PropOptions } from "shared";
5+
import { WatcherOptions } from "../../shared/src/types/watcher.interface";
66

77
/**
88
* The map of adoptedStyleSheets.

packages/reactively/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@
99
"author": "",
1010
"license": "ISC",
1111
"dependencies": {
12-
"jwcjs": "workspace:*"
12+
"shared": "workspace:*"
1313
}
1414
}

packages/reactively/src/define-reactive.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import {
33
WatcherOptions,
44
COMPONENT_EVENT_METADATA_KEY,
55
COMPONENT_PROP_METADATA_KEY,
6-
} from "jwcjs";
6+
} from "shared";
77
import { ReactiveEvent } from "./call-reactive";
88

99
/**

packages/shared/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from "./src";

packages/shared/package.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"name": "shared",
3+
"version": "1.0.0",
4+
"description": "",
5+
"main": "index.js",
6+
"scripts": {
7+
"test": "echo \"Error: no test specified\" && exit 1"
8+
},
9+
"keywords": [],
10+
"author": "",
11+
"license": "ISC",
12+
"dependencies": {
13+
"csstype": "^3.1.1"
14+
}
15+
}

0 commit comments

Comments
 (0)