editor: include esm & cjs variants in build

This commit is contained in:
Abdullah Atta
2024-09-23 15:14:00 +05:00
parent 7c257cfbd2
commit c787ef29d6
2 changed files with 51 additions and 18 deletions

View File

@@ -1,16 +1,16 @@
{
"name": "@notesnook/editor",
"version": "2.0.7",
"version": "2.1.1",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "@notesnook/editor",
"version": "2.0.7",
"version": "2.1.1",
"hasInstallScript": true,
"license": "GPL-3.0-or-later",
"dependencies": {
"@notesnook/core": "file:../core",
"@notesnook/common": "file:../common",
"@notesnook/theme": "file:../theme",
"@notesnook/ui": "file:../ui",
"@social-embed/lib": "^0.1.0-next.7",
@@ -98,9 +98,32 @@
"zustand": ">=4"
}
},
"../common": {
"name": "@notesnook/common",
"version": "2.0.7",
"license": "GPL-3.0-or-later",
"dependencies": {
"@notesnook/core": "^8.0.0",
"@readme/data-urls": "^3.0.0",
"dayjs": "^1.11.13",
"pathe": "^1.1.2",
"timeago.js": "4.0.2"
},
"devDependencies": {
"@notesnook/core": "^8.0.0",
"@types/react": "^18.2.39",
"react": "18.2.0",
"vitest": "^1.4.0"
},
"peerDependencies": {
"react": ">=18",
"timeago.js": "4.0.2"
}
},
"../core": {
"name": "@notesnook/core",
"version": "8.0.8",
"extraneous": true,
"hasInstallScript": true,
"license": "GPL-3.0-or-later",
"dependencies": {
@@ -138,6 +161,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",
@@ -167,7 +191,7 @@
"@theme-ui/color": "^0.16.1",
"@theme-ui/components": "^0.16.1",
"@theme-ui/core": "^0.16.1",
"@trpc/server": "^10.31.0",
"@trpc/server": "^10.45.2",
"@types/react": "^18.2.39",
"@types/tinycolor2": "^1.4.3",
"isomorphic-fetch": "^3.0.0",
@@ -958,8 +982,8 @@
"prop-types": "^15.7.2"
}
},
"node_modules/@notesnook/core": {
"resolved": "../core",
"node_modules/@notesnook/common": {
"resolved": "../common",
"link": true
},
"node_modules/@notesnook/theme": {

View File

@@ -1,11 +1,25 @@
{
"name": "@notesnook/editor",
"version": "2.0.7",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"version": "2.1.1",
"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"
}
},
"./styles/*.css": "./dist/styles/*.css"
},
"license": "GPL-3.0-or-later",
"dependencies": {
"@notesnook/core": "file:../core",
"@notesnook/common": "file:../common",
"@notesnook/theme": "file:../theme",
"@notesnook/ui": "file:../ui",
"@social-embed/lib": "^0.1.0-next.7",
@@ -97,16 +111,11 @@
"prebuild": "node ./scripts/build.mjs",
"postbuild": "node ./scripts/postbuild.mjs",
"prewatch": "node ./scripts/build.mjs",
"build": "tsc",
"watch": "tsc --watch",
"start": "npm run watch",
"prepublishOnly": "npm run build && npm run test",
"postinstall": "patch-package"
},
"np": {
"tests": true,
"releaseDraft": false,
"message": "chore: bump version to %s"
"postinstall": "patch-package",
"build": "tsup-node src/index.ts",
"watch": "npm run build -- --watch"
},
"repository": {
"type": "git",