Skip to content

Commit

Permalink
chore: change all packages to esm only (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
typicalninja authored Nov 1, 2024
1 parent 9bb8f6a commit d79ee3c
Show file tree
Hide file tree
Showing 32 changed files with 317 additions and 406 deletions.
14 changes: 14 additions & 0 deletions .changeset/short-coins-dance.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
"@disci/adapter-hono": major
"disci": major
---

All provide packages are esm only

They can be only imported using `import` statements and cannot be used with `require` statements.
Check [here](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c) for more information.

```diff
- const { createInteractionRequestHandler } = require('@disci/adapter-hono');
+ import { createInteractionRequestHandler } from "@disci/adapter-hono";
```
29 changes: 18 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,37 @@
# 🎨 Disci Project

[![NPM version badge](https://img.shields.io/npm/v/disci)](https://www.npmjs.com/package/disci)
[![NPM bundle size](hhttps://deno.bundlejs.com/badge?q=disci)](https://bundlejs.com/?q=disci)
[![NPM license](https://img.shields.io/npm/l/disci)](https://www.npmjs.com/package/disci)
[![GitHub issues](https://img.shields.io/github/issues/typicalninja/disci)](https://github.com/typicalninja/disci/issues)

Disci is a project designed for interacting with Discord's new interaction webhook system, enabling the creation of Discord applications without the need for a websocket connection. It's an ideal choice for serverless and small to medium-sized bots (*Size as in code size, not servers*)
Create [HTTP webserver](https://discord.com/developers/docs/interactions/overview#configuring-an-interactions-endpoint-url) powered discord bots. Supports serverless environments as well as node/deno/bun.

# 📦 Monorepo
# Install

Please refer to [our docs](https://disci.netlify.app/) for a basic setup with a supported webserver.

This is the monorepo for Disci.js. The Disci package readme is available [here](./packages/disci/readme.md).
```bash
npm install disci
# or other platforms
pnpm/yarn/bun add disci
```
**Note:** This project is [ESM](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules) and does not support CommonJS. Your project must be [ESM or converted to ESM](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c) to use disci packages.

# 📦 Monorepo

All packages are in the ./packages directory, while Examples and Documentation are in the ./apps directory.
## 💻 Development
This is the monorepo for all discijs packages. The core disci package readme is available [here](./packages/disci/readme.md).

The current latest published version of the main package (![npm version badge](https://img.shields.io/npm/v/disci)) is a pre-release version
# 💻 Development

All versions within the range of **0.xx.xx** are considered pre-release and may contain breaking changes within minor and patch releases.

## 🔗 Links
# 🔗 Links

* [Documentation & Guide](https://dev--disci.netlify.app/)
* [Npm](https://www.npmjs.com/package/disci)
* [Documentation & Guide](https://disci.netlify.app/)
* [npm (disci)](https://www.npmjs.com/package/disci)
* [Github](https://github.com/typicalninja/disci)
* [Discord Server](https://discord.gg/ynwckXS9T2)

## License
# License

This repository and the code inside it is licensed under the Apache-2.0 License. Read [LICENSE](https://github.com/typicalninja/disci/blob/master/LICENSE) for more information.
2 changes: 1 addition & 1 deletion packages/adapter-hono/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "DisciJS adapter for hono framework",
"type": "module",
"exports": "./dist/index.js",
"types": "./dist/index.d.js",
"types": "./dist/index.d.ts",
"scripts": {
"build": "tsup",
"dev": "tsup --watch"
Expand Down
1 change: 0 additions & 1 deletion packages/disci-kit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
"discik": "./dist/cli/cli.js"
},
"scripts": {
"build": "tsup",
"dev": "tsup --watch"
},
"keywords": [],
Expand Down
31 changes: 0 additions & 31 deletions packages/disci-kit/src/cli/cli.ts

This file was deleted.

101 changes: 0 additions & 101 deletions packages/disci-kit/src/cli/commands/init.ts

This file was deleted.

1 change: 0 additions & 1 deletion packages/disci-kit/src/lib/index.ts

This file was deleted.

138 changes: 0 additions & 138 deletions packages/disci-kit/src/lib/init.ts

This file was deleted.

20 changes: 0 additions & 20 deletions packages/disci-kit/src/lib/utils/constants.ts

This file was deleted.

Loading

0 comments on commit d79ee3c

Please sign in to comment.