Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@

- Remove uncurried handling from rewatch. https://github.com/rescript-lang/rescript/pull/7625

#### :nail_care: Polish

- Add a warning if the name in package.json does not match the name in rescript.json. https://github.com/rescript-lang/rescript/pull/7604

# 12.0.0-alpha.15

#### :boom: Breaking Change
Expand Down
11 changes: 11 additions & 0 deletions rewatch/src/build/packages.rs
Original file line number Diff line number Diff line change
Expand Up @@ -427,6 +427,17 @@ fn make_package(config: config::Config, package_path: &Path, is_pinned_dep: bool
};

let package_name = read_package_name(package_path).expect("Could not read package name");
if package_name != config.name {
log::warn!(
"\nPackage name mismatch for {}:\n\
The package.json name is \"{}\", while the rescript.json name is \"{}\"\n\
This inconsistency will cause issues with package resolution.\n",
package_path.to_string_lossy(),
package_name,
config.name,
);
}

Package {
name: package_name,
config: config.to_owned(),
Expand Down