Skip to content

Commit

Permalink
module type
Browse files Browse the repository at this point in the history
  • Loading branch information
antoniopresto committed Oct 25, 2023
1 parent 7379068 commit da2008d
Show file tree
Hide file tree
Showing 60 changed files with 212 additions and 280 deletions.
6 changes: 6 additions & 0 deletions .idea/jsLibraryMappings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

File renamed without changes.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "powership",
"version": "2.3.2",
"version": "3.1.2",
"private": true,
"scripts": {
"pack": "run-s pack:*",
Expand Down
2 changes: 1 addition & 1 deletion packages/accounts/.babelrc.cjs
Original file line number Diff line number Diff line change
@@ -1 +1 @@
module.exports = require('@powership/boilerplate/babel-config')
module.exports = require('@powership/boilerplate/babel-config.cjs')
2 changes: 1 addition & 1 deletion packages/accounts/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1 +1 @@
module.exports = require('@powership/boilerplate/eslintrc')
module.exports = require('@powership/boilerplate/eslintrc.cjs')
2 changes: 1 addition & 1 deletion packages/accounts/jest.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ module.exports = {
modulePathIgnorePatterns: ['node_modules', 'testing.d.ts'],
testEnvironment: 'node',
testTimeout: +(process.env.TEST_TIMEOUT || 30000),
setupFilesAfterEnv: ['<rootDir>/setupTests.js'],
setupFilesAfterEnv: ['<rootDir>/setupTests.cjs'],
};
24 changes: 14 additions & 10 deletions packages/accounts/package.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
{
"name": "@powership/accounts",
"version": "2.3.2",
"version": "3.1.2",
"description": "Powership accounts",
"type": "module",
"main": "./out/index.js",
"module": "./out/module/index.js",
"main": "./out/index.cjs",
"module": "./out/module/index.mjs",
"types": "./out/index.d.ts",
"exports": {
"types": "./out/index.d.ts",
"import": "./out/module/index.js",
"require": "./out/index.js"
".": {
"types": "./out/index.d.ts",
"import": "./out/module/index.mjs",
"require": "./out/index.cjs"
}
},
"browser": {
"out/module/index.js": "./out/browser/module/index.js",
"out/index.js": "./out/browser/index.js"
"out/module/index.mjs": "./out/browser/module/index.mjs",
"out/index.cjs": "./out/browser/index.cjs"
},
"sideEffects": false,
"license": "MIT",
Expand All @@ -26,8 +28,10 @@
"fix:lint": "eslint src --ext .ts --fix",
"prepublishOnly": "run-s build fix && run-p test",
"build-targets": "run-p build:*",
"build:node": "TARGET=node npm run babild -- --out-xdir out",
"build:module-node": "TARGET=module-node npm run babild -- --out-dir out/module",
"build:browser": "TARGET=browser npm run babild -- --out-dir out/browser --out-file-extension .cjs",
"build:module-browser": "TARGET=module-browser npm run babild -- --out-dir out/browser/module --out-file-extension .mjs",
"build:node": "TARGET=node npm run babild -- --out-dir out --out-file-extension .cjs",
"build:module-node": "TARGET=module-node npm run babild -- --out-dir out/module --out-file-extension .mjs",
"declarations": "tsc -p tsconfig.declarations.json",
"babild": "babel 'src' --extensions '.ts,.tsx' --source-maps=true --ignore '**/__tests__'"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/babel-plugins/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1 +1 @@
module.exports = require('../../.eslintrc')
module.exports = require('../../.eslintrc.cjs')
2 changes: 1 addition & 1 deletion packages/babel-plugins/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@powership/babel-plugins",
"version": "2.3.2",
"version": "3.1.2",
"main": "out",
"sideEffects": false,
"typings": "out",
Expand Down
5 changes: 2 additions & 3 deletions packages/boilerplate/package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
{
"name": "@powership/boilerplate",
"version": "2.3.2",
"main": "out/index.js",
"module": "out/module/index.js",
"version": "3.1.2",
"author": "antoniopresto <[email protected]>",
"sideEffects": false,
"type": "module",
"scripts": {
"clear": "rimraf dist",
"fix": "run-s fix:* ",
Expand Down
2 changes: 1 addition & 1 deletion packages/deepstate/.babelrc.cjs
Original file line number Diff line number Diff line change
@@ -1 +1 @@
module.exports = require('@powership/boilerplate/babel-config')
module.exports = require('@powership/boilerplate/babel-config.cjs')
2 changes: 1 addition & 1 deletion packages/deepstate/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1 +1 @@
module.exports = require('@powership/boilerplate/eslintrc')
module.exports = require('@powership/boilerplate/eslintrc.cjs')
2 changes: 1 addition & 1 deletion packages/deepstate/jest.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ module.exports = {
modulePathIgnorePatterns: ['node_modules', 'testing.d.ts'],
testEnvironment: 'node',
testTimeout: +(process.env.TEST_TIMEOUT || 30000),
setupFilesAfterEnv: ['<rootDir>/setupTests.js'],
setupFilesAfterEnv: ['<rootDir>/setupTests.cjs'],
};
16 changes: 8 additions & 8 deletions packages/deepstate/package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"name": "@powership/deepstate",
"version": "2.3.2",
"version": "3.1.2",
"main": "out/index.js",
"module": "out/module/index.js",
"module": "out/module/index.mjs",
"sideEffects": false,
"browser": {
"out/module/index.js": "./out/browser/module/index.js",
"out/index.js": "./out/browser/index.js"
"out/module/index.mjs": "./out/browser/module/index.mjs",
"out/index.cjs": "./out/browser/index.cjs"
},
"author": "antoniopresto <[email protected]>",
"license": "MPL-2.0",
Expand All @@ -20,10 +20,10 @@
"fix:lint": "eslint src --ext .ts --fix",
"prepublishOnly": "run-p build fix && run-p test",
"build-targets": "run-p build:*",
"build:browser": "TARGET=browser npm run babild -- --out-dir out/browser",
"build:module-browser": "TARGET=module-browser npm run babild -- --out-dir out/browser/module",
"build:node": "TARGET=node npm run babild -- --out-dir out",
"build:module-node": "TARGET=module-node npm run babild -- --out-dir out/module",
"build:browser": "TARGET=browser npm run babild -- --out-dir out/browser --out-file-extension .cjs",
"build:module-browser": "TARGET=module-browser npm run babild -- --out-dir out/browser/module --out-file-extension .mjs",
"build:node": "TARGET=node npm run babild -- --out-dir out --out-file-extension .cjs",
"build:module-node": "TARGET=module-node npm run babild -- --out-dir out/module --out-file-extension .mjs",
"declarations": "tsc -p tsconfig.declarations.json",
"babild": "babel 'src' --extensions '.ts,.tsx' --source-maps=true --ignore '**/__tests__'"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/entity/.babelrc.cjs
Original file line number Diff line number Diff line change
@@ -1 +1 @@
module.exports = require('@powership/boilerplate/babel-config')
module.exports = require('@powership/boilerplate/babel-config.cjs')
2 changes: 1 addition & 1 deletion packages/entity/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1 +1 @@
module.exports = require('@powership/boilerplate/eslintrc')
module.exports = require('@powership/boilerplate/eslintrc.cjs')
2 changes: 1 addition & 1 deletion packages/entity/jest.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ module.exports = {
modulePathIgnorePatterns: ['node_modules', 'testing.d.ts'],
testEnvironment: 'node',
testTimeout: +(process.env.TEST_TIMEOUT || 30000),
setupFilesAfterEnv: ['<rootDir>/setupTests.js'],
setupFilesAfterEnv: ['<rootDir>/setupTests.cjs'],
};
20 changes: 12 additions & 8 deletions packages/entity/package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
{
"name": "@powership/entity",
"version": "2.3.2",
"version": "3.1.2",
"type": "module",
"main": "./out/index.js",
"module": "./out/module/index.js",
"main": "./out/index.cjs",
"module": "./out/module/index.mjs",
"types": "./out/index.d.ts",
"exports": {
"types": "./out/index.d.ts",
"import": "./out/module/index.js",
"require": "./out/index.js"
".": {
"types": "./out/index.d.ts",
"import": "./out/module/index.mjs",
"require": "./out/index.cjs"
}
},
"author": "antoniopresto <[email protected]>",
"license": "MIT",
Expand All @@ -22,8 +24,10 @@
"fix:lint": "eslint src --ext .ts --fix",
"prepublishOnly": "run-s build fix && run-p test",
"build-targets": "run-p build:*",
"build:node": "TARGET=node npm run babild -- --out-dir out",
"build:module-node": "TARGET=module-node npm run babild -- --out-dir out/module",
"build:browser": "TARGET=browser npm run babild -- --out-dir out/browser --out-file-extension .cjs",
"build:module-browser": "TARGET=module-browser npm run babild -- --out-dir out/browser/module --out-file-extension .mjs",
"build:node": "TARGET=node npm run babild -- --out-dir out --out-file-extension .cjs",
"build:module-node": "TARGET=module-node npm run babild -- --out-dir out/module --out-file-extension .mjs",
"declarations": "tsc -p tsconfig.declarations.json",
"babild": "babel 'src' --extensions '.ts,.tsx' --source-maps=true --ignore '**/__tests__'"
},
Expand Down
1 change: 1 addition & 0 deletions packages/entity/src/__tests__/Aliases.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { MongoTransporter } from '@powership/mongo';
import { AppMock, createAppMock } from '@powership/mongo/out/test-utils';

import { createSchema, createType, Infer, ULID_REGEX } from '@powership/schema';
import { tupleEnum } from '@powership/utils';

Expand Down
1 change: 1 addition & 0 deletions packages/entity/src/__tests__/Product.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { MongoTransporter } from '@powership/mongo';
import { AppMock, createAppMock } from '@powership/mongo/out/test-utils';

import {
createType,
ObjectType,
Expand Down
2 changes: 1 addition & 1 deletion packages/entity/src/__tests__/ProductResolver.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { CircularDeps, createResolver, Infer } from '@powership/schema';
import { createGraphQLSchema } from '@powership/schema/out/createGraphQLSchema';
import { createGraphQLSchema } from '@powership/schema';
import { PaginationResult } from '@powership/transporter';
import { notNull, NullableToPartial, PromiseType } from '@powership/utils';
import { assert, IsExact } from 'conditional-type-checks';
Expand Down
1 change: 1 addition & 0 deletions packages/entity/src/__tests__/mockApp.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { MongoTransporter } from '@powership/mongo';
import { AppMock, createAppMock } from '@powership/mongo/out/test-utils';

import { ObjectType } from '@powership/schema';

export function mockApp() {
Expand Down
5 changes: 4 additions & 1 deletion packages/entity/src/__tests__/setupProductTest.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import { MongoTransporter } from '@powership/mongo';
import { AppMock, createAppMock } from '@powership/mongo/out/test-utils';
import type { AppMock } from '@powership/mongo/out/test-utils';

import { createAppMock } from '@powership/mongo/out/test-utils';

import {
createResolver,
createSchema,
Expand Down
2 changes: 1 addition & 1 deletion packages/helpers/.babelrc.cjs
Original file line number Diff line number Diff line change
@@ -1 +1 @@
module.exports = require('@powership/boilerplate/babel-config')
module.exports = require('@powership/boilerplate/babel-config.cjs')
2 changes: 1 addition & 1 deletion packages/helpers/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1 +1 @@
module.exports = require('@powership/boilerplate/eslintrc')
module.exports = require('@powership/boilerplate/eslintrc.cjs')
2 changes: 1 addition & 1 deletion packages/helpers/jest.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ module.exports = {
modulePathIgnorePatterns: ['node_modules', 'testing.d.ts'],
testEnvironment: 'node',
testTimeout: +(process.env.TEST_TIMEOUT || 30000),
setupFilesAfterEnv: ['<rootDir>/setupTests.js'],
setupFilesAfterEnv: ['<rootDir>/setupTests.cjs'],
};
25 changes: 14 additions & 11 deletions packages/helpers/package.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
{
"name": "@powership/helpers",
"version": "2.3.2",
"version": "3.1.2",
"type": "module",
"main": "./out/index.js",
"module": "./out/module/index.js",
"main": "./out/index.cjs",
"module": "./out/module/index.mjs",
"types": "./out/index.d.ts",
"exports": {
"types": "./out/index.d.ts",
"import": "./out/module/index.js",
"require": "./out/index.js"
".": {
"types": "./out/index.d.ts",
"import": "./out/module/index.mjs",
"require": "./out/index.cjs"
}
},
"browser": {
"out/module/index.js": "./out/browser/module/index.js",
"out/index.js": "./out/browser/index.js"
"out/module/index.mjs": "./out/browser/module/index.mjs",
"out/index.cjs": "./out/browser/index.cjs"
},
"author": "antoniopresto <[email protected]>",
"license": "MIT",
Expand All @@ -26,9 +28,10 @@
"fix:lint": "eslint src --ext .ts --fix",
"prepublishOnly": "run-s build fix && run-p test",
"build-targets": "run-p build:*",
"build:module-browser": "TARGET=module-browser npm run babild -- --out-dir out/browser/module",
"build:node": "TARGET=node npm run babild -- --out-dir out",
"build:module-node": "TARGET=module-node npm run babild -- --out-dir out/module",
"build:browser": "TARGET=browser npm run babild -- --out-dir out/browser --out-file-extension .cjs",
"build:module-browser": "TARGET=module-browser npm run babild -- --out-dir out/browser/module --out-file-extension .mjs",
"build:node": "TARGET=node npm run babild -- --out-dir out --out-file-extension .cjs",
"build:module-node": "TARGET=module-node npm run babild -- --out-dir out/module --out-file-extension .mjs",
"declarations": "tsc -p tsconfig.declarations.json",
"babild": "babel 'src' --extensions '.ts,.tsx' --source-maps=true --ignore '**/__tests__'"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/logstorm/.babelrc.cjs
Original file line number Diff line number Diff line change
@@ -1 +1 @@
module.exports = require('@powership/boilerplate/babel-config')
module.exports = require('@powership/boilerplate/babel-config.cjs')
2 changes: 1 addition & 1 deletion packages/logstorm/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1 +1 @@
module.exports = require('@powership/boilerplate/eslintrc')
module.exports = require('@powership/boilerplate/eslintrc.cjs')
24 changes: 14 additions & 10 deletions packages/logstorm/package.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@
{
"name": "logstorm",
"version": "2.3.2",
"version": "3.1.2",
"typings": "out",
"author": "antoniopresto <[email protected]>",
"type": "module",
"main": "./out/index.js",
"module": "./out/module/index.js",
"main": "./out/index.cjs",
"module": "./out/module/index.mjs",
"types": "./out/index.d.ts",
"exports": {
"types": "./out/index.d.ts",
"import": "./out/module/index.js",
"require": "./out/index.js"
".": {
"types": "./out/index.d.ts",
"import": "./out/module/index.mjs",
"require": "./out/index.cjs"
}
},
"browser": {
"out/module/index.js": "./out/browser/module/index.js",
"out/index.js": "./out/browser/index.js"
"out/module/index.mjs": "./out/browser/module/index.mjs",
"out/index.cjs": "./out/browser/index.cjs"
},
"sideEffects": false,
"license": "MIT",
Expand All @@ -27,8 +29,10 @@
"clear": "rimraf out",
"prepublishOnly": "run-s build fix && run-p test",
"build-targets": "run-p build:*",
"build:node": "TARGET=node npm run babild -- --out-dir out",
"build:module-node": "TARGET=module-node npm run babild -- --out-dir out/module",
"build:browser": "TARGET=browser npm run babild -- --out-dir out/browser --out-file-extension .cjs",
"build:module-browser": "TARGET=module-browser npm run babild -- --out-dir out/browser/module --out-file-extension .mjs",
"build:node": "TARGET=node npm run babild -- --out-dir out --out-file-extension .cjs",
"build:module-node": "TARGET=module-node npm run babild -- --out-dir out/module --out-file-extension .mjs",
"declarations": "tsc -p tsconfig.declarations.json",
"babild": "babel 'src' --extensions '.ts,.tsx' --source-maps=true --ignore '**/__tests__'"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/mongo/.babelrc.cjs
Original file line number Diff line number Diff line change
@@ -1 +1 @@
module.exports = require('@powership/boilerplate/babel-config')
module.exports = require('@powership/boilerplate/babel-config.cjs')
2 changes: 1 addition & 1 deletion packages/mongo/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1 +1 @@
module.exports = require('@powership/boilerplate/eslintrc')
module.exports = require('@powership/boilerplate/eslintrc.cjs')
2 changes: 1 addition & 1 deletion packages/mongo/jest.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ module.exports = {
modulePathIgnorePatterns: ['node_modules', 'testing.d.ts'],
testEnvironment: 'node',
testTimeout: +(process.env.TEST_TIMEOUT || 30000),
setupFilesAfterEnv: ['<rootDir>/setupTests.js'],
setupFilesAfterEnv: ['<rootDir>/setupTests.cjs'],
};
25 changes: 17 additions & 8 deletions packages/mongo/package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
{
"name": "@powership/mongo",
"version": "2.3.2",
"version": "3.1.2",
"type": "module",
"main": "./out/index.js",
"module": "./out/module/index.js",
"main": "./out/index.cjs",
"module": "./out/module/index.mjs",
"types": "./out/index.d.ts",
"exports": {
"types": "./out/index.d.ts",
"import": "./out/module/index.js",
"require": "./out/index.js"
".": {
"types": "./out/index.d.ts",
"import": "./out/module/index.mjs",
"require": "./out/index.cjs"
},
"./out/test-utils": {
"types": "./out/test-utils/index.d.ts",
"import": "./out/module/test-utils/index.mjs",
"require": "./out/test-utils/index.cjs"
}
},
"sideEffects": false,
"license": "MIT",
Expand All @@ -21,8 +28,10 @@
"fix:lint": "eslint src --ext .ts --fix",
"prepublishOnly": "run-s build fix && run-p test",
"build-targets": "run-p build:*",
"build:node": "TARGET=node npm run babild -- --out-dir out",
"build:module-node": "TARGET=module-node npm run babild -- --out-dir out/module",
"build:browser": "TARGET=browser npm run babild -- --out-dir out/browser --out-file-extension .cjs",
"build:module-browser": "TARGET=module-browser npm run babild -- --out-dir out/browser/module --out-file-extension .mjs",
"build:node": "TARGET=node npm run babild -- --out-dir out --out-file-extension .cjs",
"build:module-node": "TARGET=module-node npm run babild -- --out-dir out/module --out-file-extension .mjs",
"declarations": "tsc -p tsconfig.declarations.json",
"babild": "babel 'src' --extensions '.ts,.tsx' --source-maps=true --ignore '**/__tests__'"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/powership/.babelrc.cjs
Original file line number Diff line number Diff line change
@@ -1 +1 @@
module.exports = require('@powership/boilerplate/babel-config')
module.exports = require('@powership/boilerplate/babel-config.cjs')
2 changes: 1 addition & 1 deletion packages/powership/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1 +1 @@
module.exports = require('@powership/boilerplate/eslintrc')
module.exports = require('@powership/boilerplate/eslintrc.cjs')
Loading

0 comments on commit da2008d

Please sign in to comment.