Skip to content

Commit

Permalink
chore: add explicit extension to all import
Browse files Browse the repository at this point in the history
  • Loading branch information
Romakita committed Jun 1, 2024
1 parent 5725eff commit 0f514f6
Show file tree
Hide file tree
Showing 1,577 changed files with 4,648 additions and 4,591 deletions.
2 changes: 1 addition & 1 deletion packages/core/src/decorators/configurable.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {Configurable, descriptorOf, NotConfigurable} from "../../src";
import {Configurable, descriptorOf, NotConfigurable} from "../../src/index.js";

class Test {
test: string;
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/decorators/configurable.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {descriptorOf} from "../utils/objects/descriptorOf";
import {descriptorOf} from "../utils/objects/descriptorOf.js";

export function Configurable(value: boolean = true): Function {
return (target: any, propertyKey: string) => {
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/decorators/deprecated.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {Deprecated} from "./deprecated";
import {Deprecated} from "./deprecated.js";

describe("Deprecated", () => {
beforeEach(() => {
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/decorators/deprecated.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {Type} from "../domain/Type";
import {Type} from "../domain/Type.js";

function deprecate(fn: any, msg: string) {
if (typeof process !== "undefined" && (process as any).noDeprecation === true) {
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/decorators/enumerable.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {Enumerable, getEnumerableKeys, NotEnumerable} from "../../src";
import {Enumerable, getEnumerableKeys, NotEnumerable} from "../../src/index.js";

class Test1 {
test: string = "test";
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/decorators/enumerable.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {descriptorOf} from "../utils/objects/descriptorOf";
import {descriptorOf} from "../utils/objects/descriptorOf.js";

export function Enumerable(value: boolean = true): Function {
return (target: any, propertyKey: string) => {
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/decorators/notConfigurable.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {Configurable} from "./configurable";
import {Configurable} from "./configurable.js";

export function NotConfigurable(): Function {
return Configurable(false);
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/decorators/notEnumerable.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {Enumerable} from "./enumerable";
import {Enumerable} from "./enumerable.js";

export function NotEnumerable(): Function {
return Enumerable(false);
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/decorators/readOnly.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {Writable} from "./writable";
import {Writable} from "./writable.js";

export function Readonly(): Function {
return Writable(false);
Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/decorators/storeFn.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {Store} from "../domain/Store";
import {DecoratorParameters} from "../interfaces/DecoratorParameters";
import {Store} from "../domain/Store.js";
import {DecoratorParameters} from "../interfaces/DecoratorParameters.js";

/**
* Create a store correctly configured from the parameters given by the decorator.
Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/decorators/storeMerge.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {Store} from "../domain/Store";
import {StoreFn} from "./storeFn";
import {Store} from "../domain/Store.js";
import {StoreFn} from "./storeFn.js";

export function StoreMerge(key: any, value: any): Function {
return StoreFn((store: Store) => {
Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/decorators/storeSet.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {Store} from "../domain/Store";
import {StoreFn} from "./storeFn";
import {Store} from "../domain/Store.js";
import {StoreFn} from "./storeFn.js";

export function StoreSet(key: any, value: any): Function {
return StoreFn((store: Store) => {
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/decorators/writable.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {descriptorOf, Readonly, Writable} from "../../src";
import {descriptorOf, Readonly, Writable} from "../../src/index.js";

class Test {}

Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/decorators/writable.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {descriptorOf} from "../utils/objects/descriptorOf";
import {descriptorOf} from "../utils/objects/descriptorOf.js";

export function Writable(value: boolean = true): Function {
return (target: any, propertyKey: string) => {
Expand Down
6 changes: 3 additions & 3 deletions packages/core/src/domain/AnyToPromise.spec.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import filedirname from "filedirname";
import {createReadStream} from "fs";
import {of} from "rxjs";
import {catchAsyncError} from "../utils/catchError";
import {isStream} from "../utils/objects/isStream";
import {AnyToPromise, AnyToPromiseStatus} from "./AnyToPromise";
import {catchAsyncError} from "../utils/catchError.js";
import {isStream} from "../utils/objects/isStream.js";
import {AnyToPromise, AnyToPromiseStatus} from "./AnyToPromise.js";

// FIXME remove when esm is ready
const [, rootDir] = filedirname();
Expand Down
8 changes: 4 additions & 4 deletions packages/core/src/domain/AnyToPromise.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {isObject} from "../utils/objects/isObject";
import {isObservable} from "../utils/objects/isObservable";
import {isPromise} from "../utils/objects/isPromise";
import {isStream} from "../utils/objects/isStream";
import {isObject} from "../utils/objects/isObject.js";
import {isObservable} from "../utils/objects/isObservable.js";
import {isPromise} from "../utils/objects/isPromise.js";
import {isStream} from "../utils/objects/isStream.js";

/**
* @ignore
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/domain/Hooks.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {Hooks} from "./Hooks";
import {Hooks} from "./Hooks.js";

describe("Hooks", () => {
describe("emit", () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/domain/Metadata.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {Metadata} from "./Metadata";
import {Metadata} from "./Metadata.js";

function logger(target: any, method?: any, descriptor?: any) {
return descriptor;
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/domain/Metadata.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import "reflect-metadata";
import {classOf} from "../utils/objects/classOf";
import {classOf} from "../utils/objects/classOf.js";

/**
* Metadata key
Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/domain/Store.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {Metadata} from "./Metadata";
import {CLASS_STORE, METHOD_STORE, PARAM_STORE, PROPERTY_STORE, Store} from "./Store";
import {Metadata} from "./Metadata.js";
import {CLASS_STORE, METHOD_STORE, PARAM_STORE, PROPERTY_STORE, Store} from "./Store.js";

class FakeMetadata {
attr1: any;
Expand Down
18 changes: 9 additions & 9 deletions packages/core/src/domain/Store.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import {DecoratorTypes} from "../domain/DecoratorTypes";
import {decoratorTypeOf} from "../utils/decorators/decoratorTypeOf";
import {deepClone} from "../utils/objects/deepClone";
import {deepMerge} from "../utils/objects/deepMerge";
import {descriptorOf} from "../utils/objects/descriptorOf";
import {isSymbol} from "../utils/objects/isSymbol";
import {nameOf} from "../utils/objects/nameOf";
import {Metadata} from "./Metadata";
import type {Type} from "./Type";
import {DecoratorTypes} from "../domain/DecoratorTypes.js";
import {decoratorTypeOf} from "../utils/decorators/decoratorTypeOf.js";
import {deepClone} from "../utils/objects/deepClone.js";
import {deepMerge} from "../utils/objects/deepMerge.js";
import {descriptorOf} from "../utils/objects/descriptorOf.js";
import {isSymbol} from "../utils/objects/isSymbol.js";
import {nameOf} from "../utils/objects/nameOf.js";
import {Metadata} from "./Metadata.js";
import type {Type} from "./Type.js";

/**
* @ignore
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/errors/UnsupportedDecoratorType.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {UnsupportedDecoratorType} from "./UnsupportedDecoratorType";
import {UnsupportedDecoratorType} from "./UnsupportedDecoratorType.js";

class Test {}

Expand Down
6 changes: 3 additions & 3 deletions packages/core/src/errors/UnsupportedDecoratorType.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {decoratorTypeOf} from "../utils/decorators/decoratorTypeOf";
import {classOf} from "../utils/objects/classOf";
import {nameOf} from "../utils/objects/nameOf";
import {decoratorTypeOf} from "../utils/decorators/decoratorTypeOf.js";
import {classOf} from "../utils/objects/classOf.js";
import {nameOf} from "../utils/objects/nameOf.js";

export class UnsupportedDecoratorType extends Error {
name: "UNSUPPORTED_DECORATOR_TYPE";
Expand Down
164 changes: 82 additions & 82 deletions packages/core/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,85 +2,85 @@
* @file Automatically generated by barrelsby.
*/

export * from "./decorators/configurable";
export * from "./decorators/deprecated";
export * from "./decorators/enumerable";
export * from "./decorators/notConfigurable";
export * from "./decorators/notEnumerable";
export * from "./decorators/readOnly";
export * from "./decorators/storeFn";
export * from "./decorators/storeMerge";
export * from "./decorators/storeSet";
export * from "./decorators/writable";
export * from "./domain/AnyToPromise";
export * from "./domain/DecoratorTypes";
export * from "./domain/Env";
export * from "./domain/Hooks";
export * from "./domain/Metadata";
export * from "./domain/Store";
export * from "./domain/Type";
export * from "./errors/UnsupportedDecoratorType";
export * from "./interfaces/AnyDecorator";
export * from "./interfaces/DecoratorParameters";
export * from "./interfaces/MetadataTypes";
export * from "./interfaces/ValueOf";
export * from "./utils/catchError";
export * from "./utils/getRandomId";
export * from "./utils/proxyDelegation";
export * from "./utils/uniq";
export * from "./utils/decorators/decorateMethodsOf";
export * from "./utils/decorators/decoratorArgs";
export * from "./utils/decorators/decoratorTypeOf";
export * from "./utils/decorators/inheritedDescriptorOf";
export * from "./utils/decorators/useDecorators";
export * from "./utils/decorators/useMethodDecorators";
export * from "./utils/http/getHostInfoFromPort";
export * from "./utils/imports/importPackage";
export * from "./utils/objects/ancestorOf";
export * from "./utils/objects/ancestorsOf";
export * from "./utils/objects/classOf";
export * from "./utils/objects/cleanObject";
export * from "./utils/objects/constructorOf";
export * from "./utils/objects/createInstance";
export * from "./utils/objects/deepClone";
export * from "./utils/objects/deepMerge";
export * from "./utils/objects/descriptorOf";
export * from "./utils/objects/getClassOrSymbol";
export * from "./utils/objects/getConstructorArgNames";
export * from "./utils/objects/getEnumerableKeys";
export * from "./utils/objects/getValue";
export * from "./utils/objects/hasJsonMethod";
export * from "./utils/objects/isArray";
export * from "./utils/objects/isArrowFn";
export * from "./utils/objects/isBoolean";
export * from "./utils/objects/isBuffer";
export * from "./utils/objects/isClass";
export * from "./utils/objects/isCollection";
export * from "./utils/objects/isDate";
export * from "./utils/objects/isEmpty";
export * from "./utils/objects/isEnumerable";
export * from "./utils/objects/isFunction";
export * from "./utils/objects/isInheritedFrom";
export * from "./utils/objects/isMomentObject";
export * from "./utils/objects/isMongooseObject";
export * from "./utils/objects/isNil";
export * from "./utils/objects/isNumber";
export * from "./utils/objects/isObject";
export * from "./utils/objects/isObservable";
export * from "./utils/objects/isPlainObject";
export * from "./utils/objects/isPrimitive";
export * from "./utils/objects/isPromise";
export * from "./utils/objects/isProtectedKey";
export * from "./utils/objects/isRegExp";
export * from "./utils/objects/isSerializable";
export * from "./utils/objects/isStream";
export * from "./utils/objects/isString";
export * from "./utils/objects/isSymbol";
export * from "./utils/objects/methodsOf";
export * from "./utils/objects/nameOf";
export * from "./utils/objects/objectKeys";
export * from "./utils/objects/primitiveOf";
export * from "./utils/objects/prototypeOf";
export * from "./utils/objects/setValue";
export * from "./utils/objects/toMap";
export * from "./utils/objects/toStringConstructor";
export * from "./decorators/configurable.js";
export * from "./decorators/deprecated.js";
export * from "./decorators/enumerable.js";
export * from "./decorators/notConfigurable.js";
export * from "./decorators/notEnumerable.js";
export * from "./decorators/readOnly.js";
export * from "./decorators/storeFn.js";
export * from "./decorators/storeMerge.js";
export * from "./decorators/storeSet.js";
export * from "./decorators/writable.js";
export * from "./domain/AnyToPromise.js";
export * from "./domain/DecoratorTypes.js";
export * from "./domain/Env.js";
export * from "./domain/Hooks.js";
export * from "./domain/Metadata.js";
export * from "./domain/Store.js";
export * from "./domain/Type.js";
export * from "./errors/UnsupportedDecoratorType.js";
export * from "./interfaces/AnyDecorator.js";
export * from "./interfaces/DecoratorParameters.js";
export * from "./interfaces/MetadataTypes.js";
export * from "./interfaces/ValueOf.js";
export * from "./utils/catchError.js";
export * from "./utils/getRandomId.js";
export * from "./utils/proxyDelegation.js";
export * from "./utils/uniq.js";
export * from "./utils/decorators/decorateMethodsOf.js";
export * from "./utils/decorators/decoratorArgs.js";
export * from "./utils/decorators/decoratorTypeOf.js";
export * from "./utils/decorators/inheritedDescriptorOf.js";
export * from "./utils/decorators/useDecorators.js";
export * from "./utils/decorators/useMethodDecorators.js";
export * from "./utils/http/getHostInfoFromPort.js";
export * from "./utils/imports/importPackage.js";
export * from "./utils/objects/ancestorOf.js";
export * from "./utils/objects/ancestorsOf.js";
export * from "./utils/objects/classOf.js";
export * from "./utils/objects/cleanObject.js";
export * from "./utils/objects/constructorOf.js";
export * from "./utils/objects/createInstance.js";
export * from "./utils/objects/deepClone.js";
export * from "./utils/objects/deepMerge.js";
export * from "./utils/objects/descriptorOf.js";
export * from "./utils/objects/getClassOrSymbol.js";
export * from "./utils/objects/getConstructorArgNames.js";
export * from "./utils/objects/getEnumerableKeys.js";
export * from "./utils/objects/getValue.js";
export * from "./utils/objects/hasJsonMethod.js";
export * from "./utils/objects/isArray.js";
export * from "./utils/objects/isArrowFn.js";
export * from "./utils/objects/isBoolean.js";
export * from "./utils/objects/isBuffer.js";
export * from "./utils/objects/isClass.js";
export * from "./utils/objects/isCollection.js";
export * from "./utils/objects/isDate.js";
export * from "./utils/objects/isEmpty.js";
export * from "./utils/objects/isEnumerable.js";
export * from "./utils/objects/isFunction.js";
export * from "./utils/objects/isInheritedFrom.js";
export * from "./utils/objects/isMomentObject.js";
export * from "./utils/objects/isMongooseObject.js";
export * from "./utils/objects/isNil.js";
export * from "./utils/objects/isNumber.js";
export * from "./utils/objects/isObject.js";
export * from "./utils/objects/isObservable.js";
export * from "./utils/objects/isPlainObject.js";
export * from "./utils/objects/isPrimitive.js";
export * from "./utils/objects/isPromise.js";
export * from "./utils/objects/isProtectedKey.js";
export * from "./utils/objects/isRegExp.js";
export * from "./utils/objects/isSerializable.js";
export * from "./utils/objects/isStream.js";
export * from "./utils/objects/isString.js";
export * from "./utils/objects/isSymbol.js";
export * from "./utils/objects/methodsOf.js";
export * from "./utils/objects/nameOf.js";
export * from "./utils/objects/objectKeys.js";
export * from "./utils/objects/primitiveOf.js";
export * from "./utils/objects/prototypeOf.js";
export * from "./utils/objects/setValue.js";
export * from "./utils/objects/toMap.js";
export * from "./utils/objects/toStringConstructor.js";
2 changes: 1 addition & 1 deletion packages/core/src/interfaces/MetadataTypes.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type {Type} from "../domain/Type";
import type {Type} from "../domain/Type.js";

export interface MetadataTypes<T = any, C = any> {
type?: Type<T> | T;
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/utils/catchError.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {catchAsyncError, catchError} from "./catchError";
import {catchAsyncError, catchError} from "./catchError.js";

describe("catchError", () => {
it("should catch error", () => {
Expand Down
10 changes: 5 additions & 5 deletions packages/core/src/utils/decorators/decorateMethodsOf.spec.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import {StoreMerge} from "../../decorators/storeMerge";
import {StoreSet} from "../../decorators/storeSet";
import {Store} from "../../domain/Store";
import {descriptorOf} from "../objects/descriptorOf";
import {decorateMethodsOf} from "./decorateMethodsOf";
import {StoreMerge} from "../../decorators/storeMerge.js";
import {StoreSet} from "../../decorators/storeSet.js";
import {Store} from "../../domain/Store.js";
import {descriptorOf} from "../objects/descriptorOf.js";
import {decorateMethodsOf} from "./decorateMethodsOf.js";

describe("decorateMethodsOf", () => {
it("should decorate all methods", () => {
Expand Down
10 changes: 5 additions & 5 deletions packages/core/src/utils/decorators/decorateMethodsOf.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import {Store} from "../../domain/Store";
import {classOf} from "../objects/classOf";
import {descriptorOf} from "../objects/descriptorOf";
import {methodsOf} from "../objects/methodsOf";
import {prototypeOf} from "../objects/prototypeOf";
import {Store} from "../../domain/Store.js";
import {classOf} from "../objects/classOf.js";
import {descriptorOf} from "../objects/descriptorOf.js";
import {methodsOf} from "../objects/methodsOf.js";
import {prototypeOf} from "../objects/prototypeOf.js";

export function decorateMethodsOf(klass: any, decorator: any) {
methodsOf(klass).forEach(({target, propertyKey}) => {
Expand Down
6 changes: 3 additions & 3 deletions packages/core/src/utils/decorators/decoratorArgs.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {descriptorOf} from "../objects/descriptorOf";
import {prototypeOf} from "../objects/prototypeOf";
import {decoratorArgs} from "./decoratorArgs";
import {descriptorOf} from "../objects/descriptorOf.js";
import {prototypeOf} from "../objects/prototypeOf.js";
import {decoratorArgs} from "./decoratorArgs.js";

describe("decoratorArgs", () => {
it("should return decorator arguments", () => {
Expand Down
Loading

0 comments on commit 0f514f6

Please sign in to comment.