Skip to content

Commit

Permalink
removing unnecessary v8 dependency (#834)
Browse files Browse the repository at this point in the history
* removing unnecessary v8 dependency

* Create kind-stingrays-sniff.md

---------

Co-authored-by: Jack Steam <[email protected]>
  • Loading branch information
tstachl and jacksteamdev authored Jan 6, 2025
1 parent 8915813 commit 136c34f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
5 changes: 5 additions & 0 deletions .changeset/kind-stingrays-sniff.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@crxjs/vite-plugin": patch
---

removing unnecessary v8 dependency
5 changes: 0 additions & 5 deletions packages/vite-plugin/src/node/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { simple } from 'acorn-walk'
import { createHash as _hash } from 'crypto'
import debug from 'debug'
import { AcornNode, OutputBundle, PluginContext } from 'rollup'
import v8 from 'v8'
import type {
ManifestV3,
WebAccessibleResourceById,
Expand All @@ -17,10 +16,6 @@ import type {

export const _debug = (id: string) => debug('crx').extend(id)

export const structuredClone = <T>(obj: T): T => {
return v8.deserialize(v8.serialize(obj))
}

export const hash = (data: string, length = 5): string =>
_hash('sha1')
.update(data)
Expand Down
1 change: 0 additions & 1 deletion packages/vite-plugin/src/node/plugin-manifest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import {
decodeManifest,
encodeManifest,
isString,
structuredClone,
} from './helpers'
import { ManifestV3 } from './manifest'
import { basename, isAbsolute, join, relative } from './path'
Expand Down

0 comments on commit 136c34f

Please sign in to comment.