Skip to content

Commit

Permalink
fix: static report does not work
Browse files Browse the repository at this point in the history
  • Loading branch information
nonzzz committed Jun 18, 2024
1 parent fd033ab commit 3a23367
Show file tree
Hide file tree
Showing 15 changed files with 5,457 additions and 7,347 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
node-version: 21
- name: Install Dependices
run: make

Expand Down
2 changes: 1 addition & 1 deletion .node-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v20.4.0
v21.7.1
893 changes: 0 additions & 893 deletions .yarn/releases/yarn-4.1.1.cjs

This file was deleted.

17 changes: 0 additions & 17 deletions .yarnrc.yml

This file was deleted.

18 changes: 9 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
install:
@echo "Using berry to install dependencies..."
corepack enable
yarn install
pnpm install

client-analyze:
@echo "Analyzing client code..."
@yarn run vite build src/client --config analyze.config.mts
@pnpm run vite build src/client --config analyze.config.mts
awk '{ print }' dist/client/stats.json > src/client/data.json

build-all:cleanup build-server build-client
Expand All @@ -15,28 +15,28 @@ cleanup:

build-client:
@echo "Building client code..."
@yarn run vite build src/client
@pnpm exec vite build src/client

build-server:
@echo "Building server code..."
@yarn run rollup --config rollup.config.ts --configPlugin swc3
@pnpm exec rollup --config rollup.config.ts --configPlugin swc3

dev-server:
@echo "Starting server in development mode..."
@yarn run rollup --config rollup.config.ts --configPlugin swc3 --watch
@pnpm exec rollup --config rollup.config.ts --configPlugin swc3 --watch

dev-client:
@echo "Starting client in development mode..."
@yarn run vite src/client
@pnpm exec vite src/client

test:
@echo "Running tests..."
@yarn run test
@pnpm run test

lint:
@echo "Linting code..."
@yarn run lint
@pnpm run lint

format:
@echo "Formatting code..."
yarn exec dprint fmt
pnpm exec dprint fmt
2 changes: 1 addition & 1 deletion examples/vue/src/worker/worker.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { recoverMessage } from './sub'

self.onmessage = function(event) {
self.onmessage = function (event) {
const { data } = event
if (data.kind === 'test') {
recoverMessage()
Expand Down
2 changes: 1 addition & 1 deletion examples/vue/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ import Components from 'unplugin-vue-components/vite'
import { analyzer } from 'vite-bundle-analyzer'

export default defineConfig({
plugins: [vue(), Components({ resolvers: [VarletUIResolver()] }), analyzer({ analyzerMode: 'server', openAnalyzer: true })]
plugins: [vue(), Components({ resolvers: [VarletUIResolver()] }), analyzer({ analyzerMode: 'static', openAnalyzer: true })]
})
4 changes: 2 additions & 2 deletions global.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
type DeepPartial<T> = T extends object ? {
[P in keyof T]?: DeepPartial<T[P]>
} :
[P in keyof T]?: DeepPartial<T[P]>
} :
T
127 changes: 64 additions & 63 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
{
"name": "vite-bundle-analyzer",
"packageManager": "yarn@4.1.1",
"version": "0.10.2",
"description": "a vite bundle analyzer",
"main": "dist/index.js",
"module": "dist/index.mjs",
"types": "dist/index.d.ts",
"workspaces": [
"examples/**/*"
],
"exports": {
".": {
"types": "./dist/index.d.ts",
Expand All @@ -19,7 +15,7 @@
"scripts": {
"dev": "vite src/client",
"dev:plugin": "rollup --config rollup.config.ts --configPlugin swc3 --watch",
"build": "yarn build:client & yarn build:plugin",
"build": "pnpm run build:client & pnpm run build:plugin",
"build:client": "vite build src/client",
"build:plugin": "rollup --config rollup.config.ts --configPlugin swc3",
"test": "c8 -r=lcov ava __tests__/*.spec.ts",
Expand All @@ -30,7 +26,7 @@
"@iconify-json/ph": "^1.1.12",
"@jridgewell/source-map": "^0.3.6",
"@jridgewell/trace-mapping": "^0.3.25",
"@rollup/plugin-esm-shim": "patch:@rollup/plugin-esm-shim@npm%3A0.1.6#~/.yarn/patches/@rollup-plugin-esm-shim-npm-0.1.6-d8e3018c76.patch",
"@rollup/plugin-esm-shim": "^0.1.7",
"@rollup/plugin-json": "^6.1.0",
"@rollup/plugin-node-resolve": "^15.2.3",
"@stylex-extend/core": "^0.3.1",
Expand Down Expand Up @@ -64,66 +60,71 @@
},
"license": "MIT",
"author": "kanno",
"resolutions": {
"vite": "^5.2.8",
"array-buffer-byte-length": "npm:@nolyfill/array-buffer-byte-length@latest",
"array-includes": "npm:@nolyfill/array-includes@latest",
"array.prototype.flat": "npm:@nolyfill/array.prototype.flat@latest",
"array.prototype.flatmap": "npm:@nolyfill/array.prototype.flatmap@latest",
"array.prototype.tosorted": "npm:@nolyfill/array.prototype.tosorted@latest",
"arraybuffer.prototype.slice": "npm:@nolyfill/arraybuffer.prototype.slice@latest",
"asynciterator.prototype": "npm:@nolyfill/asynciterator.prototype@latest",
"available-typed-arrays": "npm:@nolyfill/available-typed-arrays@latest",
"define-properties": "npm:@nolyfill/define-properties@latest",
"es-iterator-helpers": "npm:@nolyfill/es-iterator-helpers@latest",
"es-set-tostringtag": "npm:@nolyfill/es-set-tostringtag@latest",
"function-bind": "npm:@nolyfill/function-bind@latest",
"function.prototype.name": "npm:@nolyfill/function.prototype.name@latest",
"get-symbol-description": "npm:@nolyfill/get-symbol-description@latest",
"globalthis": "npm:@nolyfill/globalthis@latest",
"gopd": "npm:@nolyfill/gopd@latest",
"has": "npm:@nolyfill/has@latest",
"has-property-descriptors": "npm:@nolyfill/has-property-descriptors@latest",
"has-proto": "npm:@nolyfill/has-proto@latest",
"has-symbols": "npm:@nolyfill/has-symbols@latest",
"has-tostringtag": "npm:@nolyfill/has-tostringtag@latest",
"internal-slot": "npm:@nolyfill/internal-slot@latest",
"is-array-buffer": "npm:@nolyfill/is-array-buffer@latest",
"is-date-object": "npm:@nolyfill/is-date-object@latest",
"is-generator-function": "npm:@nolyfill/is-generator-function@latest",
"is-regex": "npm:@nolyfill/is-regex@latest",
"is-shared-array-buffer": "npm:@nolyfill/is-shared-array-buffer@latest",
"is-string": "npm:@nolyfill/is-string@latest",
"is-symbol": "npm:@nolyfill/is-symbol@latest",
"is-weakref": "npm:@nolyfill/is-weakref@latest",
"iterator.prototype": "npm:@nolyfill/iterator.prototype@latest",
"object-keys": "npm:@nolyfill/object-keys@latest",
"object.assign": "npm:@nolyfill/object.assign@latest",
"object.entries": "npm:@nolyfill/object.entries@latest",
"object.fromentries": "npm:@nolyfill/object.fromentries@latest",
"object.hasown": "npm:@nolyfill/object.hasown@latest",
"object.values": "npm:@nolyfill/object.values@latest",
"reflect.getprototypeof": "npm:@nolyfill/reflect.getprototypeof@latest",
"regexp.prototype.flags": "npm:@nolyfill/regexp.prototype.flags@latest",
"safe-array-concat": "npm:@nolyfill/safe-array-concat@latest",
"safe-regex-test": "npm:@nolyfill/safe-regex-test@latest",
"side-channel": "npm:@nolyfill/side-channel@latest",
"string.prototype.matchall": "npm:@nolyfill/string.prototype.matchall@latest",
"string.prototype.trim": "npm:@nolyfill/string.prototype.trim@latest",
"string.prototype.trimend": "npm:@nolyfill/string.prototype.trimend@latest",
"string.prototype.trimstart": "npm:@nolyfill/string.prototype.trimstart@latest",
"typed-array-buffer": "npm:@nolyfill/typed-array-buffer@latest",
"typed-array-byte-length": "npm:@nolyfill/typed-array-byte-length@latest",
"typed-array-byte-offset": "npm:@nolyfill/typed-array-byte-offset@latest",
"typed-array-length": "npm:@nolyfill/typed-array-length@latest",
"unbox-primitive": "npm:@nolyfill/unbox-primitive@latest",
"which-boxed-primitive": "npm:@nolyfill/which-boxed-primitive@latest",
"which-typed-array": "npm:@nolyfill/which-typed-array@latest",
"@types/react": "^18.2.31"
},
"dependencies": {
"picocolors": "^1.0.0"
},
"pnpm": {
"overrides": {
"vite": "^5.2.8",
"array-buffer-byte-length": "npm:@nolyfill/array-buffer-byte-length@latest",
"array-includes": "npm:@nolyfill/array-includes@latest",
"array.prototype.flat": "npm:@nolyfill/array.prototype.flat@latest",
"array.prototype.flatmap": "npm:@nolyfill/array.prototype.flatmap@latest",
"array.prototype.tosorted": "npm:@nolyfill/array.prototype.tosorted@latest",
"arraybuffer.prototype.slice": "npm:@nolyfill/arraybuffer.prototype.slice@latest",
"asynciterator.prototype": "npm:@nolyfill/asynciterator.prototype@latest",
"available-typed-arrays": "npm:@nolyfill/available-typed-arrays@latest",
"define-properties": "npm:@nolyfill/define-properties@latest",
"es-iterator-helpers": "npm:@nolyfill/es-iterator-helpers@latest",
"es-set-tostringtag": "npm:@nolyfill/es-set-tostringtag@latest",
"function-bind": "npm:@nolyfill/function-bind@latest",
"function.prototype.name": "npm:@nolyfill/function.prototype.name@latest",
"get-symbol-description": "npm:@nolyfill/get-symbol-description@latest",
"globalthis": "npm:@nolyfill/globalthis@latest",
"gopd": "npm:@nolyfill/gopd@latest",
"has": "npm:@nolyfill/has@latest",
"has-property-descriptors": "npm:@nolyfill/has-property-descriptors@latest",
"has-proto": "npm:@nolyfill/has-proto@latest",
"has-symbols": "npm:@nolyfill/has-symbols@latest",
"has-tostringtag": "npm:@nolyfill/has-tostringtag@latest",
"internal-slot": "npm:@nolyfill/internal-slot@latest",
"is-array-buffer": "npm:@nolyfill/is-array-buffer@latest",
"is-date-object": "npm:@nolyfill/is-date-object@latest",
"is-generator-function": "npm:@nolyfill/is-generator-function@latest",
"is-regex": "npm:@nolyfill/is-regex@latest",
"is-shared-array-buffer": "npm:@nolyfill/is-shared-array-buffer@latest",
"is-string": "npm:@nolyfill/is-string@latest",
"is-symbol": "npm:@nolyfill/is-symbol@latest",
"is-weakref": "npm:@nolyfill/is-weakref@latest",
"iterator.prototype": "npm:@nolyfill/iterator.prototype@latest",
"object-keys": "npm:@nolyfill/object-keys@latest",
"object.assign": "npm:@nolyfill/object.assign@latest",
"object.entries": "npm:@nolyfill/object.entries@latest",
"object.fromentries": "npm:@nolyfill/object.fromentries@latest",
"object.hasown": "npm:@nolyfill/object.hasown@latest",
"object.values": "npm:@nolyfill/object.values@latest",
"reflect.getprototypeof": "npm:@nolyfill/reflect.getprototypeof@latest",
"regexp.prototype.flags": "npm:@nolyfill/regexp.prototype.flags@latest",
"safe-array-concat": "npm:@nolyfill/safe-array-concat@latest",
"safe-regex-test": "npm:@nolyfill/safe-regex-test@latest",
"side-channel": "npm:@nolyfill/side-channel@latest",
"string.prototype.matchall": "npm:@nolyfill/string.prototype.matchall@latest",
"string.prototype.trim": "npm:@nolyfill/string.prototype.trim@latest",
"string.prototype.trimend": "npm:@nolyfill/string.prototype.trimend@latest",
"string.prototype.trimstart": "npm:@nolyfill/string.prototype.trimstart@latest",
"typed-array-buffer": "npm:@nolyfill/typed-array-buffer@latest",
"typed-array-byte-length": "npm:@nolyfill/typed-array-byte-length@latest",
"typed-array-byte-offset": "npm:@nolyfill/typed-array-byte-offset@latest",
"typed-array-length": "npm:@nolyfill/typed-array-length@latest",
"unbox-primitive": "npm:@nolyfill/unbox-primitive@latest",
"which-boxed-primitive": "npm:@nolyfill/which-boxed-primitive@latest",
"which-typed-array": "npm:@nolyfill/which-typed-array@latest",
"@types/react": "^18.2.31"
},
"patchedDependencies": {
"@rollup/plugin-esm-shim@0.1.7": "patches/@rollup__plugin-esm-shim@0.1.7.patch"
}
},
"files": [
"dist",
"LICENSE",
Expand Down
Loading

0 comments on commit 3a23367

Please sign in to comment.