Skip to content

Commit

Permalink
refa: add esm exports for core packages, fix #1339
Browse files Browse the repository at this point in the history
  • Loading branch information
shigma committed Jan 26, 2024
1 parent 4486656 commit 9779cdf
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 15 deletions.
8 changes: 5 additions & 3 deletions packages/axios/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@
"name": "cordis-axios",
"description": "Axios service for cordis",
"version": "4.0.2",
"main": "lib/index.js",
"type": "module",
"main": "lib/index.cjs",
"module": "lib/index.mjs",
"types": "lib/index.d.ts",
"exports": {
".": {
"node": "./lib/index.js",
"browser": "./lib/index.mjs",
"require": "./lib/index.cjs",
"import": "./lib/index.mjs",
"types": "./lib/index.d.ts"
},
"./package.json": "./package.json"
Expand Down
11 changes: 10 additions & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,18 @@
"name": "@satorijs/core",
"description": "Core components of Satorijs",
"version": "3.4.2",
"type": "module",
"main": "lib/index.cjs",
"module": "lib/index.mjs",
"typings": "lib/index.d.ts",
"types": "lib/index.d.ts",
"exports": {
".": {
"require": "./lib/index.cjs",
"import": "./lib/index.mjs",
"types": "./lib/index.d.ts"
},
"./package.json": "./package.json"
},
"files": [
"lib",
"src"
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Awaitable, defineProperty, Dict } from 'cosmokit'
import { Bot } from './bot'
import { Session } from './session'
import Schema from 'schemastery'
import Quester from 'cordis-axios'
import { Quester } from 'cordis-axios'
import * as logger from '@cordisjs/logger'
import TimerService from '@cordisjs/timer'
import { Event, SendOptions } from '@satorijs/protocol'
Expand Down
8 changes: 5 additions & 3 deletions packages/protocol/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@
"name": "@satorijs/protocol",
"description": "Protocol types for Satori protocol",
"version": "1.2.0",
"main": "lib/index.js",
"type": "module",
"main": "lib/index.cjs",
"module": "lib/index.mjs",
"types": "lib/index.d.ts",
"exports": {
".": {
"node": "./lib/index.js",
"browser": "./lib/index.mjs",
"require": "./lib/index.cjs",
"import": "./lib/index.mjs",
"types": "./lib/index.d.ts"
},
"./package.json": "./package.json"
Expand Down
14 changes: 12 additions & 2 deletions packages/satori/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,18 @@
"name": "@satorijs/satori",
"description": "Core components of Satorijs",
"version": "3.4.2",
"main": "lib/index.js",
"typings": "lib/index.d.ts",
"type": "module",
"main": "lib/index.cjs",
"module": "lib/index.mjs",
"types": "lib/index.d.ts",
"exports": {
".": {
"require": "./lib/index.cjs",
"import": "./lib/index.mjs",
"types": "./lib/index.d.ts"
},
"./package.json": "./package.json"
},
"files": [
"lib",
"src"
Expand Down
12 changes: 7 additions & 5 deletions packages/server-satori/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@
"name": "@satorijs/server-satori",
"description": "Basic API server for Satori protocol",
"version": "2.4.0",
"main": "lib/index.js",
"type": "module",
"main": "lib/index.cjs",
"module": "lib/index.mjs",
"types": "lib/index.d.ts",
"exports": {
".": {
"node": "./lib/index.js",
"browser": "./lib/index.mjs",
"require": "./lib/index.cjs",
"import": "./lib/index.mjs",
"types": "./lib/index.d.ts"
},
"./package.json": "./package.json"
Expand Down Expand Up @@ -35,9 +37,9 @@
"api"
],
"devDependencies": {
"@cordisjs/server": "^0.1.3"
"@cordisjs/server": "^0.1.5"
},
"peerDependencies": {
"@satorijs/satori": "^3.4.2"
"@satorijs/satori": "^3.4.4"
}
}

0 comments on commit 9779cdf

Please sign in to comment.