Skip to content

Commit 6fde422

Browse files
authored
Merge pull request #1 from node-jeneralize/fix/stop_bundle_in_publish
Stop contain bundle file in publish
2 parents b83f2d0 + 1d76761 commit 6fde422

File tree

5 files changed

+104
-21
lines changed

5 files changed

+104
-21
lines changed

package.json

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,16 @@
1414
"name": "huequica",
1515
"url": "https://github.com/huequica"
1616
},
17-
"main": "dist/index.js",
18-
"types": "dist/types/src/index.d.ts",
17+
"main": "dist/src/index.js",
18+
"types": "dist/src/index.d.ts",
1919
"devDependencies": {
2020
"@typescript-eslint/eslint-plugin": "^5.53.0",
2121
"@typescript-eslint/parser": "^5.53.0",
2222
"esbuild": "^0.17.10",
2323
"eslint": "^8.34.0",
2424
"eslint-config-prettier": "^8.6.0",
2525
"prettier": "^2.8.4",
26+
"tsc-alias": "^1.8.6",
2627
"typescript": "^4.9.5"
2728
},
2829
"scripts": {
@@ -33,10 +34,8 @@
3334
"lint:code:fix": "prettier --write .",
3435
"lint": "npm run lint:js && npm run lint:code",
3536
"lint:fix": "npm run lint:js:fix && npm run lint:code:fix",
36-
"build": "rm -rf dist && npm run build:types && npm run build:module",
37-
"build:types": "tsc -p tsconfig.types.json --emitDeclarationOnly",
38-
"build:module": "esbuild --bundle --outdir=dist --platform=node src/index.ts",
39-
"prepare": "npm run typeCheck && npm run build"
37+
"build": "tsc && tsc-alias",
38+
"prepare": "npm run build"
4039
},
4140
"dependencies": {
4241
"mongodb": "^5.1.0"

src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { MongoClient } from 'mongodb';
2-
import { InjectableCollection, CollectionIds, RunnerParams } from '../@types';
2+
import { InjectableCollection, CollectionIds, RunnerParams } from '@types';
33
import { parseValueToId } from '@/libs/parseValueToId';
44
import { logMessage } from '@/libs/logMessage';
55

@@ -49,4 +49,4 @@ export const mti = (params: RunnerParams): Promise<void> => {
4949
);
5050
};
5151

52-
export { InjectableCollection, RunnerParams } from '../@types';
52+
export { InjectableCollection, RunnerParams } from '@types';

tsconfig.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,22 @@
11
{
22
"compilerOptions": {
3-
"module": "commonjs",
3+
"module": "NodeNext",
44
"target": "ES2018",
55
"sourceMap": true,
6+
"outDir": "./dist",
7+
"declaration": true,
8+
"declarationMap": true,
69
"strict": true,
710
"esModuleInterop": true,
811
"forceConsistentCasingInFileNames": true,
912
"rootDir": "./",
1013
"baseUrl": "./",
1114
"paths": {
1215
"@/*": ["src/*"],
16+
"@types": ["@types"]
1317
},
1418
"types": ["@types/node"]
1519
},
20+
"include": ["**/*.ts"],
1621
"exclude": ["node_modules"]
1722
}

tsconfig.types.json

Lines changed: 0 additions & 7 deletions
This file was deleted.

yarn.lock

Lines changed: 91 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,14 @@ ansi-styles@^4.1.0:
311311
dependencies:
312312
color-convert "^2.0.1"
313313

314+
anymatch@~3.1.2:
315+
version "3.1.3"
316+
resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.3.tgz#790c58b19ba1720a84205b57c618d5ad8524973e"
317+
integrity sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==
318+
dependencies:
319+
normalize-path "^3.0.0"
320+
picomatch "^2.0.4"
321+
314322
argparse@^2.0.1:
315323
version "2.0.1"
316324
resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38"
@@ -326,6 +334,11 @@ balanced-match@^1.0.0:
326334
resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee"
327335
integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==
328336

337+
binary-extensions@^2.0.0:
338+
version "2.2.0"
339+
resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d"
340+
integrity sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==
341+
329342
brace-expansion@^1.1.7:
330343
version "1.1.11"
331344
resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd"
@@ -334,7 +347,7 @@ brace-expansion@^1.1.7:
334347
balanced-match "^1.0.0"
335348
concat-map "0.0.1"
336349

337-
braces@^3.0.2:
350+
braces@^3.0.2, braces@~3.0.2:
338351
version "3.0.2"
339352
resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107"
340353
integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==
@@ -359,6 +372,21 @@ chalk@^4.0.0:
359372
ansi-styles "^4.1.0"
360373
supports-color "^7.1.0"
361374

375+
chokidar@^3.5.3:
376+
version "3.5.3"
377+
resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.3.tgz#1cf37c8707b932bd1af1ae22c0432e2acd1903bd"
378+
integrity sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==
379+
dependencies:
380+
anymatch "~3.1.2"
381+
braces "~3.0.2"
382+
glob-parent "~5.1.2"
383+
is-binary-path "~2.1.0"
384+
is-glob "~4.0.1"
385+
normalize-path "~3.0.0"
386+
readdirp "~3.6.0"
387+
optionalDependencies:
388+
fsevents "~2.3.2"
389+
362390
color-convert@^2.0.1:
363391
version "2.0.1"
364392
resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3"
@@ -371,6 +399,11 @@ color-name@~1.1.4:
371399
resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2"
372400
integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==
373401

402+
commander@^9.0.0:
403+
version "9.5.0"
404+
resolved "https://registry.yarnpkg.com/commander/-/commander-9.5.0.tgz#bc08d1eb5cedf7ccb797a96199d41c7bc3e60d30"
405+
integrity sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ==
406+
374407
concat-map@0.0.1:
375408
version "0.0.1"
376409
resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b"
@@ -638,7 +671,12 @@ fs.realpath@^1.0.0:
638671
resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f"
639672
integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==
640673

641-
glob-parent@^5.1.2:
674+
fsevents@~2.3.2:
675+
version "2.3.2"
676+
resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a"
677+
integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==
678+
679+
glob-parent@^5.1.2, glob-parent@~5.1.2:
642680
version "5.1.2"
643681
resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4"
644682
integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==
@@ -671,7 +709,7 @@ globals@^13.19.0:
671709
dependencies:
672710
type-fest "^0.20.2"
673711

674-
globby@^11.1.0:
712+
globby@^11.0.4, globby@^11.1.0:
675713
version "11.1.0"
676714
resolved "https://registry.yarnpkg.com/globby/-/globby-11.1.0.tgz#bd4be98bb042f83d796f7e3811991fbe82a0d34b"
677715
integrity sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==
@@ -729,12 +767,19 @@ ip@^2.0.0:
729767
resolved "https://registry.yarnpkg.com/ip/-/ip-2.0.0.tgz#4cf4ab182fee2314c75ede1276f8c80b479936da"
730768
integrity sha512-WKa+XuLG1A1R0UWhl2+1XQSi+fZWMsYKffMZTTYsiZaUD8k2yDAj5atimTUD2TZkyCkNEeYE5NhFZmupOGtjYQ==
731769

770+
is-binary-path@~2.1.0:
771+
version "2.1.0"
772+
resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09"
773+
integrity sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==
774+
dependencies:
775+
binary-extensions "^2.0.0"
776+
732777
is-extglob@^2.1.1:
733778
version "2.1.1"
734779
resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2"
735780
integrity sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==
736781

737-
is-glob@^4.0.0, is-glob@^4.0.1, is-glob@^4.0.3:
782+
is-glob@^4.0.0, is-glob@^4.0.1, is-glob@^4.0.3, is-glob@~4.0.1:
738783
version "4.0.3"
739784
resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084"
740785
integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==
@@ -854,6 +899,11 @@ ms@2.1.2:
854899
resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009"
855900
integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==
856901

902+
mylas@^2.1.9:
903+
version "2.1.13"
904+
resolved "https://registry.yarnpkg.com/mylas/-/mylas-2.1.13.tgz#1e23b37d58fdcc76e15d8a5ed23f9ae9fc0cbdf4"
905+
integrity sha512-+MrqnJRtxdF+xngFfUUkIMQrUUL0KsxbADUkn23Z/4ibGg192Q+z+CQyiYwvWTsYjJygmMR8+w3ZDa98Zh6ESg==
906+
857907
natural-compare-lite@^1.4.0:
858908
version "1.4.0"
859909
resolved "https://registry.yarnpkg.com/natural-compare-lite/-/natural-compare-lite-1.4.0.tgz#17b09581988979fddafe0201e931ba933c96cbb4"
@@ -864,6 +914,11 @@ natural-compare@^1.4.0:
864914
resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7"
865915
integrity sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==
866916

917+
normalize-path@^3.0.0, normalize-path@~3.0.0:
918+
version "3.0.0"
919+
resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65"
920+
integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==
921+
867922
once@^1.3.0:
868923
version "1.4.0"
869924
resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1"
@@ -924,11 +979,18 @@ path-type@^4.0.0:
924979
resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b"
925980
integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==
926981

927-
picomatch@^2.3.1:
982+
picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.3.1:
928983
version "2.3.1"
929984
resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42"
930985
integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==
931986

987+
plimit-lit@^1.2.6:
988+
version "1.5.0"
989+
resolved "https://registry.yarnpkg.com/plimit-lit/-/plimit-lit-1.5.0.tgz#f66df8a7041de1e965c4f1c0697ab486968a92a5"
990+
integrity sha512-Eb/MqCb1Iv/ok4m1FqIXqvUKPISufcjZ605hl3KM/n8GaX8zfhtgdLwZU3vKjuHGh2O9Rjog/bHTq8ofIShdng==
991+
dependencies:
992+
queue-lit "^1.5.0"
993+
932994
prelude-ls@^1.2.1:
933995
version "1.2.1"
934996
resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396"
@@ -944,11 +1006,23 @@ punycode@^2.1.0, punycode@^2.1.1:
9441006
resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.3.0.tgz#f67fa67c94da8f4d0cfff981aee4118064199b8f"
9451007
integrity sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==
9461008

1009+
queue-lit@^1.5.0:
1010+
version "1.5.0"
1011+
resolved "https://registry.yarnpkg.com/queue-lit/-/queue-lit-1.5.0.tgz#8197fdafda1edd615c8a0fc14c48353626e5160a"
1012+
integrity sha512-IslToJ4eiCEE9xwMzq3viOO5nH8sUWUCwoElrhNMozzr9IIt2qqvB4I+uHu/zJTQVqc9R5DFwok4ijNK1pU3fA==
1013+
9471014
queue-microtask@^1.2.2:
9481015
version "1.2.3"
9491016
resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243"
9501017
integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==
9511018

1019+
readdirp@~3.6.0:
1020+
version "3.6.0"
1021+
resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.6.0.tgz#74a370bd857116e245b29cc97340cd431a02a6c7"
1022+
integrity sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==
1023+
dependencies:
1024+
picomatch "^2.2.1"
1025+
9521026
regexpp@^3.2.0:
9531027
version "3.2.0"
9541028
resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-3.2.0.tgz#0425a2768d8f23bad70ca4b90461fa2f1213e1b2"
@@ -1067,6 +1141,18 @@ tr46@^3.0.0:
10671141
dependencies:
10681142
punycode "^2.1.1"
10691143

1144+
tsc-alias@^1.8.6:
1145+
version "1.8.6"
1146+
resolved "https://registry.yarnpkg.com/tsc-alias/-/tsc-alias-1.8.6.tgz#28300ed398e90b1c600548ed956f58dfbecc1589"
1147+
integrity sha512-vq+i6VpE83IeMsSJVcFN03ZBofADhr8/gIJXjxpbnTRfN/MFXy0+SBaKG2o7p95QqXBGkeG98HYz3IkOOveFbg==
1148+
dependencies:
1149+
chokidar "^3.5.3"
1150+
commander "^9.0.0"
1151+
globby "^11.0.4"
1152+
mylas "^2.1.9"
1153+
normalize-path "^3.0.0"
1154+
plimit-lit "^1.2.6"
1155+
10701156
tslib@^1.8.1:
10711157
version "1.14.1"
10721158
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00"

0 commit comments

Comments
 (0)