Skip to content

Commit

Permalink
only for >= 0.18.0
Browse files Browse the repository at this point in the history
  • Loading branch information
bartlomieju committed Sep 26, 2024
1 parent 0dcb6dc commit 3cf3a69
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions cli/npm/managed/resolvers/common/lifecycle_scripts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ use super::bin_entries::BinEntries;
use crate::args::LifecycleScriptsConfig;
use deno_npm::resolution::NpmResolutionSnapshot;
use deno_semver::package::PackageNv;
use deno_semver::Version;
use std::borrow::Cow;
use std::rc::Rc;

Expand Down Expand Up @@ -115,8 +116,13 @@ impl<'a> LifecycleScripts<'a> {
{
// Skip adding `esbuild` as it is known that it can work properly without lifecycle script
// being run, and it's also very popular - any project using Vite would raise warnings.
if package.id.nv.name == "esbuild" {
return;
{
let nv = &package.id.nv;
if nv.name == "esbuild"
&& nv.version >= Version::parse_standard("0.18.0").unwrap()
{
return;
}
}

self
Expand Down

0 comments on commit 3cf3a69

Please sign in to comment.