diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cc87b2fd120..10816a3bc68 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -593,7 +593,7 @@ jobs: working-directory: ${{ steps.tmp-dir.outputs.path }} - name: Test installation - run: npx rescript -h && npx rescript-legacy build && cat src/Test.res.js + run: npx rescript -h && npx rescript build && cat src/Test.res.js shell: bash working-directory: ${{ steps.tmp-dir.outputs.path }} @@ -646,7 +646,7 @@ jobs: working-directory: ${{ steps.tmp-dir.outputs.path }} - name: Test installation - run: pnpm rescript -h && pnpm rescript-legacy build && cat src/Test.res.js + run: pnpm rescript -h && pnpm rescript build && cat src/Test.res.js shell: bash working-directory: ${{ steps.tmp-dir.outputs.path }} diff --git a/packages/playground/package.json b/packages/playground/package.json index 7b4712b8f16..480eb0b1127 100644 --- a/packages/playground/package.json +++ b/packages/playground/package.json @@ -5,7 +5,7 @@ "scripts": { "clean": "rescript clean", "test": "node ./playground_test.cjs", - "build": "rescript clean && rescript-legacy build && node scripts/generate_cmijs.mjs && rollup -c && touch .buildstamp", + "build": "rescript clean && rescript build && node scripts/generate_cmijs.mjs && rollup -c && touch .buildstamp", "upload-bundle": "node scripts/upload_bundle.mjs", "serve-bundle": "node serve-bundle.mjs" }, diff --git a/packages/playground/scripts/generate_cmijs.mjs b/packages/playground/scripts/generate_cmijs.mjs index 034d7bb6a02..4a84d293f09 100644 --- a/packages/playground/scripts/generate_cmijs.mjs +++ b/packages/playground/scripts/generate_cmijs.mjs @@ -24,7 +24,7 @@ import { } from "./common.mjs"; exec("yarn rescript clean"); -exec("yarn rescript-legacy build"); +exec("yarn rescript build"); // We need to build the compiler's builtin modules as a separate cmij. // Otherwise we can't use them for compilation within the playground. diff --git a/scripts/res/package.json b/scripts/res/package.json index ae5cfdaec1a..ed2a8a2a3a0 100644 --- a/scripts/res/package.json +++ b/scripts/res/package.json @@ -3,9 +3,9 @@ "type": "module", "private": true, "scripts": { - "build": "rescript-legacy build", + "build": "rescript build", "clean": "rescript clean", - "dev": "rescript-legacy -w", + "dev": "rescript watch", "apidocs:generate": "yarn build && node GenApiDocs.res.js" }, "dependencies": { diff --git a/tests/analysis_tests/tests-generic-jsx-transform/package.json b/tests/analysis_tests/tests-generic-jsx-transform/package.json index 8d369b180d7..ad6fe33fc00 100644 --- a/tests/analysis_tests/tests-generic-jsx-transform/package.json +++ b/tests/analysis_tests/tests-generic-jsx-transform/package.json @@ -2,8 +2,8 @@ "name": "@tests/generic-jsx-transform", "private": true, "scripts": { - "build": "rescript-legacy build", - "clean": "rescript-legacy clean" + "build": "rescript build", + "clean": "rescript clean" }, "dependencies": { "rescript": "workspace:^" diff --git a/tests/analysis_tests/tests-generic-jsx-transform/rescript.json b/tests/analysis_tests/tests-generic-jsx-transform/rescript.json index 1580c61aa5a..6a2a13610c8 100644 --- a/tests/analysis_tests/tests-generic-jsx-transform/rescript.json +++ b/tests/analysis_tests/tests-generic-jsx-transform/rescript.json @@ -1,11 +1,12 @@ { - "name": "test-generic-jsx-transform", + "name": "@tests/generic-jsx-transform", "sources": [ { "dir": "src", "subdirs": true } ], - "compiler-flags": ["-w -33-44-8"], + "compiler-flags": ["-w -33-44-8-26-27-110"], + "package-specs": [{ "module": "commonjs", "in-source": false }], "jsx": { "module": "GenericJsx" } } diff --git a/tests/analysis_tests/tests-incremental-typechecking/Makefile b/tests/analysis_tests/tests-incremental-typechecking/Makefile index c0055793d2a..6abbf0dd984 100644 --- a/tests/analysis_tests/tests-incremental-typechecking/Makefile +++ b/tests/analysis_tests/tests-incremental-typechecking/Makefile @@ -1,7 +1,7 @@ SHELL = /bin/bash build: - yarn build > /dev/null || true + yarn build > /dev/null 2>&1 || true test: build ./test.sh diff --git a/tests/analysis_tests/tests-incremental-typechecking/package.json b/tests/analysis_tests/tests-incremental-typechecking/package.json index 840385ceccd..f36825de87b 100644 --- a/tests/analysis_tests/tests-incremental-typechecking/package.json +++ b/tests/analysis_tests/tests-incremental-typechecking/package.json @@ -2,8 +2,8 @@ "name": "@tests/incremental-typechecking", "private": true, "scripts": { - "build": "rescript-legacy build", - "clean": "rescript-legacy clean" + "build": "rescript build", + "clean": "rescript clean" }, "dependencies": { "rescript": "workspace:^" diff --git a/tests/analysis_tests/tests-incremental-typechecking/rescript.json b/tests/analysis_tests/tests-incremental-typechecking/rescript.json index 1580c61aa5a..d786f5a4be8 100644 --- a/tests/analysis_tests/tests-incremental-typechecking/rescript.json +++ b/tests/analysis_tests/tests-incremental-typechecking/rescript.json @@ -1,11 +1,11 @@ { - "name": "test-generic-jsx-transform", + "name": "@tests/incremental-typechecking", "sources": [ { "dir": "src", "subdirs": true } ], - "compiler-flags": ["-w -33-44-8"], + "compiler-flags": ["-w -33-44-8-26-27-110"], "jsx": { "module": "GenericJsx" } } diff --git a/tests/analysis_tests/tests-reanalyze/termination/package.json b/tests/analysis_tests/tests-reanalyze/termination/package.json index a52dc030b62..01bd0f1d8b6 100644 --- a/tests/analysis_tests/tests-reanalyze/termination/package.json +++ b/tests/analysis_tests/tests-reanalyze/termination/package.json @@ -2,8 +2,8 @@ "name": "@tests/reanalyze-termination", "private": true, "scripts": { - "build": "rescript-legacy build", - "clean": "rescript-legacy clean" + "build": "rescript build", + "clean": "rescript clean" }, "dependencies": { "rescript": "workspace:^" diff --git a/tests/analysis_tests/tests-reanalyze/termination/rescript.json b/tests/analysis_tests/tests-reanalyze/termination/rescript.json index 3c8e376d609..a3afd79ad59 100644 --- a/tests/analysis_tests/tests-reanalyze/termination/rescript.json +++ b/tests/analysis_tests/tests-reanalyze/termination/rescript.json @@ -4,7 +4,7 @@ "suppress": [], "unsuppress": [] }, - "name": "arnold", + "name": "@tests/reanalyze-termination", "dependencies": [], "sources": [ { diff --git a/tests/analysis_tests/tests-reanalyze/termination/src/TestCyberTruck.res b/tests/analysis_tests/tests-reanalyze/termination/src/TestCyberTruck.res index e2c6be68c79..413179ad533 100644 --- a/tests/analysis_tests/tests-reanalyze/termination/src/TestCyberTruck.res +++ b/tests/analysis_tests/tests-reanalyze/termination/src/TestCyberTruck.res @@ -145,7 +145,7 @@ module Parser = { | Asterisk => "*" | Eof => "Eof" | Lparen => "(" - | Int(n) => string_of_int(n) + | Int(n) => Int.toString(n) | Plus => "+" | Rparen => ")" } @@ -256,7 +256,7 @@ module UITermination = { let counter = (state: state, ~setState: setState) => { setState(~f=initState) - div(~text=string_of_int(state), ~onClick=() => setState(~f=increment)) + div(~text=Int.toString(state), ~onClick=() => setState(~f=increment)) } @progress(initState) @@ -265,7 +265,7 @@ module UITermination = { | None => () | Some(newState) => ignore(counterCompiled(newState)) } - ignore(string_of_int(state)) + ignore(Int.toString(state)) } and onClick1 = state => @@ -276,7 +276,7 @@ module UITermination = { let countRenders = (state: state, ~setState: setState) => { setState(~f=increment) - div(~text="I have been rendered " ++ (string_of_int(state) ++ " times"), ~onClick=nothing) + div(~text="I have been rendered " ++ (Int.toString(state) ++ " times"), ~onClick=nothing) } @progress(initState) @@ -285,7 +285,7 @@ module UITermination = { | None => () | Some(newState) => ignore(countRendersCompiled(newState)) } - ignore("I have been rendered " ++ (string_of_int(state) ++ " times")) + ignore("I have been rendered " ++ (Int.toString(state) ++ " times")) } } diff --git a/tests/analysis_tests/tests/package.json b/tests/analysis_tests/tests/package.json index 8b90f6f72ee..c5301890991 100644 --- a/tests/analysis_tests/tests/package.json +++ b/tests/analysis_tests/tests/package.json @@ -2,8 +2,8 @@ "name": "@tests/analysis", "private": true, "scripts": { - "build": "rescript-legacy build", - "clean": "rescript-legacy clean" + "build": "rescript build", + "clean": "rescript clean" }, "dependencies": { "@rescript/react": "link:../../dependencies/rescript-react", diff --git a/tests/analysis_tests/tests/rescript.json b/tests/analysis_tests/tests/rescript.json index 4a4757d332a..f87f7d538a2 100644 --- a/tests/analysis_tests/tests/rescript.json +++ b/tests/analysis_tests/tests/rescript.json @@ -1,5 +1,5 @@ { - "name": "test", + "name": "@tests/analysis", "reanalyze": { "analysis": ["dce"] }, @@ -9,9 +9,10 @@ "subdirs": true } ], - "compiler-flags": ["-w -33-44-8"], + "compiler-flags": ["-w -33-44-8-26-27-110"], "dependencies": ["@rescript/react"], "jsx": { "version": 4 }, + "package-specs": [{ "module": "commonjs", "in-source": false }], "suffix": ".res.js", "editor": { "autocomplete": { diff --git a/tests/docstring_tests/package.json b/tests/docstring_tests/package.json index dcd60a34cee..dfefbd30bea 100644 --- a/tests/docstring_tests/package.json +++ b/tests/docstring_tests/package.json @@ -3,7 +3,7 @@ "type": "module", "private": true, "scripts": { - "build": "rescript-legacy build", + "build": "rescript build", "clean": "rescript clean", "dev": "rescript -w" }, diff --git a/tests/gentype_tests/stdlib-no-shims/package.json b/tests/gentype_tests/stdlib-no-shims/package.json index d23bc455a4f..fe8642afcfc 100644 --- a/tests/gentype_tests/stdlib-no-shims/package.json +++ b/tests/gentype_tests/stdlib-no-shims/package.json @@ -2,7 +2,7 @@ "name": "@tests/gentype-stdlib-no-shims", "private": true, "scripts": { - "build": "rescript-legacy build", + "build": "rescript build", "clean": "rescript clean", "typecheck": "tsc" }, diff --git a/tests/gentype_tests/typescript-react-example/package.json b/tests/gentype_tests/typescript-react-example/package.json index 273cfe8f8f7..689d8373610 100644 --- a/tests/gentype_tests/typescript-react-example/package.json +++ b/tests/gentype_tests/typescript-react-example/package.json @@ -2,8 +2,8 @@ "name": "@tests/gentype-react-example", "private": true, "scripts": { - "start": "rescript-legacy build -w", - "build": "rescript-legacy build", + "start": "rescript build -w", + "build": "rescript build", "clean": "rescript clean", "typecheck": "tsc", "check": "biome check --changed --no-errors-on-unmatched ." diff --git a/tests/package_tests/installation_test/package.json b/tests/package_tests/installation_test/package.json new file mode 100644 index 00000000000..cc750656a79 --- /dev/null +++ b/tests/package_tests/installation_test/package.json @@ -0,0 +1,3 @@ +{ + "name": "install-test" +} \ No newline at end of file diff --git a/tests/tools_tests/package.json b/tests/tools_tests/package.json index 46209fd6de9..3d25d4c6cc3 100644 --- a/tests/tools_tests/package.json +++ b/tests/tools_tests/package.json @@ -2,7 +2,7 @@ "name": "@tests/tools", "private": true, "scripts": { - "build": "rescript-legacy build -warn-error -3", + "build": "rescript build", "clean": "rescript clean", "dev": "rescript -w" }, diff --git a/tests/tools_tests/rescript.json b/tests/tools_tests/rescript.json index 3ed41da9887..c9936473469 100644 --- a/tests/tools_tests/rescript.json +++ b/tests/tools_tests/rescript.json @@ -8,6 +8,9 @@ "module": "esmodule", "in-source": true }, + "warnings": { + "error": "-3" + }, "suffix": ".res.js", "dependencies": ["@rescript/react"] }