core: include cjs and esm variants in build

This commit is contained in:
Abdullah Atta
2024-09-23 15:11:02 +05:00
parent 50e418dc53
commit 7f31066e8f
2 changed files with 41 additions and 30 deletions

View File

@@ -1,12 +1,12 @@
{
"name": "@notesnook/core",
"version": "8.0.8",
"version": "8.1.1",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "@notesnook/core",
"version": "8.0.8",
"version": "8.1.1",
"hasInstallScript": true,
"license": "GPL-3.0-or-later",
"dependencies": {
@@ -44,6 +44,7 @@
"@types/prismjs": "^1.26.0",
"@types/spark-md5": "^3.0.2",
"@types/streetwriters__showdown": "npm:@types/showdown@^2.0.6",
"@types/unist": "^3.0.3",
"@types/ws": "^8.5.5",
"@vitest/coverage-v8": "^1.0.1",
"abortcontroller-polyfill": "^1.7.3",
@@ -868,16 +869,6 @@
"node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1"
}
},
"../sodium/node_modules/node-gyp-build": {
"version": "4.6.0",
"dev": true,
"license": "MIT",
"bin": {
"node-gyp-build": "bin.js",
"node-gyp-build-optional": "optional.js",
"node-gyp-build-test": "build-test.js"
}
},
"../sodium/node_modules/onetime": {
"version": "5.1.2",
"dev": true,
@@ -1035,15 +1026,6 @@
"dev": true,
"license": "ISC"
},
"../sodium/node_modules/sodium-native": {
"version": "4.0.1",
"dev": true,
"hasInstallScript": true,
"license": "MIT",
"dependencies": {
"node-gyp-build": "^4.3.0"
}
},
"../sodium/node_modules/source-map-js": {
"version": "1.0.2",
"dev": true,
@@ -2272,6 +2254,12 @@
"@types/unist": "^2"
}
},
"node_modules/@types/hast/node_modules/@types/unist": {
"version": "2.0.11",
"resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.11.tgz",
"integrity": "sha512-CmBKiL6NNo/OqgmMn95Fk9Whlp2mtvIv+KNpQKN2F4SjvrEesubTRWGYSg+BnWZOnlCaSTU1sMpsBOzgbYhnsA==",
"dev": true
},
"node_modules/@types/html-to-text": {
"version": "9.0.0",
"dev": true,
@@ -2315,9 +2303,10 @@
"license": "MIT"
},
"node_modules/@types/unist": {
"version": "2.0.7",
"dev": true,
"license": "MIT"
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/@types/unist/-/unist-3.0.3.tgz",
"integrity": "sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q==",
"dev": true
},
"node_modules/@types/ws": {
"version": "8.5.10",
@@ -3975,6 +3964,12 @@
"url": "https://github.com/sponsors/wooorm"
}
},
"node_modules/parse-entities/node_modules/@types/unist": {
"version": "2.0.11",
"resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.11.tgz",
"integrity": "sha512-CmBKiL6NNo/OqgmMn95Fk9Whlp2mtvIv+KNpQKN2F4SjvrEesubTRWGYSg+BnWZOnlCaSTU1sMpsBOzgbYhnsA==",
"dev": true
},
"node_modules/parse5": {
"version": "7.1.2",
"dev": true,

View File

@@ -1,8 +1,22 @@
{
"name": "@notesnook/core",
"version": "8.0.8",
"main": "dist/index.js",
"version": "8.1.1",
"license": "GPL-3.0-or-later",
"main": "./dist/index.js",
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"exports": {
".": {
"require": {
"types": "./dist/index.d.ts",
"default": "./dist/index.js"
},
"import": {
"types": "./dist/index.d.mts",
"default": "./dist/index.mjs"
}
}
},
"repository": {
"type": "git",
"url": "git://github.com/streetwriters/notesnook-core.git"
@@ -17,6 +31,7 @@
"@types/prismjs": "^1.26.0",
"@types/spark-md5": "^3.0.2",
"@types/streetwriters__showdown": "npm:@types/showdown@^2.0.6",
"@types/unist": "^3.0.3",
"@types/ws": "^8.5.5",
"@vitest/coverage-v8": "^1.0.1",
"abortcontroller-polyfill": "^1.7.3",
@@ -41,16 +56,18 @@
"prebuild": "node scripts/prebuild.mjs",
"pretest": "node scripts/prebuild.mjs",
"pretest:e2e": "node scripts/prebuild.mjs",
"build": "tsc",
"watch": "tsc --watch",
"test:e2e": "cross-env IS_E2E=true vitest run",
"test": "vitest run"
"test": "vitest run",
"build": "tsup-node src/index.ts",
"prepublishOnly": "npm run build",
"watch": "npm run build -- --watch"
},
"dependencies": {
"@leeoniya/ufuzzy": "^1.0.10",
"@microsoft/signalr": "^8.0.0",
"@notesnook/logger": "file:../logger",
"@readme/data-urls": "^3.0.0",
"@streetwriters/kysely": "^0.27.4",
"@streetwriters/showdown": "^3.0.8-alpha",
"async-mutex": "^0.3.2",
"dayjs": "1.11.9",
@@ -62,7 +79,6 @@
"html-to-text": "^9.0.5",
"htmlparser2": "^8.0.1",
"katex": "0.16.2",
"@streetwriters/kysely": "^0.27.4",
"linkedom": "^0.14.17",
"liqe": "^1.13.0",
"mime-db": "1.52.0",