From 72059497761dd005ee14b845905fa021e60aaca1 Mon Sep 17 00:00:00 2001 From: Bayheck Date: Tue, 27 Aug 2024 20:03:37 +0500 Subject: [PATCH 1/8] fix:static class blocks are not enabled babel error --- package-lock.json | 345 +++++++++--------- package.json | 3 +- src/compiler/babel/load-libs.js | 1 + .../test-file/formats/es-next/compiler.js | 3 +- 4 files changed, 178 insertions(+), 174 deletions(-) diff --git a/package-lock.json b/package-lock.json index fece15930e5..2847976210d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -18,6 +18,7 @@ "@babel/plugin-syntax-dynamic-import": "^7.8.3", "@babel/plugin-syntax-import-meta": "^7.10.4", "@babel/plugin-transform-async-to-generator": "^7.22.5", + "@babel/plugin-transform-class-static-block": "^7.24.7", "@babel/plugin-transform-exponentiation-operator": "^7.22.5", "@babel/plugin-transform-for-of": "^7.22.15", "@babel/plugin-transform-runtime": "7.23.3", @@ -207,11 +208,11 @@ } }, "node_modules/@babel/code-frame": { - "version": "7.24.2", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.24.2.tgz", - "integrity": "sha512-y5+tLQyV8pg3fsiln67BVLD1P13Eg4lh5RW9mF0zUuvLrv9uIQ4MCL+CRT+FTsBlBjcIan6PGsLcBN0m3ClUyQ==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.24.7.tgz", + "integrity": "sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA==", "dependencies": { - "@babel/highlight": "^7.24.2", + "@babel/highlight": "^7.24.7", "picocolors": "^1.0.0" }, "engines": { @@ -264,11 +265,11 @@ } }, "node_modules/@babel/generator": { - "version": "7.24.5", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.24.5.tgz", - "integrity": "sha512-x32i4hEXvr+iI0NEoEfDKzlemF8AmtOP8CcrRaEcpzysWuoEb1KknpcvMsHKPONoKZiDuItklgWhB18xEhr9PA==", + "version": "7.25.5", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.25.5.tgz", + "integrity": "sha512-abd43wyLfbWoxC6ahM8xTkqLpGB2iWBVyuKC9/srhFunCd1SDNrV1s72bBpK4hLj8KLzHBBcOblvLQZBNw9r3w==", "dependencies": { - "@babel/types": "^7.24.5", + "@babel/types": "^7.25.4", "@jridgewell/gen-mapping": "^0.3.5", "@jridgewell/trace-mapping": "^0.3.25", "jsesc": "^2.5.1" @@ -278,11 +279,11 @@ } }, "node_modules/@babel/helper-annotate-as-pure": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.22.5.tgz", - "integrity": "sha512-LvBTxu8bQSQkcyKOU+a1btnNFQ1dMAd0R6PyW3arXes06F6QLWLIrd681bxRPIXlrMGR3XYnW9JyML7dP3qgxg==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.24.7.tgz", + "integrity": "sha512-BaDeOonYvhdKw+JoMVkAixAAJzG2jVPIwWoKBPdYuY9b452e2rPuI9QPYh3KpofZ3pW2akOmwZLOiOsHMiqRAg==", "dependencies": { - "@babel/types": "^7.22.5" + "@babel/types": "^7.24.7" }, "engines": { "node": ">=6.9.0" @@ -323,18 +324,16 @@ } }, "node_modules/@babel/helper-create-class-features-plugin": { - "version": "7.24.5", - "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.24.5.tgz", - "integrity": "sha512-uRc4Cv8UQWnE4NXlYTIIdM7wfFkOqlFztcC/gVXDKohKoVB3OyonfelUBaJzSwpBntZ2KYGF/9S7asCHsXwW6g==", - "dependencies": { - "@babel/helper-annotate-as-pure": "^7.22.5", - "@babel/helper-environment-visitor": "^7.22.20", - "@babel/helper-function-name": "^7.23.0", - "@babel/helper-member-expression-to-functions": "^7.24.5", - "@babel/helper-optimise-call-expression": "^7.22.5", - "@babel/helper-replace-supers": "^7.24.1", - "@babel/helper-skip-transparent-expression-wrappers": "^7.22.5", - "@babel/helper-split-export-declaration": "^7.24.5", + "version": "7.25.4", + "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.25.4.tgz", + "integrity": "sha512-ro/bFs3/84MDgDmMwbcHgDa8/E6J3QKNTk4xJJnVeFtGE+tL0K26E3pNxhYz2b67fJpt7Aphw5XcploKXuCvCQ==", + "dependencies": { + "@babel/helper-annotate-as-pure": "^7.24.7", + "@babel/helper-member-expression-to-functions": "^7.24.8", + "@babel/helper-optimise-call-expression": "^7.24.7", + "@babel/helper-replace-supers": "^7.25.0", + "@babel/helper-skip-transparent-expression-wrappers": "^7.24.7", + "@babel/traverse": "^7.25.4", "semver": "^6.3.1" }, "engines": { @@ -423,11 +422,12 @@ } }, "node_modules/@babel/helper-member-expression-to-functions": { - "version": "7.24.5", - "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.24.5.tgz", - "integrity": "sha512-4owRteeihKWKamtqg4JmWSsEZU445xpFRXPEwp44HbgbxdWlUV1b4Agg4lkA806Lil5XM/e+FJyS0vj5T6vmcA==", + "version": "7.24.8", + "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.24.8.tgz", + "integrity": "sha512-LABppdt+Lp/RlBxqrh4qgf1oEH/WxdzQNDJIu5gC/W1GyvPVrOBiItmmM8wan2fm4oYqFuFfkXmlGpLQhPY8CA==", "dependencies": { - "@babel/types": "^7.24.5" + "@babel/traverse": "^7.24.8", + "@babel/types": "^7.24.8" }, "engines": { "node": ">=6.9.0" @@ -463,20 +463,20 @@ } }, "node_modules/@babel/helper-optimise-call-expression": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.22.5.tgz", - "integrity": "sha512-HBwaojN0xFRx4yIvpwGqxiV2tUfl7401jlok564NgB9EHS1y6QT17FmKWm4ztqjeVdXLuC4fSvHc5ePpQjoTbw==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.24.7.tgz", + "integrity": "sha512-jKiTsW2xmWwxT1ixIdfXUZp+P5yURx2suzLZr5Hi64rURpDYdMW0pv+Uf17EYk2Rd428Lx4tLsnjGJzYKDM/6A==", "dependencies": { - "@babel/types": "^7.22.5" + "@babel/types": "^7.24.7" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-plugin-utils": { - "version": "7.24.5", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.24.5.tgz", - "integrity": "sha512-xjNLDopRzW2o6ba0gKbkZq5YWEBaK3PCyTOY1K2P/O07LGMhMqlMXPxwN4S5/RhWuCobT8z0jrlKGlYmeR1OhQ==", + "version": "7.24.8", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.24.8.tgz", + "integrity": "sha512-FFWx5142D8h2Mgr/iPVGH5G7w6jDn4jUSpZTyDnQO0Yn7Ks2Kuz6Pci8H6MPCoUJegd/UZQ3tAvfLCxQSnWWwg==", "engines": { "node": ">=6.9.0" } @@ -498,13 +498,13 @@ } }, "node_modules/@babel/helper-replace-supers": { - "version": "7.24.1", - "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.24.1.tgz", - "integrity": "sha512-QCR1UqC9BzG5vZl8BMicmZ28RuUBnHhAMddD8yHFHDRH9lLTZ9uUPehX8ctVPT8l0TKblJidqcgUUKGVrePleQ==", + "version": "7.25.0", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.25.0.tgz", + "integrity": "sha512-q688zIvQVYtZu+i2PsdIu/uWGRpfxzr5WESsfpShfZECkO+d2o+WROWezCi/Q6kJ0tfPa5+pUGUlfx2HhrA3Bg==", "dependencies": { - "@babel/helper-environment-visitor": "^7.22.20", - "@babel/helper-member-expression-to-functions": "^7.23.0", - "@babel/helper-optimise-call-expression": "^7.22.5" + "@babel/helper-member-expression-to-functions": "^7.24.8", + "@babel/helper-optimise-call-expression": "^7.24.7", + "@babel/traverse": "^7.25.0" }, "engines": { "node": ">=6.9.0" @@ -525,11 +525,12 @@ } }, "node_modules/@babel/helper-skip-transparent-expression-wrappers": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.22.5.tgz", - "integrity": "sha512-tK14r66JZKiC43p8Ki33yLBVJKlQDFoA8GYN67lWCDCqoL6EMMSuM9b+Iff2jHaM/RRFYl7K+iiru7hbRqNx8Q==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.24.7.tgz", + "integrity": "sha512-IO+DLT3LQUElMbpzlatRASEyQtfhSE0+m465v++3jyyXeBTBUjtVZg28/gHeV5mrTJqvEKhKroBGAvhW+qPHiQ==", "dependencies": { - "@babel/types": "^7.22.5" + "@babel/traverse": "^7.24.7", + "@babel/types": "^7.24.7" }, "engines": { "node": ">=6.9.0" @@ -547,17 +548,17 @@ } }, "node_modules/@babel/helper-string-parser": { - "version": "7.24.1", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.24.1.tgz", - "integrity": "sha512-2ofRCjnnA9y+wk8b9IAREroeUP02KHp431N2mhKniy2yKIDKpbrHv9eXwm8cBeWQYcJmzv5qKCu65P47eCF7CQ==", + "version": "7.24.8", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.24.8.tgz", + "integrity": "sha512-pO9KhhRcuUyGnJWwyEgnRJTSIZHiT+vMD0kPeD+so0l7mxkMT19g3pjY9GTnHySck/hDzq+dtW/4VgnMkippsQ==", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.24.5", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.5.tgz", - "integrity": "sha512-3q93SSKX2TWCG30M2G2kwaKeTYgEUp5Snjuj8qm729SObL6nbtUldAi37qbxkD5gg3xnBio+f9nqpSepGZMvxA==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.7.tgz", + "integrity": "sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w==", "engines": { "node": ">=6.9.0" } @@ -597,11 +598,11 @@ } }, "node_modules/@babel/highlight": { - "version": "7.24.5", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.24.5.tgz", - "integrity": "sha512-8lLmua6AVh/8SLJRRVD6V8p73Hir9w5mJrhE+IPpILG31KKlI9iz5zmBYKcWPS59qSfgP9RaSBQSHHE81WKuEw==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.24.7.tgz", + "integrity": "sha512-EStJpq4OuY8xYfhGVXngigBJRWxftKX9ksiGDnmlY3o7B/V7KIAc9X4oiK87uPJSc/vs5L869bem5fhZa8caZw==", "dependencies": { - "@babel/helper-validator-identifier": "^7.24.5", + "@babel/helper-validator-identifier": "^7.24.7", "chalk": "^2.4.2", "js-tokens": "^4.0.0", "picocolors": "^1.0.0" @@ -611,9 +612,12 @@ } }, "node_modules/@babel/parser": { - "version": "7.24.5", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.24.5.tgz", - "integrity": "sha512-EOv5IK8arwh3LI47dz1b0tKUb/1uhHAnHJOrjgtQMIpu1uXd9mlFrJg9IUgGUgZ41Ch0K8REPTYpO7B76b4vJg==", + "version": "7.25.4", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.25.4.tgz", + "integrity": "sha512-nq+eWrOgdtu3jG5Os4TQP3x3cLA8hR8TvJNjD8vnPa20WGycimcparWnLK4jJhElTK6SDyuJo1weMKO/5LpmLA==", + "dependencies": { + "@babel/types": "^7.25.4" + }, "bin": { "parser": "bin/babel-parser.js" }, @@ -1127,12 +1131,12 @@ } }, "node_modules/@babel/plugin-transform-class-static-block": { - "version": "7.24.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-class-static-block/-/plugin-transform-class-static-block-7.24.4.tgz", - "integrity": "sha512-B8q7Pz870Hz/q9UgP8InNpY01CSLDSCyqX7zcRuv3FcPl87A2G17lASroHWaCtbdIcbYzOZ7kWmXFKbijMSmFg==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-class-static-block/-/plugin-transform-class-static-block-7.24.7.tgz", + "integrity": "sha512-HMXK3WbBPpZQufbMG4B46A90PkuuhN9vBCb5T8+VAHqvAqvcLi+2cKoukcpmUYkszLhScU3l1iudhrks3DggRQ==", "dependencies": { - "@babel/helper-create-class-features-plugin": "^7.24.4", - "@babel/helper-plugin-utils": "^7.24.0", + "@babel/helper-create-class-features-plugin": "^7.24.7", + "@babel/helper-plugin-utils": "^7.24.7", "@babel/plugin-syntax-class-static-block": "^7.14.5" }, "engines": { @@ -2052,31 +2056,28 @@ } }, "node_modules/@babel/template": { - "version": "7.24.0", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.24.0.tgz", - "integrity": "sha512-Bkf2q8lMB0AFpX0NFEqSbx1OkTHf0f+0j82mkw+ZpzBnkk7e9Ql0891vlfgi+kHwOk8tQjiQHpqh4LaSa0fKEA==", + "version": "7.25.0", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.25.0.tgz", + "integrity": "sha512-aOOgh1/5XzKvg1jvVz7AVrx2piJ2XBi227DHmbY6y+bM9H2FlN+IfecYu4Xl0cNiiVejlsCri89LUsbj8vJD9Q==", "dependencies": { - "@babel/code-frame": "^7.23.5", - "@babel/parser": "^7.24.0", - "@babel/types": "^7.24.0" + "@babel/code-frame": "^7.24.7", + "@babel/parser": "^7.25.0", + "@babel/types": "^7.25.0" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/traverse": { - "version": "7.24.5", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.24.5.tgz", - "integrity": "sha512-7aaBLeDQ4zYcUFDUD41lJc1fG8+5IU9DaNSJAgal866FGvmD5EbWQgnEC6kO1gGLsX0esNkfnJSndbTXA3r7UA==", - "dependencies": { - "@babel/code-frame": "^7.24.2", - "@babel/generator": "^7.24.5", - "@babel/helper-environment-visitor": "^7.22.20", - "@babel/helper-function-name": "^7.23.0", - "@babel/helper-hoist-variables": "^7.22.5", - "@babel/helper-split-export-declaration": "^7.24.5", - "@babel/parser": "^7.24.5", - "@babel/types": "^7.24.5", + "version": "7.25.4", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.25.4.tgz", + "integrity": "sha512-VJ4XsrD+nOvlXyLzmLzUs/0qjFS4sK30te5yEFlvbbUNEgKaVb2BHZUpAL+ttLPQAHNrsI3zZisbfha5Cvr8vg==", + "dependencies": { + "@babel/code-frame": "^7.24.7", + "@babel/generator": "^7.25.4", + "@babel/parser": "^7.25.4", + "@babel/template": "^7.25.0", + "@babel/types": "^7.25.4", "debug": "^4.3.1", "globals": "^11.1.0" }, @@ -2085,12 +2086,12 @@ } }, "node_modules/@babel/types": { - "version": "7.24.5", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.5.tgz", - "integrity": "sha512-6mQNsaLeXTw0nxYUYu+NSa4Hx4BlF1x1x8/PMFbiR+GBSr+2DkECc69b8hgy2frEodNcvPffeH8YfWd3LI6jhQ==", + "version": "7.25.4", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.25.4.tgz", + "integrity": "sha512-zQ1ijeeCXVEh+aNL0RlmkPkG8HUiDcU2pzQQFjtbntgAczRASFzj4H+6+bV+dy1ntKR14I/DypeuRG1uma98iQ==", "dependencies": { - "@babel/helper-string-parser": "^7.24.1", - "@babel/helper-validator-identifier": "^7.24.5", + "@babel/helper-string-parser": "^7.24.8", + "@babel/helper-validator-identifier": "^7.24.7", "to-fast-properties": "^2.0.0" }, "engines": { @@ -17090,11 +17091,11 @@ } }, "@babel/code-frame": { - "version": "7.24.2", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.24.2.tgz", - "integrity": "sha512-y5+tLQyV8pg3fsiln67BVLD1P13Eg4lh5RW9mF0zUuvLrv9uIQ4MCL+CRT+FTsBlBjcIan6PGsLcBN0m3ClUyQ==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.24.7.tgz", + "integrity": "sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA==", "requires": { - "@babel/highlight": "^7.24.2", + "@babel/highlight": "^7.24.7", "picocolors": "^1.0.0" } }, @@ -17133,22 +17134,22 @@ } }, "@babel/generator": { - "version": "7.24.5", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.24.5.tgz", - "integrity": "sha512-x32i4hEXvr+iI0NEoEfDKzlemF8AmtOP8CcrRaEcpzysWuoEb1KknpcvMsHKPONoKZiDuItklgWhB18xEhr9PA==", + "version": "7.25.5", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.25.5.tgz", + "integrity": "sha512-abd43wyLfbWoxC6ahM8xTkqLpGB2iWBVyuKC9/srhFunCd1SDNrV1s72bBpK4hLj8KLzHBBcOblvLQZBNw9r3w==", "requires": { - "@babel/types": "^7.24.5", + "@babel/types": "^7.25.4", "@jridgewell/gen-mapping": "^0.3.5", "@jridgewell/trace-mapping": "^0.3.25", "jsesc": "^2.5.1" } }, "@babel/helper-annotate-as-pure": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.22.5.tgz", - "integrity": "sha512-LvBTxu8bQSQkcyKOU+a1btnNFQ1dMAd0R6PyW3arXes06F6QLWLIrd681bxRPIXlrMGR3XYnW9JyML7dP3qgxg==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.24.7.tgz", + "integrity": "sha512-BaDeOonYvhdKw+JoMVkAixAAJzG2jVPIwWoKBPdYuY9b452e2rPuI9QPYh3KpofZ3pW2akOmwZLOiOsHMiqRAg==", "requires": { - "@babel/types": "^7.22.5" + "@babel/types": "^7.24.7" } }, "@babel/helper-builder-binary-assignment-operator-visitor": { @@ -17179,18 +17180,16 @@ } }, "@babel/helper-create-class-features-plugin": { - "version": "7.24.5", - "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.24.5.tgz", - "integrity": "sha512-uRc4Cv8UQWnE4NXlYTIIdM7wfFkOqlFztcC/gVXDKohKoVB3OyonfelUBaJzSwpBntZ2KYGF/9S7asCHsXwW6g==", - "requires": { - "@babel/helper-annotate-as-pure": "^7.22.5", - "@babel/helper-environment-visitor": "^7.22.20", - "@babel/helper-function-name": "^7.23.0", - "@babel/helper-member-expression-to-functions": "^7.24.5", - "@babel/helper-optimise-call-expression": "^7.22.5", - "@babel/helper-replace-supers": "^7.24.1", - "@babel/helper-skip-transparent-expression-wrappers": "^7.22.5", - "@babel/helper-split-export-declaration": "^7.24.5", + "version": "7.25.4", + "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.25.4.tgz", + "integrity": "sha512-ro/bFs3/84MDgDmMwbcHgDa8/E6J3QKNTk4xJJnVeFtGE+tL0K26E3pNxhYz2b67fJpt7Aphw5XcploKXuCvCQ==", + "requires": { + "@babel/helper-annotate-as-pure": "^7.24.7", + "@babel/helper-member-expression-to-functions": "^7.24.8", + "@babel/helper-optimise-call-expression": "^7.24.7", + "@babel/helper-replace-supers": "^7.25.0", + "@babel/helper-skip-transparent-expression-wrappers": "^7.24.7", + "@babel/traverse": "^7.25.4", "semver": "^6.3.1" }, "dependencies": { @@ -17253,11 +17252,12 @@ } }, "@babel/helper-member-expression-to-functions": { - "version": "7.24.5", - "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.24.5.tgz", - "integrity": "sha512-4owRteeihKWKamtqg4JmWSsEZU445xpFRXPEwp44HbgbxdWlUV1b4Agg4lkA806Lil5XM/e+FJyS0vj5T6vmcA==", + "version": "7.24.8", + "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.24.8.tgz", + "integrity": "sha512-LABppdt+Lp/RlBxqrh4qgf1oEH/WxdzQNDJIu5gC/W1GyvPVrOBiItmmM8wan2fm4oYqFuFfkXmlGpLQhPY8CA==", "requires": { - "@babel/types": "^7.24.5" + "@babel/traverse": "^7.24.8", + "@babel/types": "^7.24.8" } }, "@babel/helper-module-imports": { @@ -17281,17 +17281,17 @@ } }, "@babel/helper-optimise-call-expression": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.22.5.tgz", - "integrity": "sha512-HBwaojN0xFRx4yIvpwGqxiV2tUfl7401jlok564NgB9EHS1y6QT17FmKWm4ztqjeVdXLuC4fSvHc5ePpQjoTbw==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.24.7.tgz", + "integrity": "sha512-jKiTsW2xmWwxT1ixIdfXUZp+P5yURx2suzLZr5Hi64rURpDYdMW0pv+Uf17EYk2Rd428Lx4tLsnjGJzYKDM/6A==", "requires": { - "@babel/types": "^7.22.5" + "@babel/types": "^7.24.7" } }, "@babel/helper-plugin-utils": { - "version": "7.24.5", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.24.5.tgz", - "integrity": "sha512-xjNLDopRzW2o6ba0gKbkZq5YWEBaK3PCyTOY1K2P/O07LGMhMqlMXPxwN4S5/RhWuCobT8z0jrlKGlYmeR1OhQ==" + "version": "7.24.8", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.24.8.tgz", + "integrity": "sha512-FFWx5142D8h2Mgr/iPVGH5G7w6jDn4jUSpZTyDnQO0Yn7Ks2Kuz6Pci8H6MPCoUJegd/UZQ3tAvfLCxQSnWWwg==" }, "@babel/helper-remap-async-to-generator": { "version": "7.22.20", @@ -17304,13 +17304,13 @@ } }, "@babel/helper-replace-supers": { - "version": "7.24.1", - "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.24.1.tgz", - "integrity": "sha512-QCR1UqC9BzG5vZl8BMicmZ28RuUBnHhAMddD8yHFHDRH9lLTZ9uUPehX8ctVPT8l0TKblJidqcgUUKGVrePleQ==", + "version": "7.25.0", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.25.0.tgz", + "integrity": "sha512-q688zIvQVYtZu+i2PsdIu/uWGRpfxzr5WESsfpShfZECkO+d2o+WROWezCi/Q6kJ0tfPa5+pUGUlfx2HhrA3Bg==", "requires": { - "@babel/helper-environment-visitor": "^7.22.20", - "@babel/helper-member-expression-to-functions": "^7.23.0", - "@babel/helper-optimise-call-expression": "^7.22.5" + "@babel/helper-member-expression-to-functions": "^7.24.8", + "@babel/helper-optimise-call-expression": "^7.24.7", + "@babel/traverse": "^7.25.0" } }, "@babel/helper-simple-access": { @@ -17322,11 +17322,12 @@ } }, "@babel/helper-skip-transparent-expression-wrappers": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.22.5.tgz", - "integrity": "sha512-tK14r66JZKiC43p8Ki33yLBVJKlQDFoA8GYN67lWCDCqoL6EMMSuM9b+Iff2jHaM/RRFYl7K+iiru7hbRqNx8Q==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.24.7.tgz", + "integrity": "sha512-IO+DLT3LQUElMbpzlatRASEyQtfhSE0+m465v++3jyyXeBTBUjtVZg28/gHeV5mrTJqvEKhKroBGAvhW+qPHiQ==", "requires": { - "@babel/types": "^7.22.5" + "@babel/traverse": "^7.24.7", + "@babel/types": "^7.24.7" } }, "@babel/helper-split-export-declaration": { @@ -17338,14 +17339,14 @@ } }, "@babel/helper-string-parser": { - "version": "7.24.1", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.24.1.tgz", - "integrity": "sha512-2ofRCjnnA9y+wk8b9IAREroeUP02KHp431N2mhKniy2yKIDKpbrHv9eXwm8cBeWQYcJmzv5qKCu65P47eCF7CQ==" + "version": "7.24.8", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.24.8.tgz", + "integrity": "sha512-pO9KhhRcuUyGnJWwyEgnRJTSIZHiT+vMD0kPeD+so0l7mxkMT19g3pjY9GTnHySck/hDzq+dtW/4VgnMkippsQ==" }, "@babel/helper-validator-identifier": { - "version": "7.24.5", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.5.tgz", - "integrity": "sha512-3q93SSKX2TWCG30M2G2kwaKeTYgEUp5Snjuj8qm729SObL6nbtUldAi37qbxkD5gg3xnBio+f9nqpSepGZMvxA==" + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.7.tgz", + "integrity": "sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w==" }, "@babel/helper-validator-option": { "version": "7.23.5", @@ -17373,20 +17374,23 @@ } }, "@babel/highlight": { - "version": "7.24.5", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.24.5.tgz", - "integrity": "sha512-8lLmua6AVh/8SLJRRVD6V8p73Hir9w5mJrhE+IPpILG31KKlI9iz5zmBYKcWPS59qSfgP9RaSBQSHHE81WKuEw==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.24.7.tgz", + "integrity": "sha512-EStJpq4OuY8xYfhGVXngigBJRWxftKX9ksiGDnmlY3o7B/V7KIAc9X4oiK87uPJSc/vs5L869bem5fhZa8caZw==", "requires": { - "@babel/helper-validator-identifier": "^7.24.5", + "@babel/helper-validator-identifier": "^7.24.7", "chalk": "^2.4.2", "js-tokens": "^4.0.0", "picocolors": "^1.0.0" } }, "@babel/parser": { - "version": "7.24.5", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.24.5.tgz", - "integrity": "sha512-EOv5IK8arwh3LI47dz1b0tKUb/1uhHAnHJOrjgtQMIpu1uXd9mlFrJg9IUgGUgZ41Ch0K8REPTYpO7B76b4vJg==" + "version": "7.25.4", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.25.4.tgz", + "integrity": "sha512-nq+eWrOgdtu3jG5Os4TQP3x3cLA8hR8TvJNjD8vnPa20WGycimcparWnLK4jJhElTK6SDyuJo1weMKO/5LpmLA==", + "requires": { + "@babel/types": "^7.25.4" + } }, "@babel/plugin-bugfix-firefox-class-in-computed-class-key": { "version": "7.24.5", @@ -17705,12 +17709,12 @@ } }, "@babel/plugin-transform-class-static-block": { - "version": "7.24.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-class-static-block/-/plugin-transform-class-static-block-7.24.4.tgz", - "integrity": "sha512-B8q7Pz870Hz/q9UgP8InNpY01CSLDSCyqX7zcRuv3FcPl87A2G17lASroHWaCtbdIcbYzOZ7kWmXFKbijMSmFg==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-class-static-block/-/plugin-transform-class-static-block-7.24.7.tgz", + "integrity": "sha512-HMXK3WbBPpZQufbMG4B46A90PkuuhN9vBCb5T8+VAHqvAqvcLi+2cKoukcpmUYkszLhScU3l1iudhrks3DggRQ==", "requires": { - "@babel/helper-create-class-features-plugin": "^7.24.4", - "@babel/helper-plugin-utils": "^7.24.0", + "@babel/helper-create-class-features-plugin": "^7.24.7", + "@babel/helper-plugin-utils": "^7.24.7", "@babel/plugin-syntax-class-static-block": "^7.14.5" } }, @@ -18310,39 +18314,36 @@ } }, "@babel/template": { - "version": "7.24.0", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.24.0.tgz", - "integrity": "sha512-Bkf2q8lMB0AFpX0NFEqSbx1OkTHf0f+0j82mkw+ZpzBnkk7e9Ql0891vlfgi+kHwOk8tQjiQHpqh4LaSa0fKEA==", + "version": "7.25.0", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.25.0.tgz", + "integrity": "sha512-aOOgh1/5XzKvg1jvVz7AVrx2piJ2XBi227DHmbY6y+bM9H2FlN+IfecYu4Xl0cNiiVejlsCri89LUsbj8vJD9Q==", "requires": { - "@babel/code-frame": "^7.23.5", - "@babel/parser": "^7.24.0", - "@babel/types": "^7.24.0" + "@babel/code-frame": "^7.24.7", + "@babel/parser": "^7.25.0", + "@babel/types": "^7.25.0" } }, "@babel/traverse": { - "version": "7.24.5", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.24.5.tgz", - "integrity": "sha512-7aaBLeDQ4zYcUFDUD41lJc1fG8+5IU9DaNSJAgal866FGvmD5EbWQgnEC6kO1gGLsX0esNkfnJSndbTXA3r7UA==", - "requires": { - "@babel/code-frame": "^7.24.2", - "@babel/generator": "^7.24.5", - "@babel/helper-environment-visitor": "^7.22.20", - "@babel/helper-function-name": "^7.23.0", - "@babel/helper-hoist-variables": "^7.22.5", - "@babel/helper-split-export-declaration": "^7.24.5", - "@babel/parser": "^7.24.5", - "@babel/types": "^7.24.5", + "version": "7.25.4", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.25.4.tgz", + "integrity": "sha512-VJ4XsrD+nOvlXyLzmLzUs/0qjFS4sK30te5yEFlvbbUNEgKaVb2BHZUpAL+ttLPQAHNrsI3zZisbfha5Cvr8vg==", + "requires": { + "@babel/code-frame": "^7.24.7", + "@babel/generator": "^7.25.4", + "@babel/parser": "^7.25.4", + "@babel/template": "^7.25.0", + "@babel/types": "^7.25.4", "debug": "^4.3.1", "globals": "^11.1.0" } }, "@babel/types": { - "version": "7.24.5", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.5.tgz", - "integrity": "sha512-6mQNsaLeXTw0nxYUYu+NSa4Hx4BlF1x1x8/PMFbiR+GBSr+2DkECc69b8hgy2frEodNcvPffeH8YfWd3LI6jhQ==", + "version": "7.25.4", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.25.4.tgz", + "integrity": "sha512-zQ1ijeeCXVEh+aNL0RlmkPkG8HUiDcU2pzQQFjtbntgAczRASFzj4H+6+bV+dy1ntKR14I/DypeuRG1uma98iQ==", "requires": { - "@babel/helper-string-parser": "^7.24.1", - "@babel/helper-validator-identifier": "^7.24.5", + "@babel/helper-string-parser": "^7.24.8", + "@babel/helper-validator-identifier": "^7.24.7", "to-fast-properties": "^2.0.0" } }, diff --git a/package.json b/package.json index 3fb30f2ea70..1b3450c0c10 100644 --- a/package.json +++ b/package.json @@ -70,6 +70,7 @@ "@babel/plugin-syntax-dynamic-import": "^7.8.3", "@babel/plugin-syntax-import-meta": "^7.10.4", "@babel/plugin-transform-async-to-generator": "^7.22.5", + "@babel/plugin-transform-class-static-block": "^7.24.7", "@babel/plugin-transform-exponentiation-operator": "^7.22.5", "@babel/plugin-transform-for-of": "^7.22.15", "@babel/plugin-transform-runtime": "7.23.3", @@ -165,6 +166,7 @@ "@rollup/plugin-commonjs": "^11.0.2", "@rollup/plugin-inject": "^4.0.2", "@rollup/plugin-node-resolve": "^7.1.1", + "@testcafe/publish-please": "^5.6.0", "@types/callsite": "^1.0.30", "@types/chai": "^3.5.2", "@types/debug": "^4.1.5", @@ -221,7 +223,6 @@ "multer": "1.4.4-lts.1", "openssl-self-signed-certificate": "^1.1.6", "proxyquire": "^2.1.0", - "@testcafe/publish-please": "^5.6.0", "react": "^16.13.1", "recursive-copy": "^2.0.5", "rollup": "2.16.1", diff --git a/src/compiler/babel/load-libs.js b/src/compiler/babel/load-libs.js index a4ceef035cc..dcf950512ca 100644 --- a/src/compiler/babel/load-libs.js +++ b/src/compiler/babel/load-libs.js @@ -69,5 +69,6 @@ export default function loadLibs ({ esm } = {}) { presetReact: getPresetReact(), proposalPrivateMethods: [require('@babel/plugin-proposal-private-methods'), { loose: true }], proposalClassProperties: [require('@babel/plugin-proposal-class-properties'), { loose: true }], + transformClassStaticBlock: require('@babel/plugin-transform-class-static-block'), }; } diff --git a/src/compiler/test-file/formats/es-next/compiler.js b/src/compiler/test-file/formats/es-next/compiler.js index fc672ddfd98..523d9073670 100644 --- a/src/compiler/test-file/formats/es-next/compiler.js +++ b/src/compiler/test-file/formats/es-next/compiler.js @@ -23,11 +23,12 @@ export default class ESNextTestFileCompiler extends APIBasedTestFileCompilerBase moduleResolver, proposalPrivateMethods, proposalClassProperties, + transformClassStaticBlock, } = loadBabelLibs({ esm }); const opts = Object.assign({}, BASE_BABEL_OPTIONS, { presets: [presetStage2, presetEnvForTestCode, presetReact], - plugins: [transformRuntime, moduleResolver, proposalPrivateMethods, proposalClassProperties], + plugins: [transformRuntime, moduleResolver, proposalPrivateMethods, proposalClassProperties, transformClassStaticBlock], sourceMaps: 'inline', filename, }); From c89ed9f32a7d45f1cb0ef17a0ea9ca6d3315f591 Mon Sep 17 00:00:00 2001 From: Bayheck Date: Wed, 28 Aug 2024 12:36:24 +0500 Subject: [PATCH 2/8] add: tests added --- test/functional/fixtures/regression/gh-8245/test.js | 5 +++++ .../fixtures/regression/gh-8245/testcafe-fixtures/index.js | 7 +++++++ .../fixtures/regression/gh-8245/testcafe-fixtures/lib.js | 3 +++ 3 files changed, 15 insertions(+) create mode 100644 test/functional/fixtures/regression/gh-8245/test.js create mode 100644 test/functional/fixtures/regression/gh-8245/testcafe-fixtures/index.js create mode 100644 test/functional/fixtures/regression/gh-8245/testcafe-fixtures/lib.js diff --git a/test/functional/fixtures/regression/gh-8245/test.js b/test/functional/fixtures/regression/gh-8245/test.js new file mode 100644 index 00000000000..8241c232d48 --- /dev/null +++ b/test/functional/fixtures/regression/gh-8245/test.js @@ -0,0 +1,5 @@ +describe('[Regression](GH-8245)', function () { + it('Should run test with static class blocks', function () { + return runTests('testcafe-fixtures/index.js'); + }); +}); diff --git a/test/functional/fixtures/regression/gh-8245/testcafe-fixtures/index.js b/test/functional/fixtures/regression/gh-8245/testcafe-fixtures/index.js new file mode 100644 index 00000000000..fbb5329e9c5 --- /dev/null +++ b/test/functional/fixtures/regression/gh-8245/testcafe-fixtures/index.js @@ -0,0 +1,7 @@ +import { ClassThatUsesStatic } from './lib'; + +fixture('GH-8245 - Should run test with static class blocks'); + +test('Click on a split link', async () => { + ClassThatUsesStatic.foo; +}); diff --git a/test/functional/fixtures/regression/gh-8245/testcafe-fixtures/lib.js b/test/functional/fixtures/regression/gh-8245/testcafe-fixtures/lib.js new file mode 100644 index 00000000000..bd2f62e81ba --- /dev/null +++ b/test/functional/fixtures/regression/gh-8245/testcafe-fixtures/lib.js @@ -0,0 +1,3 @@ +export class ClassThatUsesStatic { + static { this.foo = true; } +} From 865832fed0d01d40d62d821719de65a564946634 Mon Sep 17 00:00:00 2001 From: Bayheck Date: Wed, 28 Aug 2024 16:50:34 +0500 Subject: [PATCH 3/8] test: updated test --- .../fixtures/regression/gh-8245/testcafe-fixtures/index.js | 2 +- .../fixtures/regression/gh-8245/testcafe-fixtures/lib.js | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/test/functional/fixtures/regression/gh-8245/testcafe-fixtures/index.js b/test/functional/fixtures/regression/gh-8245/testcafe-fixtures/index.js index fbb5329e9c5..89c89f34686 100644 --- a/test/functional/fixtures/regression/gh-8245/testcafe-fixtures/index.js +++ b/test/functional/fixtures/regression/gh-8245/testcafe-fixtures/index.js @@ -1,4 +1,4 @@ -import { ClassThatUsesStatic } from './lib'; +import ClassThatUsesStatic from './lib.js'; fixture('GH-8245 - Should run test with static class blocks'); diff --git a/test/functional/fixtures/regression/gh-8245/testcafe-fixtures/lib.js b/test/functional/fixtures/regression/gh-8245/testcafe-fixtures/lib.js index bd2f62e81ba..0bb5c103a3c 100644 --- a/test/functional/fixtures/regression/gh-8245/testcafe-fixtures/lib.js +++ b/test/functional/fixtures/regression/gh-8245/testcafe-fixtures/lib.js @@ -1,3 +1,5 @@ -export class ClassThatUsesStatic { +class ClassThatUsesStatic { static { this.foo = true; } } + +export default ClassThatUsesStatic; From 5ff85038f2b2cda1e2b2891b15a0c1bd6b9fa227 Mon Sep 17 00:00:00 2001 From: Bayheck Date: Fri, 30 Aug 2024 17:07:39 +0500 Subject: [PATCH 4/8] tests updated --- .../fixtures/regression/gh-8245/test.js | 5 ----- .../gh-8245/testcafe-fixtures/index.js | 7 ------- test/server/compiler-test.js | 18 ++++++++++++++++++ .../data/test-suites/basic/dep3.js} | 0 .../server/data/test-suites/basic/testfile5.js | 7 +++++++ 5 files changed, 25 insertions(+), 12 deletions(-) delete mode 100644 test/functional/fixtures/regression/gh-8245/test.js delete mode 100644 test/functional/fixtures/regression/gh-8245/testcafe-fixtures/index.js rename test/{functional/fixtures/regression/gh-8245/testcafe-fixtures/lib.js => server/data/test-suites/basic/dep3.js} (100%) create mode 100644 test/server/data/test-suites/basic/testfile5.js diff --git a/test/functional/fixtures/regression/gh-8245/test.js b/test/functional/fixtures/regression/gh-8245/test.js deleted file mode 100644 index 8241c232d48..00000000000 --- a/test/functional/fixtures/regression/gh-8245/test.js +++ /dev/null @@ -1,5 +0,0 @@ -describe('[Regression](GH-8245)', function () { - it('Should run test with static class blocks', function () { - return runTests('testcafe-fixtures/index.js'); - }); -}); diff --git a/test/functional/fixtures/regression/gh-8245/testcafe-fixtures/index.js b/test/functional/fixtures/regression/gh-8245/testcafe-fixtures/index.js deleted file mode 100644 index 89c89f34686..00000000000 --- a/test/functional/fixtures/regression/gh-8245/testcafe-fixtures/index.js +++ /dev/null @@ -1,7 +0,0 @@ -import ClassThatUsesStatic from './lib.js'; - -fixture('GH-8245 - Should run test with static class blocks'); - -test('Click on a split link', async () => { - ClassThatUsesStatic.foo; -}); diff --git a/test/server/compiler-test.js b/test/server/compiler-test.js index 8a522c4c047..faff99776eb 100644 --- a/test/server/compiler-test.js +++ b/test/server/compiler-test.js @@ -236,6 +236,24 @@ describe('Compiler', function () { expect(results.inventory).to.equal('42 yoyo'); }); }); + + it('Should compile test with static class blocks', function () { + const sources = [ + 'test/server/data/test-suites/basic/testfile5.js', + ]; + + return compile(sources) + .then(function (compiled) { + const tests = compiled.tests; + const fixtures = compiled.fixtures; + + expect(tests.length).eql(1); + expect(fixtures.length).eql(1); + + expect(tests[0].name).eql('Fixture6Test1'); + expect(fixtures[0].name).eql('Fixture6'); + }); + }); }); describe('TypeScript', function () { diff --git a/test/functional/fixtures/regression/gh-8245/testcafe-fixtures/lib.js b/test/server/data/test-suites/basic/dep3.js similarity index 100% rename from test/functional/fixtures/regression/gh-8245/testcafe-fixtures/lib.js rename to test/server/data/test-suites/basic/dep3.js diff --git a/test/server/data/test-suites/basic/testfile5.js b/test/server/data/test-suites/basic/testfile5.js new file mode 100644 index 00000000000..8a9ba07cb94 --- /dev/null +++ b/test/server/data/test-suites/basic/testfile5.js @@ -0,0 +1,7 @@ +import ClassThatUsesStatic from './dep3.js'; + +fixture('Fixture6'); + +test('Fixture6Test1', async () => { + ClassThatUsesStatic.foo; +}); From acb9116e3b39ba32707a115bbcc1b28812175d57 Mon Sep 17 00:00:00 2001 From: Bayheck Date: Mon, 2 Sep 2024 11:19:36 +0500 Subject: [PATCH 5/8] fix: tests fixed --- test/server/compiler-test.js | 6 +++--- test/server/data/test-suites/basic/testfile5.js | 7 ------- .../{basic/dep3.js => class-with-static/dep.js} | 0 test/server/data/test-suites/class-with-static/testfile.js | 7 +++++++ 4 files changed, 10 insertions(+), 10 deletions(-) delete mode 100644 test/server/data/test-suites/basic/testfile5.js rename test/server/data/test-suites/{basic/dep3.js => class-with-static/dep.js} (100%) create mode 100644 test/server/data/test-suites/class-with-static/testfile.js diff --git a/test/server/compiler-test.js b/test/server/compiler-test.js index faff99776eb..9bf2cb82ea1 100644 --- a/test/server/compiler-test.js +++ b/test/server/compiler-test.js @@ -239,7 +239,7 @@ describe('Compiler', function () { it('Should compile test with static class blocks', function () { const sources = [ - 'test/server/data/test-suites/basic/testfile5.js', + 'test/server/data/test-suites/class-with-static/testfile.js', ]; return compile(sources) @@ -250,8 +250,8 @@ describe('Compiler', function () { expect(tests.length).eql(1); expect(fixtures.length).eql(1); - expect(tests[0].name).eql('Fixture6Test1'); - expect(fixtures[0].name).eql('Fixture6'); + expect(tests[0].name).eql('Test'); + expect(fixtures[0].name).eql('Fixture'); }); }); }); diff --git a/test/server/data/test-suites/basic/testfile5.js b/test/server/data/test-suites/basic/testfile5.js deleted file mode 100644 index 8a9ba07cb94..00000000000 --- a/test/server/data/test-suites/basic/testfile5.js +++ /dev/null @@ -1,7 +0,0 @@ -import ClassThatUsesStatic from './dep3.js'; - -fixture('Fixture6'); - -test('Fixture6Test1', async () => { - ClassThatUsesStatic.foo; -}); diff --git a/test/server/data/test-suites/basic/dep3.js b/test/server/data/test-suites/class-with-static/dep.js similarity index 100% rename from test/server/data/test-suites/basic/dep3.js rename to test/server/data/test-suites/class-with-static/dep.js diff --git a/test/server/data/test-suites/class-with-static/testfile.js b/test/server/data/test-suites/class-with-static/testfile.js new file mode 100644 index 00000000000..e958ba56501 --- /dev/null +++ b/test/server/data/test-suites/class-with-static/testfile.js @@ -0,0 +1,7 @@ +import ClassThatUsesStatic from './dep.js'; + +fixture('Fixture'); + +test('Test', async () => { + ClassThatUsesStatic.foo; +}); From bfc6136c1da467321d56ec5604c74c60d899be4c Mon Sep 17 00:00:00 2001 From: Bayheck Date: Tue, 3 Sep 2024 15:23:09 +0500 Subject: [PATCH 6/8] testing --- test/server/compiler-test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/server/compiler-test.js b/test/server/compiler-test.js index 9bf2cb82ea1..48be6dd3db1 100644 --- a/test/server/compiler-test.js +++ b/test/server/compiler-test.js @@ -237,7 +237,7 @@ describe('Compiler', function () { }); }); - it('Should compile test with static class blocks', function () { + it.skip('Should compile test with static class blocks', function () { const sources = [ 'test/server/data/test-suites/class-with-static/testfile.js', ]; From 8e8ba1a67a67224123a8a69f0bfb5d226d696ccf Mon Sep 17 00:00:00 2001 From: Bayheck Date: Tue, 3 Sep 2024 16:26:02 +0500 Subject: [PATCH 7/8] testing --- test/server/data/test-suites/class-with-static/dep.js | 5 ----- test/server/data/test-suites/class-with-static/testfile.js | 7 ------- 2 files changed, 12 deletions(-) delete mode 100644 test/server/data/test-suites/class-with-static/dep.js delete mode 100644 test/server/data/test-suites/class-with-static/testfile.js diff --git a/test/server/data/test-suites/class-with-static/dep.js b/test/server/data/test-suites/class-with-static/dep.js deleted file mode 100644 index 0bb5c103a3c..00000000000 --- a/test/server/data/test-suites/class-with-static/dep.js +++ /dev/null @@ -1,5 +0,0 @@ -class ClassThatUsesStatic { - static { this.foo = true; } -} - -export default ClassThatUsesStatic; diff --git a/test/server/data/test-suites/class-with-static/testfile.js b/test/server/data/test-suites/class-with-static/testfile.js deleted file mode 100644 index e958ba56501..00000000000 --- a/test/server/data/test-suites/class-with-static/testfile.js +++ /dev/null @@ -1,7 +0,0 @@ -import ClassThatUsesStatic from './dep.js'; - -fixture('Fixture'); - -test('Test', async () => { - ClassThatUsesStatic.foo; -}); From f1481e33c5d711c66cbb900c54277da5b94c6d5e Mon Sep 17 00:00:00 2001 From: Bayheck Date: Tue, 3 Sep 2024 20:03:07 +0500 Subject: [PATCH 8/8] tests fixed --- package-lock.json | 2 +- package.json | 2 +- test/server/compiler-test.js | 2 +- test/server/data/test-suites/class-with-static/dep.js | 5 +++++ test/server/data/test-suites/class-with-static/testfile.js | 7 +++++++ 5 files changed, 15 insertions(+), 3 deletions(-) create mode 100644 test/server/data/test-suites/class-with-static/dep.js create mode 100644 test/server/data/test-suites/class-with-static/testfile.js diff --git a/package-lock.json b/package-lock.json index 2847976210d..f5586e89f7d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -28,7 +28,7 @@ "@babel/runtime": "^7.23.2", "@devexpress/bin-v8-flags-filter": "^1.3.0", "@devexpress/callsite-record": "^4.1.6", - "@types/node": "^20.14.5", + "@types/node": "20.14.5", "address": "^2.0.2", "async-exit-hook": "^1.1.2", "babel-plugin-module-resolver": "5.0.0", diff --git a/package.json b/package.json index 1b3450c0c10..7cb084638c0 100644 --- a/package.json +++ b/package.json @@ -80,7 +80,7 @@ "@babel/runtime": "^7.23.2", "@devexpress/bin-v8-flags-filter": "^1.3.0", "@devexpress/callsite-record": "^4.1.6", - "@types/node": "^20.14.5", + "@types/node": "20.14.5", "address": "^2.0.2", "async-exit-hook": "^1.1.2", "babel-plugin-module-resolver": "5.0.0", diff --git a/test/server/compiler-test.js b/test/server/compiler-test.js index 48be6dd3db1..9bf2cb82ea1 100644 --- a/test/server/compiler-test.js +++ b/test/server/compiler-test.js @@ -237,7 +237,7 @@ describe('Compiler', function () { }); }); - it.skip('Should compile test with static class blocks', function () { + it('Should compile test with static class blocks', function () { const sources = [ 'test/server/data/test-suites/class-with-static/testfile.js', ]; diff --git a/test/server/data/test-suites/class-with-static/dep.js b/test/server/data/test-suites/class-with-static/dep.js new file mode 100644 index 00000000000..c4306cd296e --- /dev/null +++ b/test/server/data/test-suites/class-with-static/dep.js @@ -0,0 +1,5 @@ +class ClassThatUsesStatic { + static { this.foo = true; } +} + +export default ClassThatUsesStatic; \ No newline at end of file diff --git a/test/server/data/test-suites/class-with-static/testfile.js b/test/server/data/test-suites/class-with-static/testfile.js new file mode 100644 index 00000000000..b6578cd6e76 --- /dev/null +++ b/test/server/data/test-suites/class-with-static/testfile.js @@ -0,0 +1,7 @@ +import ClassThatUsesStatic from './dep.js'; + +fixture('Fixture'); + +test('Test', async () => { + ClassThatUsesStatic.foo; +}); \ No newline at end of file