Skip to content

Commit

Permalink
feat: update imports & packages based on the latest changes of `nan…
Browse files Browse the repository at this point in the history
…olib` & prevent side-effects
  • Loading branch information
mohammadhonarvar committed Oct 11, 2024
1 parent 051a098 commit 0d66f89
Show file tree
Hide file tree
Showing 18 changed files with 243 additions and 214 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@
"publish": "lerna publish from-package"
},
"devDependencies": {
"@alwatr/eslint-config": "^1.2.9",
"@alwatr/prettier-config": "^1.0.5",
"@alwatr/eslint-config": "^1.2.11",
"@alwatr/prettier-config": "^1.0.6",
"@lerna-lite/changed": "^3.9.3",
"@lerna-lite/cli": "^3.9.3",
"@lerna-lite/diff": "^3.9.3",
Expand Down
14 changes: 6 additions & 8 deletions packages/engine/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,18 +60,16 @@
"clean": "rm -rfv dist *.tsbuildinfo"
},
"dependencies": {
"@alwatr/exit-hook": "^1.1.2",
"@alwatr/nanolib": "^1.0.2",
"@alwatr/nanolib": "^1.2.0",
"@alwatr/nitrobase-helper": "workspace:^",
"@alwatr/nitrobase-reference": "workspace:^",
"@alwatr/nitrobase-types": "workspace:^",
"@alwatr/node-fs": "^1.1.2"
"@alwatr/nitrobase-types": "workspace:^"
},
"devDependencies": {
"@alwatr/nano-build": "^1.6.0",
"@alwatr/prettier-config": "^1.0.5",
"@alwatr/tsconfig-base": "^1.3.1",
"@alwatr/type-helper": "^2.0.1",
"@alwatr/nano-build": "^2.0.1",
"@alwatr/prettier-config": "^1.0.6",
"@alwatr/tsconfig-base": "^1.3.2",
"@alwatr/type-helper": "^2.0.2",
"@types/node": "^22.7.5",
"typescript": "^5.6.3"
}
Expand Down
6 changes: 3 additions & 3 deletions packages/engine/src/alwatr-nitrobase.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import {exitHook} from '@alwatr/exit-hook';
import {delay} from '@alwatr/nanolib';
import {exitHook} from '@alwatr/nanolib/exit-hook';
import {existsSync, readJson, resolve, unlink, writeJson} from '@alwatr/nanolib/node-fs';
import {getStoreId, getStorePath} from '@alwatr/nitrobase-helper';
import {CollectionReference, DocumentReference} from '@alwatr/nitrobase-reference';
import {
Expand All @@ -13,11 +14,10 @@ import {
type StoreFileId,
type CollectionItem,
} from '@alwatr/nitrobase-types';
import {existsSync, readJson, resolve, unlink, writeJson} from '@alwatr/node-fs';

import {logger} from './logger.js';

logger.logFileModule?.('alwatr-nitrobase');
__dev_mode__: logger.logFileModule?.('alwatr-nitrobase');

/**
* AlwatrNitrobase configuration.
Expand Down
6 changes: 4 additions & 2 deletions packages/engine/src/logger.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import {createLogger} from '@alwatr/nanolib';
import {createLogger, packageTracer} from '@alwatr/nanolib';

export const logger = createLogger(__package_name__);
__dev_mode__: packageTracer.add(__package_name__, __package_version__);

export const logger = /* #__PURE__ */ createLogger(__package_name__);
2 changes: 1 addition & 1 deletion packages/engine/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"outDir": "dist",
"emitDeclarationOnly": true,
"composite": true,
"types": ["@alwatr/nano-build", "@alwatr/type-helper"]
"types": ["node", "@alwatr/nano-build", "@alwatr/type-helper"]
},
"include": ["src/**/*.ts"],
"references": [{"path": "../types"}, {"path": "../reference"}, {"path": "../helper"}]
Expand Down
10 changes: 5 additions & 5 deletions packages/helper/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,14 @@
"clean": "rm -rfv dist *.tsbuildinfo"
},
"dependencies": {
"@alwatr/flat-string": "^1.1.2",
"@alwatr/nanolib": "^1.2.0",
"@alwatr/nitrobase-types": "workspace:^"
},
"devDependencies": {
"@alwatr/logger": "^4.0.2",
"@alwatr/nano-build": "^1.6.0",
"@alwatr/prettier-config": "^1.0.5",
"@alwatr/tsconfig-base": "^1.3.1",
"@alwatr/logger": "^4.0.5",
"@alwatr/nano-build": "^2.0.1",
"@alwatr/prettier-config": "^1.0.6",
"@alwatr/tsconfig-base": "^1.3.2",
"@alwatr/wait": "^1.1.16",
"@types/node": "^22.7.5",
"typescript": "^5.6.3"
Expand Down
4 changes: 3 additions & 1 deletion packages/helper/src/main.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import {flatString} from '@alwatr/flat-string';
import {flatString, packageTracer} from '@alwatr/nanolib';
import {StoreFileExtension, type StoreFileId, type StoreFileStat} from '@alwatr/nitrobase-types';

__dev_mode__: packageTracer.add(__package_name__, __package_version__);

/**
* Convert StoreFileId to a string ID.
*
Expand Down
9 changes: 5 additions & 4 deletions packages/nitrobase/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,16 +60,17 @@
"clean": "rm -rfv dist *.tsbuildinfo"
},
"dependencies": {
"@alwatr/nanolib": "^1.2.0",
"@alwatr/nitrobase-engine": "workspace:^",
"@alwatr/nitrobase-helper": "workspace:^",
"@alwatr/nitrobase-reference": "workspace:^",
"@alwatr/nitrobase-types": "workspace:^"
},
"devDependencies": {
"@alwatr/logger": "^4.0.2",
"@alwatr/nano-build": "^1.6.0",
"@alwatr/prettier-config": "^1.0.5",
"@alwatr/tsconfig-base": "^1.3.1",
"@alwatr/logger": "^4.0.5",
"@alwatr/nano-build": "^2.0.1",
"@alwatr/prettier-config": "^1.0.6",
"@alwatr/tsconfig-base": "^1.3.2",
"@alwatr/wait": "^1.1.16",
"@types/node": "^22.7.5",
"typescript": "^5.6.3"
Expand Down
4 changes: 4 additions & 0 deletions packages/nitrobase/src/main.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
import {packageTracer} from '@alwatr/nanolib';

export * from '@alwatr/nitrobase-engine';
export * from '@alwatr/nitrobase-reference';
export * from '@alwatr/nitrobase-helper';
export * from '@alwatr/nitrobase-types';

__dev_mode__: packageTracer.add(__package_name__, __package_version__);
10 changes: 5 additions & 5 deletions packages/reference/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,15 +60,15 @@
"clean": "rm -rfv dist *.tsbuildinfo"
},
"dependencies": {
"@alwatr/nanolib": "^1.0.2",
"@alwatr/nanolib": "^1.2.0",
"@alwatr/nitrobase-helper": "workspace:^",
"@alwatr/nitrobase-types": "workspace:^"
},
"devDependencies": {
"@alwatr/nano-build": "^1.6.0",
"@alwatr/prettier-config": "^1.0.5",
"@alwatr/tsconfig-base": "^1.3.1",
"@alwatr/type-helper": "^2.0.1",
"@alwatr/nano-build": "^2.0.1",
"@alwatr/prettier-config": "^1.0.6",
"@alwatr/tsconfig-base": "^1.3.2",
"@alwatr/type-helper": "^2.0.2",
"@types/node": "^22.7.5",
"typescript": "^5.6.3"
}
Expand Down
2 changes: 1 addition & 1 deletion packages/reference/src/collection-reference.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {

import {logger} from './logger.js';

logger.logFileModule?.('collection-reference');
__dev_mode__: logger.logFileModule?.('collection-reference');

/**
* Represents a reference to a collection of the AlwatrNitrobase.
Expand Down
2 changes: 1 addition & 1 deletion packages/reference/src/document-reference.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {StoreFileType, StoreFileExtension, type StoreFileId, type DocumentContex

import {logger} from './logger.js';

logger.logFileModule?.('document-reference');
__dev_mode__: logger.logFileModule?.('document-reference');

/**
* Represents a reference to a document of the AlwatrNitrobase.
Expand Down
6 changes: 4 additions & 2 deletions packages/reference/src/logger.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import {createLogger} from '@alwatr/nanolib';
import {createLogger, packageTracer} from '@alwatr/nanolib';

export const logger = createLogger(__package_name__);
__dev_mode__: packageTracer.add(__package_name__, __package_version__);

export const logger = /* #__PURE__ */ createLogger(__package_name__);
2 changes: 1 addition & 1 deletion packages/reference/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"outDir": "dist",
"emitDeclarationOnly": true,
"composite": true,
"types": ["@alwatr/nano-build", "@alwatr/type-helper"]
"types": ["node", "@alwatr/nano-build", "@alwatr/type-helper"]
},
"include": ["src/**/*.ts", "src/util.ts"],
"references": [{"path": "../types"}, {"path": "../helper"}]
Expand Down
10 changes: 5 additions & 5 deletions packages/types/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,13 @@
"clean": "rm -rfv dist *.tsbuildinfo"
},
"dependencies": {
"@alwatr/nanolib": "^1.0.2"
"@alwatr/nanolib": "^1.2.0"
},
"devDependencies": {
"@alwatr/nano-build": "^1.6.0",
"@alwatr/prettier-config": "^1.0.5",
"@alwatr/tsconfig-base": "^1.3.1",
"@alwatr/type-helper": "^2.0.1",
"@alwatr/nano-build": "^2.0.1",
"@alwatr/prettier-config": "^1.0.6",
"@alwatr/tsconfig-base": "^1.3.2",
"@alwatr/type-helper": "^2.0.2",
"@types/node": "^22.7.5",
"typescript": "^5.6.3"
}
Expand Down
2 changes: 1 addition & 1 deletion packages/types/src/main.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {packageTracer} from '@alwatr/nanolib';

packageTracer.add(__package_name__, __package_version__);
__dev_mode__: packageTracer.add(__package_name__, __package_version__);

// *** Nitrobase File ***

Expand Down
2 changes: 1 addition & 1 deletion packages/types/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"outDir": "dist",
"emitDeclarationOnly": true,
"composite": true,
"types": ["@alwatr/nano-build", "@alwatr/type-helper"]
"types": ["node", "@alwatr/nano-build", "@alwatr/type-helper"]
},
"include": ["src/**/*.ts"]
}
Loading

0 comments on commit 0d66f89

Please sign in to comment.