diff --git a/CHANGELOG.md b/CHANGELOG.md index 1ddebb640f4..da2eca3e3e4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,7 @@ - Remove `external-stdlib` configuration option from `rescript.json`. This option was rarely used and is no longer supported. - `js-post-build` now passes the correct output file path based on `in-source` configuration: when `in-source: true`, the path next to the source file is passed; when `in-source: false`, the path in the `lib//` directory is passed. Additionally, stdout and stderr from the post-build command are now logged. https://github.com/rescript-lang/rescript/pull/8190 - `js-post-build` command now runs in the directory containing the `rescript.json` where it is defined, instead of the unpredictable build invocation directory. This provides consistent behavior in monorepos. https://github.com/rescript-lang/rescript/pull/8195 +- Remove support for deprecated `bs-dependencies`, `bs-dev-dependencies`, and `bsc-flags` configuration options. Use `dependencies`, `dev-dependencies`, and `compiler-flags` instead. https://github.com/rescript-lang/rescript/pull/8196 #### :eyeglasses: Spec Compliance diff --git a/compiler/gentype/GenTypeConfig.ml b/compiler/gentype/GenTypeConfig.ml index 67d6a32d460..383c8c2da63 100644 --- a/compiler/gentype/GenTypeConfig.ml +++ b/compiler/gentype/GenTypeConfig.ml @@ -194,10 +194,8 @@ let read_config ~get_config_file ~namespace = | _ -> default.suffix in let bs_dependencies = - match - (bsconf |> get_opt "dependencies", bsconf |> get_opt "bs-dependencies") - with - | Some (Arr {content}), None | None, Some (Arr {content}) -> + match bsconf |> get_opt "dependencies" with + | Some (Arr {content}) -> let strings = ref [] in content |> Array.iter (fun x -> diff --git a/docs/docson/build-schema.json b/docs/docson/build-schema.json index 34c307d97e6..cc8e27955fb 100644 --- a/docs/docson/build-schema.json +++ b/docs/docson/build-schema.json @@ -375,14 +375,6 @@ }, "description": "a list of directories that the build system will not look into" }, - "bs-dependencies": { - "$ref": "#/definitions/dependencies", - "description": "ReScript dependencies of the library, like in package.json. Currently searches in `node_modules` (deprecated, use dependencies instead)." - }, - "bs-dev-dependencies": { - "$ref": "#/definitions/dependencies", - "description": "ReScript dev dependencies of the library, like in package.json. Currently searches in `node_modules` (deprecated, use dev-dependencies instead)." - }, "dependencies": { "$ref": "#/definitions/dependencies", "description": "ReScript dependencies of the library, like in package.json. Currently searches in `node_modules`." @@ -414,10 +406,6 @@ "$ref": "#/definitions/gentype-specs", "description": "gentype config, see cristianoc/genType for more details" }, - "bsc-flags": { - "$ref": "#/definitions/compiler-flags", - "description": "Flags passed to bsc.exe (deprecated, use compiler-flags instead)" - }, "compiler-flags": { "$ref": "#/definitions/compiler-flags", "description": "Flags passed to bsc.exe" diff --git a/rewatch/src/build.rs b/rewatch/src/build.rs index c5eb31b0924..0055c8acad6 100644 --- a/rewatch/src/build.rs +++ b/rewatch/src/build.rs @@ -419,15 +419,6 @@ fn log_config_warnings(build_state: &BuildCommandState) { if package.is_local_dep { package.config.get_deprecations().iter().for_each( |deprecation_warning| match deprecation_warning { - config::DeprecationWarning::BsDependencies => { - log_deprecated_config_field(&package.name, "bs-dependencies", "dependencies"); - } - config::DeprecationWarning::BsDevDependencies => { - log_deprecated_config_field(&package.name, "bs-dev-dependencies", "dev-dependencies"); - } - config::DeprecationWarning::BscFlags => { - log_deprecated_config_field(&package.name, "bsc-flags", "compiler-flags"); - } config::DeprecationWarning::PackageSpecsEs6 => { log_deprecated_package_specs_module("es6"); } @@ -452,14 +443,6 @@ fn log_config_warnings(build_state: &BuildCommandState) { }); } -fn log_deprecated_config_field(package_name: &str, field_name: &str, new_field_name: &str) { - let warning = format!( - "The field '{field_name}' found in the package config of '{package_name}' is deprecated and will be removed in a future version.\n\ - Use '{new_field_name}' instead." - ); - eprintln!("\n{}", style(warning).yellow()); -} - fn log_deprecated_package_specs_module(module_name: &str) { let warning = format!("deprecated: Option \"{module_name}\" is deprecated. Use \"esmodule\" instead."); eprintln!("\n{}", style(warning).yellow()); diff --git a/rewatch/src/build/packages.rs b/rewatch/src/build/packages.rs index 81fb7f8bcfd..53a0843d36a 100644 --- a/rewatch/src/build/packages.rs +++ b/rewatch/src/build/packages.rs @@ -948,20 +948,20 @@ fn get_unallowed_dependents( } #[derive(Debug, Clone)] struct UnallowedDependency { - bs_deps: Vec, - bs_build_dev_deps: Vec, + deps: Vec, + dev_deps: Vec, } pub fn validate_packages_dependencies(packages: &AHashMap) -> bool { let mut detected_unallowed_dependencies: AHashMap = AHashMap::new(); for (package_name, package) in packages { - let bs_dependencies = &package.config.dependencies.to_owned().unwrap_or(vec![]); + let dependencies = &package.config.dependencies.to_owned().unwrap_or(vec![]); let dev_dependencies = &package.config.dev_dependencies.to_owned().unwrap_or(vec![]); [ - ("bs-dependencies", bs_dependencies), - ("bs-dev-dependencies", dev_dependencies), + ("dependencies", dependencies), + ("dev-dependencies", dev_dependencies), ] .iter() .for_each(|(dependency_type, dependencies)| { @@ -969,15 +969,15 @@ pub fn validate_packages_dependencies(packages: &AHashMap) -> b get_unallowed_dependents(packages, package_name, dependencies) { let empty_unallowed_deps = UnallowedDependency { - bs_deps: vec![], - bs_build_dev_deps: vec![], + deps: vec![], + dev_deps: vec![], }; let unallowed_dependency = detected_unallowed_dependencies.entry(String::from(package_name)); let value = unallowed_dependency.or_insert_with(|| empty_unallowed_deps); match *dependency_type { - "bs-dependencies" => value.bs_deps.push(unallowed_dependency_name), - "bs-dev-dependencies" => value.bs_build_dev_deps.push(unallowed_dependency_name), + "dependencies" => value.deps.push(unallowed_dependency_name), + "dev-dependencies" => value.dev_deps.push(unallowed_dependency_name), _ => (), } } @@ -991,8 +991,8 @@ pub fn validate_packages_dependencies(packages: &AHashMap) -> b ); [ - ("bs-dependencies", unallowed_deps.bs_deps.to_owned()), - ("bs-dev-dependencies", unallowed_deps.bs_build_dev_deps.to_owned()), + ("dependencies", unallowed_deps.deps.to_owned()), + ("dev-dependencies", unallowed_deps.dev_deps.to_owned()), ] .iter() .for_each(|(deps_type, map)| { diff --git a/rewatch/src/config.rs b/rewatch/src/config.rs index 9a8f72a09e9..fdf65a93fd1 100644 --- a/rewatch/src/config.rs +++ b/rewatch/src/config.rs @@ -2,7 +2,7 @@ use crate::build::packages; use crate::helpers; use crate::helpers::deserialize::*; use crate::project_context::ProjectContext; -use anyhow::{Result, anyhow, bail}; +use anyhow::{Result, anyhow}; use convert_case::{Case, Casing}; use serde::de::{Error as DeError, Visitor}; use serde::{Deserialize, Deserializer}; @@ -228,9 +228,6 @@ pub struct JsPostBuild { #[derive(Debug, Clone, Copy, PartialEq, PartialOrd)] pub enum DeprecationWarning { - BsDependencies, - BsDevDependencies, - BscFlags, PackageSpecsEs6, PackageSpecsEs6Global, } @@ -285,20 +282,11 @@ pub struct Config { pub dependencies: Option>, #[serde(rename = "dev-dependencies")] pub dev_dependencies: Option>, - // Deprecated field: overwrites dependencies - #[serde(rename = "bs-dependencies")] - bs_dependencies: Option>, - // Deprecated field: overwrites dev_dependencies - #[serde(rename = "bs-dev-dependencies")] - bs_dev_dependencies: Option>, #[serde(rename = "ppx-flags")] pub ppx_flags: Option>>, #[serde(rename = "compiler-flags")] pub compiler_flags: Option>>, - // Deprecated field: overwrites compiler_flags - #[serde(rename = "bsc-flags")] - bsc_flags: Option>>, pub namespace: Option, pub jsx: Option, @@ -729,33 +717,6 @@ impl Config { } fn handle_deprecations(&mut self) -> Result<()> { - if self.dependencies.is_some() && self.bs_dependencies.is_some() { - bail!("dependencies and bs-dependencies are mutually exclusive. Please use 'dependencies'."); - } - if self.dev_dependencies.is_some() && self.bs_dev_dependencies.is_some() { - bail!( - "dev-dependencies and bs-dev-dependencies are mutually exclusive. Please use 'dev-dependencies'" - ); - } - - if self.compiler_flags.is_some() && self.bsc_flags.is_some() { - bail!("compiler-flags and bsc-flags are mutually exclusive. Please use 'compiler-flags'"); - } - - if self.bs_dependencies.is_some() { - self.dependencies = self.bs_dependencies.take(); - self.deprecation_warnings.push(DeprecationWarning::BsDependencies); - } - if self.bs_dev_dependencies.is_some() { - self.dev_dependencies = self.bs_dev_dependencies.take(); - self.deprecation_warnings - .push(DeprecationWarning::BsDevDependencies); - } - if self.bsc_flags.is_some() { - self.compiler_flags = self.bsc_flags.take(); - self.deprecation_warnings.push(DeprecationWarning::BscFlags); - } - let (has_es6, has_es6_global) = match &self.package_specs { None => (false, false), Some(OneOrMore::Single(spec)) => (spec.module == "es6", spec.module == "es6-global"), @@ -800,11 +761,8 @@ pub mod tests { suffix: None, dependencies: Some(args.bs_deps), dev_dependencies: Some(args.build_dev_deps), - bs_dependencies: None, - bs_dev_dependencies: None, ppx_flags: None, compiler_flags: None, - bsc_flags: None, namespace: None, jsx: None, gentype_config: None, @@ -1010,31 +968,6 @@ pub mod tests { ); } - #[test] - fn test_dependencies_deprecation() { - let json = r#" - { - "name": "testrepo", - "sources": { - "dir": "src", - "subdirs": true - }, - "package-specs": [ - { - "module": "esmodule", - "in-source": true - } - ], - "suffix": ".mjs", - "bs-dependencies": [ "@testrepo/main" ] - } - "#; - - let config = Config::new_from_json_string(json).expect("a valid json string"); - assert_eq!(config.dependencies, Some(vec!["@testrepo/main".to_string()])); - assert_eq!(config.get_deprecations(), [DeprecationWarning::BsDependencies]); - } - #[test] fn test_dependencies() { let json = r#" @@ -1060,31 +993,6 @@ pub mod tests { assert!(config.get_deprecations().is_empty()); } - #[test] - fn test_dev_dependencies_deprecation() { - let json = r#" - { - "name": "testrepo", - "sources": { - "dir": "src", - "subdirs": true - }, - "package-specs": [ - { - "module": "esmodule", - "in-source": true - } - ], - "suffix": ".mjs", - "bs-dev-dependencies": [ "@testrepo/main" ] - } - "#; - - let config = Config::new_from_json_string(json).expect("a valid json string"); - assert_eq!(config.dev_dependencies, Some(vec!["@testrepo/main".to_string()])); - assert_eq!(config.get_deprecations(), [DeprecationWarning::BsDevDependencies]); - } - #[test] fn test_dev_dependencies() { let json = r#" @@ -1252,30 +1160,6 @@ pub mod tests { assert!(config.get_deprecations().is_empty()); } - #[test] - fn test_compiler_flags_deprecation() { - let json = r#" - { - "name": "testrepo", - "sources": { - "dir": "src", - "subdirs": true - }, - "package-specs": [ - { - "module": "esmodule", - "in-source": true - } - ], - "suffix": ".mjs", - "bsc-flags": [ "-w" ] - } - "#; - - let config = Config::new_from_json_string(json).expect("a valid json string"); - assert_eq!(config.get_deprecations(), [DeprecationWarning::BscFlags]); - } - fn test_find_is_type_dev(source: OneOrMore, path: &Path, expected: bool) { let config = Config { name: String::from("testrepo"), diff --git a/rewatch/tests/compile.sh b/rewatch/tests/compile.sh index be902686768..5890c79942f 100755 --- a/rewatch/tests/compile.sh +++ b/rewatch/tests/compile.sh @@ -104,8 +104,8 @@ rm -rf packages/main/src/dupe-a packages/main/src/dupe-b # this should not compile because "@rescript/webapi" is part of dev-dependencies # and FileToTest.res is not listed as "type":"dev" echo 'open WebAPI' >> packages/with-dev-deps/src/FileToTest.res -rewatch build &> ../tests/snapshots/bs-dev-dependency-used-by-non-dev-source.txt -normalize_paths ../tests/snapshots/bs-dev-dependency-used-by-non-dev-source.txt +rewatch build &> ../tests/snapshots/dev-dependency-used-by-non-dev-source.txt +normalize_paths ../tests/snapshots/dev-dependency-used-by-non-dev-source.txt git checkout -- packages/with-dev-deps/src/FileToTest.res # it should compile dev dependencies diff --git a/rewatch/tests/snapshots/clean-rebuild.txt b/rewatch/tests/snapshots/clean-rebuild.txt index 43c5ff45cf6..54dce2f20ff 100644 --- a/rewatch/tests/snapshots/clean-rebuild.txt +++ b/rewatch/tests/snapshots/clean-rebuild.txt @@ -2,15 +2,12 @@ Cleaned 0/0 Parsed 425 source files Compiled 425 modules -The field 'bs-dependencies' found in the package config of '@testrepo/deprecated-config' is deprecated and will be removed in a future version. -Use 'dependencies' instead. +The field 'ignored-dirs' found in the package config of '@testrepo/deprecated-config' is not supported by ReScript 12's new build system. -The field 'bs-dev-dependencies' found in the package config of '@testrepo/deprecated-config' is deprecated and will be removed in a future version. -Use 'dev-dependencies' instead. +Unknown field 'some-new-field' found in the package config of '@testrepo/deprecated-config'. This option will be ignored. -The field 'bsc-flags' found in the package config of '@testrepo/deprecated-config' is deprecated and will be removed in a future version. -Use 'compiler-flags' instead. +Unknown field 'bs-dependencies' found in the package config of '@testrepo/deprecated-config'. This option will be ignored. -The field 'ignored-dirs' found in the package config of '@testrepo/deprecated-config' is not supported by ReScript 12's new build system. +Unknown field 'bs-dev-dependencies' found in the package config of '@testrepo/deprecated-config'. This option will be ignored. -Unknown field 'some-new-field' found in the package config of '@testrepo/deprecated-config'. This option will be ignored. +Unknown field 'bsc-flags' found in the package config of '@testrepo/deprecated-config'. This option will be ignored. diff --git a/rewatch/tests/snapshots/dependency-cycle.txt b/rewatch/tests/snapshots/dependency-cycle.txt index 15df26e85c7..2ad81383744 100644 --- a/rewatch/tests/snapshots/dependency-cycle.txt +++ b/rewatch/tests/snapshots/dependency-cycle.txt @@ -2,18 +2,15 @@ Cleaned 0/428 Parsed 1 source files Compiled 0 modules -The field 'bs-dependencies' found in the package config of '@testrepo/deprecated-config' is deprecated and will be removed in a future version. -Use 'dependencies' instead. +The field 'ignored-dirs' found in the package config of '@testrepo/deprecated-config' is not supported by ReScript 12's new build system. -The field 'bs-dev-dependencies' found in the package config of '@testrepo/deprecated-config' is deprecated and will be removed in a future version. -Use 'dev-dependencies' instead. +Unknown field 'some-new-field' found in the package config of '@testrepo/deprecated-config'. This option will be ignored. -The field 'bsc-flags' found in the package config of '@testrepo/deprecated-config' is deprecated and will be removed in a future version. -Use 'compiler-flags' instead. +Unknown field 'bs-dependencies' found in the package config of '@testrepo/deprecated-config'. This option will be ignored. -The field 'ignored-dirs' found in the package config of '@testrepo/deprecated-config' is not supported by ReScript 12's new build system. +Unknown field 'bs-dev-dependencies' found in the package config of '@testrepo/deprecated-config'. This option will be ignored. -Unknown field 'some-new-field' found in the package config of '@testrepo/deprecated-config'. This option will be ignored. +Unknown field 'bsc-flags' found in the package config of '@testrepo/deprecated-config'. This option will be ignored. Can't continue... Found a circular dependency in your code: Dep01 (packages/dep01/src/Dep01.res) diff --git a/rewatch/tests/snapshots/bs-dev-dependency-used-by-non-dev-source.txt b/rewatch/tests/snapshots/dev-dependency-used-by-non-dev-source.txt similarity index 62% rename from rewatch/tests/snapshots/bs-dev-dependency-used-by-non-dev-source.txt rename to rewatch/tests/snapshots/dev-dependency-used-by-non-dev-source.txt index d0e96bce1ab..6476e9d1833 100644 --- a/rewatch/tests/snapshots/bs-dev-dependency-used-by-non-dev-source.txt +++ b/rewatch/tests/snapshots/dev-dependency-used-by-non-dev-source.txt @@ -2,18 +2,15 @@ Cleaned 0/428 Parsed 2 source files Compiled 2 modules -The field 'bs-dependencies' found in the package config of '@testrepo/deprecated-config' is deprecated and will be removed in a future version. -Use 'dependencies' instead. +The field 'ignored-dirs' found in the package config of '@testrepo/deprecated-config' is not supported by ReScript 12's new build system. -The field 'bs-dev-dependencies' found in the package config of '@testrepo/deprecated-config' is deprecated and will be removed in a future version. -Use 'dev-dependencies' instead. +Unknown field 'some-new-field' found in the package config of '@testrepo/deprecated-config'. This option will be ignored. -The field 'bsc-flags' found in the package config of '@testrepo/deprecated-config' is deprecated and will be removed in a future version. -Use 'compiler-flags' instead. +Unknown field 'bs-dependencies' found in the package config of '@testrepo/deprecated-config'. This option will be ignored. -The field 'ignored-dirs' found in the package config of '@testrepo/deprecated-config' is not supported by ReScript 12's new build system. +Unknown field 'bs-dev-dependencies' found in the package config of '@testrepo/deprecated-config'. This option will be ignored. -Unknown field 'some-new-field' found in the package config of '@testrepo/deprecated-config'. This option will be ignored. +Unknown field 'bsc-flags' found in the package config of '@testrepo/deprecated-config'. This option will be ignored. We've found a bug for you! /packages/with-dev-deps/src/FileToTest.res:2:6-11 diff --git a/rewatch/tests/snapshots/remove-file.txt b/rewatch/tests/snapshots/remove-file.txt index a0a9edd519a..5762368df48 100644 --- a/rewatch/tests/snapshots/remove-file.txt +++ b/rewatch/tests/snapshots/remove-file.txt @@ -2,18 +2,15 @@ Cleaned 1/428 Parsed 0 source files Compiled 1 modules -The field 'bs-dependencies' found in the package config of '@testrepo/deprecated-config' is deprecated and will be removed in a future version. -Use 'dependencies' instead. +The field 'ignored-dirs' found in the package config of '@testrepo/deprecated-config' is not supported by ReScript 12's new build system. -The field 'bs-dev-dependencies' found in the package config of '@testrepo/deprecated-config' is deprecated and will be removed in a future version. -Use 'dev-dependencies' instead. +Unknown field 'some-new-field' found in the package config of '@testrepo/deprecated-config'. This option will be ignored. -The field 'bsc-flags' found in the package config of '@testrepo/deprecated-config' is deprecated and will be removed in a future version. -Use 'compiler-flags' instead. +Unknown field 'bs-dependencies' found in the package config of '@testrepo/deprecated-config'. This option will be ignored. -The field 'ignored-dirs' found in the package config of '@testrepo/deprecated-config' is not supported by ReScript 12's new build system. +Unknown field 'bs-dev-dependencies' found in the package config of '@testrepo/deprecated-config'. This option will be ignored. -Unknown field 'some-new-field' found in the package config of '@testrepo/deprecated-config'. This option will be ignored. +Unknown field 'bsc-flags' found in the package config of '@testrepo/deprecated-config'. This option will be ignored. We've found a bug for you! /packages/dep01/src/Dep01.res:3:9-17 diff --git a/rewatch/tests/snapshots/rename-file-internal-dep-namespace.txt b/rewatch/tests/snapshots/rename-file-internal-dep-namespace.txt index 2f0cc34a280..5d319818931 100644 --- a/rewatch/tests/snapshots/rename-file-internal-dep-namespace.txt +++ b/rewatch/tests/snapshots/rename-file-internal-dep-namespace.txt @@ -2,18 +2,15 @@ Cleaned 2/428 Parsed 2 source files Compiled 3 modules -The field 'bs-dependencies' found in the package config of '@testrepo/deprecated-config' is deprecated and will be removed in a future version. -Use 'dependencies' instead. +The field 'ignored-dirs' found in the package config of '@testrepo/deprecated-config' is not supported by ReScript 12's new build system. -The field 'bs-dev-dependencies' found in the package config of '@testrepo/deprecated-config' is deprecated and will be removed in a future version. -Use 'dev-dependencies' instead. +Unknown field 'some-new-field' found in the package config of '@testrepo/deprecated-config'. This option will be ignored. -The field 'bsc-flags' found in the package config of '@testrepo/deprecated-config' is deprecated and will be removed in a future version. -Use 'compiler-flags' instead. +Unknown field 'bs-dependencies' found in the package config of '@testrepo/deprecated-config'. This option will be ignored. -The field 'ignored-dirs' found in the package config of '@testrepo/deprecated-config' is not supported by ReScript 12's new build system. +Unknown field 'bs-dev-dependencies' found in the package config of '@testrepo/deprecated-config'. This option will be ignored. -Unknown field 'some-new-field' found in the package config of '@testrepo/deprecated-config'. This option will be ignored. +Unknown field 'bsc-flags' found in the package config of '@testrepo/deprecated-config'. This option will be ignored. We've found a bug for you! /packages/new-namespace/src/NS_alias.res:2:1-16 diff --git a/rewatch/tests/snapshots/rename-file-internal-dep.txt b/rewatch/tests/snapshots/rename-file-internal-dep.txt index 3a8c6e1f4c7..7f8e127a676 100644 --- a/rewatch/tests/snapshots/rename-file-internal-dep.txt +++ b/rewatch/tests/snapshots/rename-file-internal-dep.txt @@ -2,18 +2,15 @@ Cleaned 2/428 Parsed 2 source files Compiled 2 modules -The field 'bs-dependencies' found in the package config of '@testrepo/deprecated-config' is deprecated and will be removed in a future version. -Use 'dependencies' instead. +The field 'ignored-dirs' found in the package config of '@testrepo/deprecated-config' is not supported by ReScript 12's new build system. -The field 'bs-dev-dependencies' found in the package config of '@testrepo/deprecated-config' is deprecated and will be removed in a future version. -Use 'dev-dependencies' instead. +Unknown field 'some-new-field' found in the package config of '@testrepo/deprecated-config'. This option will be ignored. -The field 'bsc-flags' found in the package config of '@testrepo/deprecated-config' is deprecated and will be removed in a future version. -Use 'compiler-flags' instead. +Unknown field 'bs-dependencies' found in the package config of '@testrepo/deprecated-config'. This option will be ignored. -The field 'ignored-dirs' found in the package config of '@testrepo/deprecated-config' is not supported by ReScript 12's new build system. +Unknown field 'bs-dev-dependencies' found in the package config of '@testrepo/deprecated-config'. This option will be ignored. -Unknown field 'some-new-field' found in the package config of '@testrepo/deprecated-config'. This option will be ignored. +Unknown field 'bsc-flags' found in the package config of '@testrepo/deprecated-config'. This option will be ignored. We've found a bug for you! /packages/main/src/Main.res:4:13-29 diff --git a/rewatch/tests/snapshots/rename-file-with-interface.txt b/rewatch/tests/snapshots/rename-file-with-interface.txt index b0642c89af2..25a123d256a 100644 --- a/rewatch/tests/snapshots/rename-file-with-interface.txt +++ b/rewatch/tests/snapshots/rename-file-with-interface.txt @@ -3,15 +3,12 @@ Cleaned 2/428 Parsed 1 source files Compiled 2 modules -The field 'bs-dependencies' found in the package config of '@testrepo/deprecated-config' is deprecated and will be removed in a future version. -Use 'dependencies' instead. +The field 'ignored-dirs' found in the package config of '@testrepo/deprecated-config' is not supported by ReScript 12's new build system. -The field 'bs-dev-dependencies' found in the package config of '@testrepo/deprecated-config' is deprecated and will be removed in a future version. -Use 'dev-dependencies' instead. +Unknown field 'some-new-field' found in the package config of '@testrepo/deprecated-config'. This option will be ignored. -The field 'bsc-flags' found in the package config of '@testrepo/deprecated-config' is deprecated and will be removed in a future version. -Use 'compiler-flags' instead. +Unknown field 'bs-dependencies' found in the package config of '@testrepo/deprecated-config'. This option will be ignored. -The field 'ignored-dirs' found in the package config of '@testrepo/deprecated-config' is not supported by ReScript 12's new build system. +Unknown field 'bs-dev-dependencies' found in the package config of '@testrepo/deprecated-config'. This option will be ignored. -Unknown field 'some-new-field' found in the package config of '@testrepo/deprecated-config'. This option will be ignored. +Unknown field 'bsc-flags' found in the package config of '@testrepo/deprecated-config'. This option will be ignored. diff --git a/rewatch/tests/snapshots/rename-file.txt b/rewatch/tests/snapshots/rename-file.txt index 78d52b3b0f4..a0619d217e7 100644 --- a/rewatch/tests/snapshots/rename-file.txt +++ b/rewatch/tests/snapshots/rename-file.txt @@ -2,15 +2,12 @@ Cleaned 1/428 Parsed 1 source files Compiled 1 modules -The field 'bs-dependencies' found in the package config of '@testrepo/deprecated-config' is deprecated and will be removed in a future version. -Use 'dependencies' instead. +The field 'ignored-dirs' found in the package config of '@testrepo/deprecated-config' is not supported by ReScript 12's new build system. -The field 'bs-dev-dependencies' found in the package config of '@testrepo/deprecated-config' is deprecated and will be removed in a future version. -Use 'dev-dependencies' instead. +Unknown field 'some-new-field' found in the package config of '@testrepo/deprecated-config'. This option will be ignored. -The field 'bsc-flags' found in the package config of '@testrepo/deprecated-config' is deprecated and will be removed in a future version. -Use 'compiler-flags' instead. +Unknown field 'bs-dependencies' found in the package config of '@testrepo/deprecated-config'. This option will be ignored. -The field 'ignored-dirs' found in the package config of '@testrepo/deprecated-config' is not supported by ReScript 12's new build system. +Unknown field 'bs-dev-dependencies' found in the package config of '@testrepo/deprecated-config'. This option will be ignored. -Unknown field 'some-new-field' found in the package config of '@testrepo/deprecated-config'. This option will be ignored. +Unknown field 'bsc-flags' found in the package config of '@testrepo/deprecated-config'. This option will be ignored. diff --git a/rewatch/tests/snapshots/rename-interface-file.txt b/rewatch/tests/snapshots/rename-interface-file.txt index d08776798f6..b45dfa121db 100644 --- a/rewatch/tests/snapshots/rename-interface-file.txt +++ b/rewatch/tests/snapshots/rename-interface-file.txt @@ -3,15 +3,12 @@ Cleaned 1/428 Parsed 1 source files Compiled 2 modules -The field 'bs-dependencies' found in the package config of '@testrepo/deprecated-config' is deprecated and will be removed in a future version. -Use 'dependencies' instead. +The field 'ignored-dirs' found in the package config of '@testrepo/deprecated-config' is not supported by ReScript 12's new build system. -The field 'bs-dev-dependencies' found in the package config of '@testrepo/deprecated-config' is deprecated and will be removed in a future version. -Use 'dev-dependencies' instead. +Unknown field 'some-new-field' found in the package config of '@testrepo/deprecated-config'. This option will be ignored. -The field 'bsc-flags' found in the package config of '@testrepo/deprecated-config' is deprecated and will be removed in a future version. -Use 'compiler-flags' instead. +Unknown field 'bs-dependencies' found in the package config of '@testrepo/deprecated-config'. This option will be ignored. -The field 'ignored-dirs' found in the package config of '@testrepo/deprecated-config' is not supported by ReScript 12's new build system. +Unknown field 'bs-dev-dependencies' found in the package config of '@testrepo/deprecated-config'. This option will be ignored. -Unknown field 'some-new-field' found in the package config of '@testrepo/deprecated-config'. This option will be ignored. +Unknown field 'bsc-flags' found in the package config of '@testrepo/deprecated-config'. This option will be ignored. diff --git a/tests/build_tests/jsx_settings_inheritance/node_modules/@rescript/react/rescript.json b/tests/build_tests/jsx_settings_inheritance/node_modules/@rescript/react/rescript.json index c2ed78b1749..3550a6d7ba1 100644 --- a/tests/build_tests/jsx_settings_inheritance/node_modules/@rescript/react/rescript.json +++ b/tests/build_tests/jsx_settings_inheritance/node_modules/@rescript/react/rescript.json @@ -7,7 +7,7 @@ "sources": [{ "dir": "src", "subdirs": true }], "package-specs": { "module": "esmodule", "in-source": true }, "suffix": ".res.js", - "bs-dev-dependencies": [], - "bsc-flags": [], + "dev-dependencies": [], + "compiler-flags": [], "uncurried": false } diff --git a/tests/build_tests/jsx_settings_inheritance/node_modules/a/rescript.json b/tests/build_tests/jsx_settings_inheritance/node_modules/a/rescript.json index 266065ca7bf..8831fe01671 100644 --- a/tests/build_tests/jsx_settings_inheritance/node_modules/a/rescript.json +++ b/tests/build_tests/jsx_settings_inheritance/node_modules/a/rescript.json @@ -14,7 +14,7 @@ "suffix": ".res.js" }, "namespace": true, - "bs-dependencies": [ + "dependencies": [ "@rescript/react" ] } diff --git a/tests/build_tests/jsx_settings_inheritance/node_modules/b/rescript.json b/tests/build_tests/jsx_settings_inheritance/node_modules/b/rescript.json index b3b346ec46e..945bea74dbe 100644 --- a/tests/build_tests/jsx_settings_inheritance/node_modules/b/rescript.json +++ b/tests/build_tests/jsx_settings_inheritance/node_modules/b/rescript.json @@ -10,7 +10,7 @@ "suffix": ".mjs" }, "namespace": true, - "bs-dependencies": [ + "dependencies": [ "@rescript/react" ] } diff --git a/tests/build_tests/transitive_dependency/node_modules/b/rescript.json b/tests/build_tests/transitive_dependency/node_modules/b/rescript.json index 2fdd222a495..d431cd20f1f 100644 --- a/tests/build_tests/transitive_dependency/node_modules/b/rescript.json +++ b/tests/build_tests/transitive_dependency/node_modules/b/rescript.json @@ -18,7 +18,7 @@ "error": true }, "suffix": ".mjs", - "bs-dependencies": [ + "dependencies": [ "c" ], "pinned-dependencies": [