Skip to content

Commit

Permalink
feat: remove serialize-javascript
Browse files Browse the repository at this point in the history
  • Loading branch information
PFiS1737 committed Jul 10, 2024
1 parent c049397 commit f5be6a3
Show file tree
Hide file tree
Showing 10 changed files with 18 additions and 583 deletions.
5 changes: 1 addition & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,7 @@
"@minecraft/server": "1.12.0-beta.1.21.2-stable",
"@minecraft/server-ui": "1.2.0-beta.1.21.2-stable",
"@minecraft/vanilla-data": "^1.21.2",
"md5": "^2.3.0",
"polyfill-crypto.getrandomvalues": "^1.0.0",
"serialize-javascript": "^6.0.2"
"md5": "^2.3.0"
},
"devDependencies": {
"@biomejs/biome": "^1.8.3",
Expand All @@ -35,7 +33,6 @@
"@swc/core": "^1.6.13",
"@types/gulp": "^4.0.17",
"@types/md5": "^2.3.5",
"@types/serialize-javascript": "^5.0.4",
"gulp": "^5.0.0",
"rollup": "^4.18.1",
"typescript": "^5.5.3"
Expand Down
40 changes: 0 additions & 40 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 1 addition & 3 deletions src/lib/database/Database.class.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import md5 from "md5"
// @ts-ignore
import { serialize } from "serialize-javascript"

import { asyncRun, getOrAddObjective } from "../util/game"
import { deserialize, each, eachAsync } from "../util/index"
import { deserialize, each, eachAsync, serialize } from "../util/index"

export const ALL_DATABASES = new Map()

Expand Down
5 changes: 0 additions & 5 deletions src/lib/option-manager/OptionItemSelection.class.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
// @ts-ignore
import { serialize } from "serialize-javascript"

import { each } from "../util/index"

import { EventEmitter } from "../EventEmitter.class"
Expand All @@ -19,8 +16,6 @@ export class OptionItemSelection {
this.description = description
this.values = new Map(
values.map((value) => {
if (typeof value[0] === "object" || value[0] === undefined)
value[0] = serialize(value[0])
if (value[0] === true && !value[1]) value[1] = "开启"
else if (value[0] === false && !value[1]) value[1] = "关闭"
return value
Expand Down
9 changes: 0 additions & 9 deletions src/lib/randombytes.js

This file was deleted.

27 changes: 0 additions & 27 deletions src/lib/serialize-javascript/LICENSE

This file was deleted.

164 changes: 0 additions & 164 deletions src/lib/serialize-javascript/README.md

This file was deleted.

Loading

0 comments on commit f5be6a3

Please sign in to comment.