Skip to content

Commit

Permalink
refactor: modify the usage of mana-common in mana-observable code
Browse files Browse the repository at this point in the history
  • Loading branch information
sunshinesmilelk authored and xudafeng committed Feb 7, 2025
1 parent 71f562a commit 4554d90
Show file tree
Hide file tree
Showing 12 changed files with 16 additions and 16 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import assert from 'assert';

import { noop } from '@difizen/mana-common';
import { noop } from '../mana-common/index.js';

import { AsyncEmitter, AsyncCallbackList } from './async-event';

Expand Down
6 changes: 3 additions & 3 deletions packages/libro-common/src/mana-observable/async-event.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { Disposable, Event } from '@difizen/mana-common';
import { Emitter, noop } from '@difizen/mana-common';
import { CallbackList } from '@difizen/mana-common';
import type { Disposable, Event } from '../mana-common/index.js';
import { Emitter, noop } from '../mana-common/index.js';
import { CallbackList } from '../mana-common/index.js';

type Callback = (...args: any[]) => any;

Expand Down
2 changes: 1 addition & 1 deletion packages/libro-common/src/mana-observable/core.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Abstract, Newable } from '@difizen/mana-common';
import type { Abstract, Newable } from '../mana-common/index.js';

/* eslint-disable @typescript-eslint/no-explicit-any */
export namespace ObservableSymbol {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
import assert from 'assert';

import { isPlainObject } from '@difizen/mana-common';
import { isPlainObject } from '../mana-common/index.js';

import { Notifiable, Notifier, Observability } from './index';

Expand Down
2 changes: 1 addition & 1 deletion packages/libro-common/src/mana-observable/notifiable.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
/* eslint-disable prefer-spread */
import { isPlainObject } from '@difizen/mana-common';
import { isPlainObject } from '../mana-common/index.js';

import { ObservableSymbol } from './core';
import { Notifier } from './notifier';
Expand Down
4 changes: 2 additions & 2 deletions packages/libro-common/src/mana-observable/notifier.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
import type { Disposable } from '@difizen/mana-common';
import { Event } from '@difizen/mana-common';
import type { Disposable } from '../mana-common/index.js';
import { Event } from '../mana-common/index.js';

import { AsyncEmitter } from './async-event';
import { ObservableConfig } from './config';
Expand Down
2 changes: 1 addition & 1 deletion packages/libro-common/src/mana-observable/tracker.spec.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
import assert from 'assert';

import { noop } from '@difizen/mana-common';
import { noop } from '../mana-common/index.js';

import {
prop,
Expand Down
2 changes: 1 addition & 1 deletion packages/libro-common/src/mana-observable/tracker.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
import { getPropertyDescriptor, isPlainObject } from '@difizen/mana-common';
import { getPropertyDescriptor, isPlainObject } from '../mana-common/index.js';

import { ObservableSymbol } from './core';
import { Notifiable } from './notifiable';
Expand Down
2 changes: 1 addition & 1 deletion packages/libro-common/src/mana-observable/utils.spec.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import assert from 'assert';

import { Disposable } from '@difizen/mana-common';
import { Disposable } from '../mana-common/index.js';

import {
equals,
Expand Down
4 changes: 2 additions & 2 deletions packages/libro-common/src/mana-observable/utils.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import 'reflect-metadata';
import type { Disposable } from '@difizen/mana-common';
import { isPlainObject, getPropertyDescriptor } from '@difizen/mana-common';
import type { Disposable } from '../mana-common/index.js';
import { isPlainObject, getPropertyDescriptor } from '../mana-common/index.js';

import { ObservableConfig } from './config';
import type { Traceable } from './core';
Expand Down
2 changes: 1 addition & 1 deletion packages/libro-common/src/mana-observable/watch.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import assert from 'assert';

import { Disposable } from '@difizen/mana-common';
import { Disposable } from '../mana-common/index.js';

import { watch, prop } from './index';

Expand Down
2 changes: 1 addition & 1 deletion packages/libro-common/src/mana-observable/watch.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Disposable, Event } from '@difizen/mana-common';
import { Disposable, Event } from '../mana-common/index.js';

import type { Notify } from './core';
import { Notifier } from './notifier';
Expand Down

0 comments on commit 4554d90

Please sign in to comment.