bmeurer/async-hooks-performance-impact 56
Performance impact of async_hooks
This is my fork of the CocoaHTTPServer. CocoaHTTPServer is a small, lightweight, embeddable HTTP server for Mac OS X and iOS applications.
My personal website.
Collection of various useful Objective-C classes and categories.
ARES-6 JavaScript benchmark
bmeurer/angular-tour-of-heroes 4
The Angular Tour of Heroes Tutorial
AnTeX provides Ant tasks for various TeX related stuff.
A small, fast, JavaScript-based JavaScript parser
:tropical_fish: Babel is a compiler for writing next generation JavaScript.
Compiler infrastructure and toolchain library for WebAssembly
issue commentvitejs/vite
Source files are not ignored with `sourcemapIgnoreList` setting configured
My understanding of this is limited, but I think @danielroe explained to me that Vite is doing some optimized deps, and it looks like for that step we don't apply the predicate?
comment created time in 8 hours
issue commentvitejs/vite
Confusing `@fs` prefix for some files
@patak-dev, @bluwy, and @dominikg had some thoughts here regarding potential out-of-root resources. In this case the resource isn't out of root.
comment created time in 9 days
issue openedvitejs/vite
Confusing `@fs` prefix for some files
Describe the bug
I noticed this earlier when I was testing different versions of Vite locally, but now I'm also getting this with regular setups: Some paths sometimes end up as absolute and prefixed with @fs
. Most recent example with npm init solid
from today:
cc @jaro-sevcik
Reproduction
https://drive.google.com/file/d/1R0rix01pglrxyu-skX0r7W25KVsMU_vx/view
Steps to reproduce
mkdir solid-start
cd solid-start
npm init solid # selected todomvc, SSR and no TS
npm install
npm run dev
System Info
System:
OS: Linux 5.19 Debian GNU/Linux rodete 12 (rodete)
CPU: (128) x64 AMD EPYC 7B12
Memory: 470.09 GB / 503.87 GB
Container: Yes
Shell: 5.9 - /usr/bin/zsh
Binaries:
Node: 18.10.0 - ~/.nvm/versions/node/v18.10.0/bin/node
npm: 8.19.2 - ~/.nvm/versions/node/v18.10.0/bin/npm
Browsers:
Chrome: 111.0.5563.64
Firefox: 102.7.0esr
Used Package Manager
npm
Logs
No response
Validations
- [X] Follow our Code of Conduct
- [X] Read the Contributing Guidelines.
- [X] Read the docs.
- [X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- [X] Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to vuejs/core instead.
- [X] Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- [X] The provided reproduction is a minimal reproducible example of the bug.
created time in 11 days
pull request commentvitejs/vite
fix: use relative source path in sourcemapIgnoreList
If we have 2 votes going with absolute paths, then I guess we could leave it then 😄 It might be good to note in the docs of the difference with rollup too, and/or note that they are absolute paths by default.
+1 to updating the docs
comment created time in 23 days
pull request commentvitejs/vite
fix: use relative source path in sourcemapIgnoreList
I also think that having absolute paths here is the right thing to do here. If we learn in the future that it'd be beneficial to have (project) relative paths, and there are concrete use cases that don't work with absolute paths, we can always go back and re-investigate.
comment created time in 23 days
pull request commentvitejs/vite
Note that if you override sourcemapIgnoreList
on the framework level, you'll still need to check for node_modules
yourself.
comment created time in 23 days
push eventbmeurer/lit
commit sha 9926bf2be40e553c54ca113a3240728c11103e19
Initial commit. Adapted from traditional-virtualization branch of virtual-scroller.
commit sha 70a2b226b6dde53709ea5979260812eee464e91f
refining lit API, moving container styling logic into core VirtualScroller, fixing bugs
commit sha 9f90981d6c6c5f8b9dde7bbda01705381684958e
Make Shadow DOM optional, fix a grid spacing bug
commit sha ec1c6ffd0fa6af5236bae118d4d3cda2243bec53
Make monorepo package name valid
commit sha 7e8e445a83acba780667a495865ca18b05d5a11b
Document VirtualRepeater methods
commit sha 248e6a8f22f2984089ce57a9298a558a01914782
Add basic lit element example
commit sha a249663bfa7e9b1f026c0242a321300f1550791e
add README
commit sha da9cea4f2cb54b2c3b1d8efb9b84e4d7dcef36d7
rearrange README
commit sha 90f54319e2f9ca3a788143cc3028dc21cf097f05
correct .scrollTarget description in README
commit sha a308d80abf20e3c94672e212471cfdb687c6d227
clarify monorepo status
commit sha feb044078a6f6aa9ca568fa181d330b2122fd967
scaffold testing with karma
commit sha 8593d0c22d5c2a6a03d345bb303d4a51ffb567ab
Expand on basic lit element test case
commit sha 16a9fb937e5014773fedef88a50ed9182dec01d2
Add docstrings in uni-virtual files
commit sha 81282810581439cb1a51df328ebccdd8ceec2780
reorganize lit-virtual src/
commit sha 92d6f5f88f518dcfe271daee4750206b00fbb4f7
reorganize uni-virtual src/
commit sha decaafe7ecd5604d71d05dce8f7c5e691cdadcc6
clean up old comments
commit sha 26cf5247d6e796aa38a34eaaa466617a852695b5
run rollup as a karma preprocessor step
commit sha dec49a4e78b811463d51e6ea940e2c4351a6f812
✨ beautify test reporting
commit sha 0847487b729fafec626cf937a59587a8aa6159e0
use lit-virtual/lib in examples
commit sha f25546bd406d64ad2655a7eb7efee8fd3e2ae9e4
rename lit-virtual to lit-virtualizer
push time in 25 days
issue openedRich-Harris/magic-string
`update` and `overwrite` don't take into account newlines in the replacement
Here's a tiny repro for the problem discovered in https://github.com/sveltejs/svelte/pull/8339/files#diff-0982cdc4ef56dbd22e3d1474590a2110feb82177e17a5c50ca60a806fdb0ce0d by @benmccann:
import MagicString from 'magic-string';
import open from 'open';
function magic_string_replace_all(src, search, replace) {
let idx = src.original.indexOf(search);
if (idx == -1) throw new Error('search not found in src');
do {
src.update(idx, idx + search.length, replace, {storeName: true});
} while ((idx = src.original.indexOf(search, idx + 1)) != -1);
}
const input = `h1 {
--replace-me-once: red;
}
h2 {
--replace-me-twice: green;
}
div {
--keep-me: blue;
}`;
const src = new MagicString(input);
magic_string_replace_all(src, '--replace-me-once', '\n --done-replace-once');
magic_string_replace_all(
src, '--replace-me-twice', '\n--almost-done-replace-twice');
const map = src.generateMap({hires: true});
const code = src.toString();
const url = 'https://sokra.github.io/source-map-visualization/#base64,' + [
code, JSON.stringify(map)
].concat(input).map(s => btoa(unescape(encodeURIComponent(s))));
open(url);
It will open the generated source map in Tobias' source map visualizer. You'll see that the mapping for the replaced words is broken now. Avoiding the newlines in the replacement strings fixes the problem and yields a proper mapping. The root cause here is that update
(and overwrite
) don't pay attention to potential newlines in the replacement strings, for adjusting the mapping at the point where the new string is inserted.
created time in a month
push eventbmeurer/magic-string
commit sha e238f04be31ec9a3e19b18b75bb5d859f9cb2654
feat: add the ability to ignore-list sources (#243) Co-authored-by: Anthony Fu <anthonyfu117@hotmail.com>
commit sha 34935df2d22cee89f6bdadf8503d9a31602393bd
chore: release v0.30.0
commit sha 2d1fc91c73b167856369eaf373c71ad09c1a27cc
chore: add Node 18 to CI (#247)
push time in a month
Pull request review commentnuxt/nuxt
feat(vite): add `node_modules` and buildDir to `x_google_ignoreList`
export async function bundle (nuxt: Nuxt) { copyPublicDir: false, rollupOptions: { output: {+ sourcemapIgnoreList: (relativeSourcePath) => {+ return relativeSourcePath.includes('/node_modules/') || relativeSourcePath.includes(ctx.nuxt.options.buildDir)
Does this work on Windows? For rollup
I had to change it to relativeSourcePath.includes('node_modules')
to make the test pass on the Windows bot.
comment created time in a month
Pull request review commentvitejs/vite
fix: avoid null sourcePath in `server.sourcemapIgnoreList`
async function loadAndTransform( // Rewrite sources to relative paths to give debuggers the chance // to resolve and display them in a meaningful way (rather than // with absolute paths).- if (- sourcePath &&- path.isAbsolute(sourcePath) &&- path.isAbsolute(mod.file)- ) {+ if (path.isAbsolute(sourcePath) && path.isAbsolute(mod.file)) { map.sources[sourcesIndex] = path.relative(
SGTM.
comment created time in a month
Pull request review commentvitejs/vite
fix: avoid null sourcePath in `server.sourcemapIgnoreList`
async function loadAndTransform( // Rewrite sources to relative paths to give debuggers the chance // to resolve and display them in a meaningful way (rather than // with absolute paths).- if (- sourcePath &&- path.isAbsolute(sourcePath) &&- path.isAbsolute(mod.file)- ) {+ if (path.isAbsolute(sourcePath) && path.isAbsolute(mod.file)) { map.sources[sourcesIndex] = path.relative(
rollup passes project relative paths. I guess that would be fine here as well, but I'm not sure how to reconstruct the project relative paths here.
comment created time in a month
push eventbmeurer/vite
commit sha 33a38db867c84c888006dce561aa26b419a2eaec
fix(cli): after setting server.open, the default open is inconsistent… (#11974)
commit sha 59e9b078ba066ee930021c2c87fbc3c79613298a
docs(dep-optimization): add disabled API (#12066) Co-authored-by: 秦旭洋 <qinxuyang@bytedance.com> Co-authored-by: bluwy <bjornlu.dev@gmail.com>
commit sha 7b9df65c749d4d20c460c4e10d8622a36fe4fba1
docs(api-plugin): update server-to-client exampel (#12182)
commit sha ebbd5876483c989f5182103a294391a9a8a7bd91
docs(build): note chunkSizeWarningLimit compare with uncompressed size (#12183)
commit sha 8477b07d2b302aa360a3db64d4c3543522be2932
docs: added custom logger info (#10108) Co-authored-by: 翠 / green <green@sapphi.red> Co-authored-by: bluwy <bjornlu.dev@gmail.com>
commit sha 8f57a18c0cf14f64bf6cb7441b0341e4ac6d74ed
docs(api-hmr): note intellisense for import.meta.hot (#12184)
commit sha 3d3788d5518350dd989659548ce0610134781851
docs(prebundling): update latest options and behaviour (#12179)
commit sha a60c38bcf9c801be27066366635e1b6fa029f713
chore: allow context comment for ecosystem-ci run in PR (#12192)
commit sha b8cdc920a993fd67d9e97a2576896cc4351a1a83
docs: add date to announcement blog posts (#12193)
commit sha 9cca30d998a24e58a2e2871a5d95ba508d012dd4
fix(css): should not rebase http url for less (fix: #12155) (#12195)
commit sha 20636489ab67337dddc9421524424cefb62a1299
fix(client-inject): replace globalThis.process.env.NODE_ENV (fix #12185) (#12194)
commit sha 7110ddf39b3b6f122945bbbc5025773c64f9d948
chore(create-vite): update volar link in helloworld components (#12145)
commit sha 8a98aef89c2d170e063aab34b24dc49c37dc9e46
feat: ignore list client injected sources (#12170)
commit sha 2aad5522dcd30050ef049170825287dfa0d0aa42
refactor(importAnalysis): cache injected env string (#12154) Co-authored-by: bluwy <bjornlu.dev@gmail.com>
commit sha e4215009f5ac436daff998bd8ee33f9a7cd09725
docs(api-plugin): note plugin options extended properties (#12181)
commit sha b90bc1f24286b8831e504f69902fd0557855739e
build: correct d.ts output dir in development (#12212)
commit sha bcbc58201339a9ea5856327c2e697762d7b14449
fix: use relative paths in `sources` for transformed source maps (#12079)
commit sha bf9c49f521b7a6730231c35754d5e1f9c3a6a16e
release: v4.2.0-beta.0
commit sha a8fa9cc704bb9a697975e95179dfe21ab4e1d8de
chore: config codeflow and add to docs (#12222)
commit sha e701277b5fc402a8ad9da363472a4c8da2533d55
chore: add plugin-legacy override to codeflow config (#12229)
push time in a month
push eventbmeurer/rollup
commit sha cb64e1ac397789e978647cb59726d93ec4841446
fix: style optimization in dark mode (#4870) Co-authored-by: 李众豪 <lizhonghao@fsyhlz.com>
commit sha a9de15d625e4b007bfa098f990e89062586f7b04
fix: wrong params of the transform hook (#4876) Co-authored-by: Lukas Taegert-Atkinson <lukastaegert@users.noreply.github.com>
commit sha 0e4d534eda68bf4343e813b26aac08edbec0cf51
Improve test stability (#4878) * Refactor CLI test runner * Add retry option to tests and improve timeout handling * Try using different termination signals
commit sha fa4e9a5fd037e94759390595f867220fa0af8a3e
Fix transformation of `import.meta.url` in CommonJS (#4875) * Fix transformation of `import.meta.url` in CommonJS * Fix test on Windows, add helper functions --------- Co-authored-by: Lukas Taegert-Atkinson <lukastaegert@users.noreply.github.com>
commit sha d7cbebda78722955e2c18bc0f322962b7acb53e5
3.17.3
commit sha 1ab9833b4ca39ad7f5303943a7658b03f93ff109
build: use @rollup/plugin-replace to replace chokidar fsevents (#4880)
commit sha 3d9d107c519b6e8bc44e36b554576ba427c30d95
feat: mark files in a `node_modules` as ignore-listed by default (#4877) Following up on the addition of the `sourcemapIgnoreList` output option, this adds a default which marks all files within a `node_modules` folder as ignore-listed. This way most projects using rollup will need no additional configuration regarding the ignore-listing and automatically benefit. This also allows to specify `false` for the `sourcemapIgnoreList` output option, which completely disables the generation of an ignore-list. Doc: https://goo.gle/devtools-ignoreList-adoption
commit sha 96f2eb163fe25ec052e95cfa9c8a3ee9e28b4fbd
Add experimental logging for side effects (#4871) * Add logging * Add logging for side effects * Only log top-level effects * Use warnings with code frame instead * Turn into experimentalLogSideEffects feature * Add docs * Fix tests * 3.18.0-0
commit sha 25bdc129d21685b69a00ee55397d42ac6eff6449
Refactor (#4887) * Remove unused loop * Use Map * Chain method calls --------- Co-authored-by: Lukas Taegert-Atkinson <lukastaegert@users.noreply.github.com>
commit sha 80ae449b53a4f9a7a5c5d8dd7ce9162c030ace09
3.18.0
push time in a month
pull request commentvitejs/vite
feat: add `sourcemapIgnoreList` configuration option
Thanks folks! Now we'll also need to update rollup
to 3.18.0 to include https://github.com/rollup/rollup/pull/4877
comment created time in a month
delete branch bmeurer/rollup
delete branch : feat/ignoreList_node_modules_default
delete time in a month
Pull request review commentvitejs/vite
feat(vite): add `sourcemapIgnoreList` configuration option
export interface ServerOptions extends CommonServerOptions { * @default true */ preTransformRequests?: boolean+ /**+ * Whether or not to ignore-list source files in the dev server sourcemap, used to populate+ * the [`x_google_ignoreList` source map extension](https://developer.chrome.com/blog/devtools-better-angular-debugging/#the-x_google_ignorelist-source-map-extension).+ * By default, it excludes all paths containing `/node_modules/`.+ */+ sourcemapIgnoreList?: (sourcePath: string, sourcemapPath: string) => boolean
Per suggestion from @lukastaegert, I updated https://github.com/rollup/rollup/pull/4877 to allow for boolean
s here as well, meaning you can disable the ignore-listing completely via sourcemapIgnoreList: false
. I think it'd be good to also use the same logic here in vite then.
comment created time in a month
pull request commentrollup/rollup
feat: mark files in a `node_modules` as ignore-listed by default
Thank you!
While I approve the change in general, now the only way to switch it off is to pass a function that always returns
false
. I think we should adjust the types and handling slightly:
- E.g. allow an explicit
false
to turn off the feature. That would be consistent with how this works for other options liketreeshake
orwatch
- Either translate
false
to an "always false" predicate and have always a function in thenormalizedOutputOptions
, or hand through thefalse
value. I am slightly leaning to the former approach of always having a function for simplicity. In that case, we can remove the conditional logic inrenderChunks
that is currently not covered.And of course, documentation should be adapted to show the new types and explain the default logic.
Done, thanks!
comment created time in a month
push eventbmeurer/rollup
commit sha cb64e1ac397789e978647cb59726d93ec4841446
fix: style optimization in dark mode (#4870) Co-authored-by: 李众豪 <lizhonghao@fsyhlz.com>
commit sha a9de15d625e4b007bfa098f990e89062586f7b04
fix: wrong params of the transform hook (#4876) Co-authored-by: Lukas Taegert-Atkinson <lukastaegert@users.noreply.github.com>
commit sha 0e4d534eda68bf4343e813b26aac08edbec0cf51
Improve test stability (#4878) * Refactor CLI test runner * Add retry option to tests and improve timeout handling * Try using different termination signals
commit sha fa4e9a5fd037e94759390595f867220fa0af8a3e
Fix transformation of `import.meta.url` in CommonJS (#4875) * Fix transformation of `import.meta.url` in CommonJS * Fix test on Windows, add helper functions --------- Co-authored-by: Lukas Taegert-Atkinson <lukastaegert@users.noreply.github.com>
commit sha d7cbebda78722955e2c18bc0f322962b7acb53e5
3.17.3
commit sha 1ab9833b4ca39ad7f5303943a7658b03f93ff109
build: use @rollup/plugin-replace to replace chokidar fsevents (#4880)
commit sha 931b43b05760dafc639f969ab0a7211ae11aff4b
feat: mark files in a `node_modules` as ignore-listed by default Following up on the addition of the `sourcemapIgnoreList` output option, this adds a default which marks all files within a `node_modules` folder as ignore-listed. This way most projects using rollup will need no additional configuration regarding the ignore-listing and automatically benefit. This also allows to specify `false` for the `sourcemapIgnoreList` output option, which completely disables the generation of an ignore-list. Doc: https://goo.gle/devtools-ignoreList-adoption
push time in a month
Pull request review commentvitejs/vite
feat(vite): add `sourcemapIgnoreList` configuration option
export function resolveServerOptions( ): ResolvedServerOptions { const server: ResolvedServerOptions = { preTransformRequests: true,- ...(raw as ResolvedServerOptions),+ sourcemapIgnoreList: (sourcePath) => sourcePath.includes('/node_modules/'),
See comment above about sourcePath.includes('node_modules')
.
comment created time in a month