Skip to content

wip(core): rename core to legacy #20

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Mar 17, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions examples/vue-advanced-chat/src/chatkitty/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import ChatKitty from '@chatkitty/core';
import ChatKitty from '../../../../libraries/legacy';

import type { CurrentUser, Channel, Message, User } from '@chatkitty/core';
import type { CurrentUser, Channel, Message, User } from '../../../../libraries/legacy';
import { parseTimestamp } from '@/utils/dates';

export const chatkitty = ChatKitty.getInstance('afaac908-1db3-4b5c-a7ae-c040b9684403');
2 changes: 1 addition & 1 deletion examples/vue-advanced-chat/tsconfig.json
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
"files": [],
"references": [
{
"path": "../../libraries/core"
"path": "../../libraries/legacy"
},
{
"path": "./tsconfig.app.json"
File renamed without changes.
10 changes: 9 additions & 1 deletion libraries/core/moon.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
type: 'library'
language: 'typescript'

workspace:
inheritedTasks:
exclude: ['build']

tasks:
build:
command: 'pnpm build'
inputs:
- '@group(app)'
- '@group(sources)'
outputs:
- 'esm'
- 'dist'
65 changes: 21 additions & 44 deletions libraries/core/package.json
Original file line number Diff line number Diff line change
@@ -1,57 +1,34 @@
{
"name": "@chatkitty/core",
"version": "1.11.0",
"description": "ChatKitty core JS package.",
"keywords": [
"node",
"lib",
"esm"
],
"author": "ChatKitty",
"name": "chatkitty",
"version": "2.6.1",
"description": "A powerful tool for integrating chat features into your web applications.",
"license": "MIT",
"repository": "https://github.com/ChatKitty/chatkitty-js",
"type": "module",
"files": [
"dist"
],
"main": "./dist/index.js",
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"scripts": {
"build": "node download-assets.js",
"release": "release-it --ci"
},
"packemon": {
"format": [
"esm"
],
"platform": "browser"
},
"engines": {
"node": ">=14.15.0"
},
"files": [
"esm/**/*",
"src/**/*"
],
"main": "./esm/index.js",
"module": "./esm/index.js",
"types": "./esm/index.d.ts",
"exports": {
"./package.json": "./package.json",
".": {
"types": "./esm/index.d.ts",
"import": "./esm/index.js"
}
"import": "./dist/index.mjs",
"require": "./dist/index.js",
"types": "./dist/index.d.ts"
},
"./esm": "./dist/index.mjs",
"./cjs": "./dist/index.js",
"./package.json": "./package.json"
},
"dependencies": {
"@stomp/rx-stomp": "^2.0.0",
"@stomp/stompjs": "^7.0.0",
"axios": "^0.27.2",
"base-64": "^1.0.0",
"rxjs": "^7.8.1",
"sockjs-client": "^1.6.1",
"text-encoding-polyfill": "^0.6.7",
"uuid": "^10.0.0"
},
"devDependencies": {
"@chatkitty/release-config": "workspace:*",
"@types/base-64": "^1.0.2",
"@types/node": "^22.7.5",
"@types/sockjs-client": "^1.5.4",
"@types/uuid": "^10.0.0"
"axios": "^1.5.1",
"lit-html": "^2.7.0",
"rxjs": "^7.2.0",
"uuid": "^9.0.0"
}
}
6 changes: 1 addition & 5 deletions libraries/core/tsconfig.json
Original file line number Diff line number Diff line change
@@ -3,11 +3,7 @@
"include": [
"**/*"
],
"references": [
{
"path": "../../tools/release-config"
}
],
"references": [],
"compilerOptions": {
"outDir": "../../.moon/cache/types/libraries/core"
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
7 changes: 7 additions & 0 deletions libraries/legacy/moon.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
type: 'library'
language: 'typescript'

tasks:
build:
outputs:
- 'esm'
57 changes: 57 additions & 0 deletions libraries/legacy/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
{
"name": "@chatkitty/core",
"version": "1.11.0",
"description": "ChatKitty core JS package.",
"keywords": [
"node",
"lib",
"esm"
],
"author": "ChatKitty",
"license": "MIT",
"repository": "https://github.com/ChatKitty/chatkitty-js",
"type": "module",
"scripts": {
"release": "release-it --ci"
},
"packemon": {
"format": [
"esm"
],
"platform": "browser"
},
"engines": {
"node": ">=14.15.0"
},
"files": [
"esm/**/*",
"src/**/*"
],
"main": "./esm/index.js",
"module": "./esm/index.js",
"types": "./esm/index.d.ts",
"exports": {
"./package.json": "./package.json",
".": {
"types": "./esm/index.d.ts",
"import": "./esm/index.js"
}
},
"dependencies": {
"@stomp/rx-stomp": "^2.0.0",
"@stomp/stompjs": "^7.0.0",
"axios": "^0.27.2",
"base-64": "^1.0.0",
"rxjs": "^7.8.1",
"sockjs-client": "^1.6.1",
"text-encoding-polyfill": "^0.6.7",
"uuid": "^10.0.0"
},
"devDependencies": {
"@chatkitty/release-config": "workspace:*",
"@types/base-64": "^1.0.2",
"@types/node": "^22.7.5",
"@types/sockjs-client": "^1.5.4",
"@types/uuid": "^10.0.0"
}
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
14 changes: 14 additions & 0 deletions libraries/legacy/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"extends": "../../tsconfig.options.json",
"include": [
"**/*"
],
"references": [
{
"path": "../../tools/release-config"
}
],
"compilerOptions": {
"outDir": "../../.moon/cache/types/libraries/legacy"
}
}
3 changes: 3 additions & 0 deletions libraries/react/tsconfig.json
Original file line number Diff line number Diff line change
@@ -6,6 +6,9 @@
},
{
"path": "./tsconfig.node.json"
},
{
"path": "../core"
}
],
"compilerOptions": {
15 changes: 0 additions & 15 deletions libraries/typescript/moon.yml

This file was deleted.

34 changes: 0 additions & 34 deletions libraries/typescript/package.json

This file was deleted.

10 changes: 0 additions & 10 deletions libraries/typescript/tsconfig.json

This file was deleted.

4 changes: 2 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -3,13 +3,13 @@
"files": [],
"references": [
{
"path": "libraries/core"
"path": "libraries/legacy"
},
{
"path": "libraries/react"
},
{
"path": "libraries/typescript"
"path": "libraries/core"
},
{
"path": "tools/release-config"