build: bumped deps
This commit is contained in:
parent
12861d6d02
commit
cf9739fa8a
9 changed files with 1013 additions and 590 deletions
|
@ -1,11 +1,11 @@
|
|||
/// <reference types="vitest" />
|
||||
import { defineConfig, mergeConfig } from 'vite'
|
||||
import { mergeConfig } from 'vite'
|
||||
import { nodePolyfills } from 'vite-plugin-node-polyfills'
|
||||
|
||||
import baseConfig from './vite.mjs'
|
||||
import { fixupCjs } from './vite-utils/fixup-cjs'
|
||||
|
||||
export default mergeConfig(baseConfig, defineConfig({
|
||||
export default mergeConfig(baseConfig, {
|
||||
test: {
|
||||
browser: {
|
||||
enabled: true,
|
||||
|
@ -36,7 +36,12 @@ export default mergeConfig(baseConfig, defineConfig({
|
|||
},
|
||||
})
|
||||
],
|
||||
build: {
|
||||
rollupOptions: {
|
||||
external: ['bun:sqlite']
|
||||
}
|
||||
},
|
||||
define: {
|
||||
'import.meta.env.TEST_ENV': '"browser"'
|
||||
}
|
||||
}))
|
||||
})
|
||||
|
|
|
@ -25,5 +25,13 @@ export default defineConfig({
|
|||
},
|
||||
define: {
|
||||
'import.meta.env.TEST_ENV': '"node"'
|
||||
}
|
||||
},
|
||||
optimizeDeps: {
|
||||
esbuildOptions: {
|
||||
// for WHATEVER REASON browserify-zlib uses `global` and it dies in browser lol
|
||||
define: {
|
||||
global: 'globalThis',
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
|
|
26
package.json
26
package.json
|
@ -34,7 +34,7 @@
|
|||
"test:browser:dev": "vitest --config .config/vite.browser.mts watch",
|
||||
"lint": "eslint .",
|
||||
"lint:ci": "NODE_OPTIONS=\\\"--max_old_space_size=8192\\\" eslint --config .config/eslint.ci.js .",
|
||||
"lint:tsc": "rimraf packages/**/dist && pnpm -r --workspace-concurrency=4 exec tsc --build",
|
||||
"lint:tsc": "rimraf packages/**/dist packages/**/*.tsbuildinfo && pnpm -r --workspace-concurrency=4 exec tsc --build",
|
||||
"lint:tsc:ci": "pnpm -r exec tsc --build",
|
||||
"lint:dpdm": "dpdm -T --no-warning --no-tree --exit-code circular:1 packages/*",
|
||||
"lint:fix": "eslint --fix .",
|
||||
|
@ -50,34 +50,34 @@
|
|||
"@types/ws": "8.5.4",
|
||||
"@typescript-eslint/eslint-plugin": "6.4.0",
|
||||
"@typescript-eslint/parser": "6.4.0",
|
||||
"@vitest/browser": "1.4.0",
|
||||
"@vitest/coverage-v8": "1.4.0",
|
||||
"@vitest/expect": "1.4.0",
|
||||
"@vitest/spy": "1.4.0",
|
||||
"@vitest/ui": "1.4.0",
|
||||
"@vitest/browser": "2.0.5",
|
||||
"@vitest/coverage-v8": "2.0.5",
|
||||
"@vitest/expect": "2.0.5",
|
||||
"@vitest/spy": "2.0.5",
|
||||
"@vitest/ui": "2.0.5",
|
||||
"chai": "5.1.0",
|
||||
"cjs-module-lexer": "1.2.3",
|
||||
"dotenv-flow": "3.2.0",
|
||||
"dotenv-flow": "4.1.0",
|
||||
"dpdm": "3.14.0",
|
||||
"esbuild": "0.18.20",
|
||||
"esbuild": "0.23.0",
|
||||
"eslint": "8.47.0",
|
||||
"eslint-config-prettier": "8.8.0",
|
||||
"eslint-import-resolver-typescript": "3.6.0",
|
||||
"eslint-plugin-ascii": "1.0.0",
|
||||
"eslint-plugin-import": "2.28.0",
|
||||
"eslint-plugin-simple-import-sort": "10.0.0",
|
||||
"glob": "10.2.6",
|
||||
"glob": "11.0.0",
|
||||
"playwright": "1.42.1",
|
||||
"prettier": "3.0.3",
|
||||
"rimraf": "5.0.1",
|
||||
"rimraf": "6.0.1",
|
||||
"semver": "7.5.1",
|
||||
"ts-node": "10.9.1",
|
||||
"tsconfig-paths": "4.2.0",
|
||||
"typedoc": "0.25.12",
|
||||
"typedoc": "0.26.5",
|
||||
"typescript": "5.4.3",
|
||||
"vite": "5.1.6",
|
||||
"vite-plugin-node-polyfills": "0.21.0",
|
||||
"vitest": "1.4.0"
|
||||
"vite-plugin-node-polyfills": "0.22.0",
|
||||
"vitest": "2.0.5"
|
||||
},
|
||||
"packageManager": "pnpm@9.0.6",
|
||||
"prettier": "./.config/prettier.cjs",
|
||||
|
|
|
@ -10,7 +10,7 @@ describe('logger', () => {
|
|||
const mgr = new LogManager()
|
||||
mgr.level = LogManager.INFO
|
||||
|
||||
const spy = vi.fn<Parameters<typeof mgr.handler>>()
|
||||
const spy = vi.fn<typeof mgr.handler>()
|
||||
mgr.handler = spy
|
||||
|
||||
return [mgr, spy] as const
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
"dependencies": {
|
||||
"colorette": "2.0.20",
|
||||
"cross-spawn": "7.0.3",
|
||||
"glob": "10.2.6",
|
||||
"glob": "11.0.0",
|
||||
"handlebars": "4.7.8",
|
||||
"inquirer": "9.2.11",
|
||||
"openurl": "1.1.1"
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import { Readable } from 'stream'
|
||||
import { describe, expect, it } from 'vitest'
|
||||
|
||||
import { nodeStreamToWeb, webStreamToNode } from './stream-utils.js'
|
||||
|
||||
if (import.meta.env.TEST_ENV === 'node' || import.meta.env.TEST_ENV === 'bun') {
|
||||
const { nodeStreamToWeb, webStreamToNode } = await import('./stream-utils.js')
|
||||
|
||||
describe('nodeStreamToWeb', () => {
|
||||
it('should correctly convert a readable stream', async () => {
|
||||
const stream = new Readable({
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
"@mtcute/node": "workspace:^",
|
||||
"@mtcute/web": "workspace:^",
|
||||
"@mtcute/tl": "workspace:*",
|
||||
"vitest": "^1.4.0"
|
||||
"vitest": "*"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"@mtcute/node": {
|
||||
|
|
|
@ -53,7 +53,7 @@ export function useFakeMathRandom(source = DEFAULT_ENTROPY): void {
|
|||
const sourceBytes = getPlatform().hexDecode(source)
|
||||
const dv = dataViewFromBuffer(sourceBytes)
|
||||
|
||||
let spy: MockInstance<[], number>
|
||||
let spy: MockInstance<() => number>
|
||||
|
||||
beforeEach(() => {
|
||||
let offset = 0
|
||||
|
|
1544
pnpm-lock.yaml
1544
pnpm-lock.yaml
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue