This is an automated email from the ASF dual-hosted git repository.

thiagohp pushed a commit to branch feature/coffeescript-to-typescript
in repository https://gitbox.apache.org/repos/asf/tapestry-5.git

commit 75881a205f4ae4423673264df1e89ec7ad0ac679
Author: Thiago H. de Paula Figueiredo <thi...@arsmachina.com.br>
AuthorDate: Sat Apr 19 18:09:39 2025 -0300

    TAP5-2804: removing last remnants of CoffeeScript
---
 buildSrc/build.gradle                              |  17 ----
 .../main/groovy/t5build/CompileCoffeeScript.groovy |  58 ------------
 .../groovy/t5build/PreprocessCoffeeScript.groovy   | 103 ---------------------
 .../java/org/apache/tapestry5/validator/Email.java |   2 +-
 tapestry-core/src/main/typescript/package.json     |   1 -
 5 files changed, 1 insertion(+), 180 deletions(-)

diff --git a/buildSrc/build.gradle b/buildSrc/build.gradle
deleted file mode 100644
index c08ff05d4..000000000
--- a/buildSrc/build.gradle
+++ /dev/null
@@ -1,17 +0,0 @@
-apply plugin: "groovy"
-
-repositories {
-    mavenCentral()
-}
-
-
-dependencies {
-    implementation ("ro.isdc.wro4j:wro4j-extensions:1.8.0"){
-      exclude group: 'org.jruby'
-      exclude module: 'spring-web'
-      exclude module: 'closure-compiler'
-      exclude module: 'gmaven-runtime-1.7'
-      exclude module: 'less4j'
-    }
-    gradleApi()
-}
diff --git a/buildSrc/src/main/groovy/t5build/CompileCoffeeScript.groovy 
b/buildSrc/src/main/groovy/t5build/CompileCoffeeScript.groovy
deleted file mode 100644
index 19bc8aa6c..000000000
--- a/buildSrc/src/main/groovy/t5build/CompileCoffeeScript.groovy
+++ /dev/null
@@ -1,58 +0,0 @@
-package t5build
-
-import ro.isdc.wro.model.resource.*
-import ro.isdc.wro.extensions.processor.js.*
-import ro.isdc.wro.extensions.processor.support.coffeescript.*
-import org.gradle.api.*
-import org.gradle.api.tasks.*
-
-class CompileCoffeeScript extends DefaultTask {
-
-    {
-        description = "Compiles CoffeeScript sources into JavaScript"
-        group = "build"
-    }
-
-    def srcDir = "src/main/coffeescript"
-
-    def outputDir = "${project.buildDir}/compiled-coffeescript"
-
-    @InputDirectory
-    File getSrcDir() { project.file(srcDir) }
-
-    @OutputDirectory
-    File getOutputDir() { project.file(outputDir) }
-
-    @TaskAction
-    void doCompile() {
-        logger.info "Compiling CoffeeScript sources from $srcDir into 
$outputDir"
-
-        def outputDirFile = getOutputDir()
-        // Recursively delete output directory if it exists
-        outputDirFile.deleteDir()
-
-        def tree = project.fileTree srcDir, {
-            include '**/*.coffee'
-        }
-
-        def processor = new RhinoCoffeeScriptProcessor()
-
-        tree.visit { visit ->
-            if (visit.directory) return
-
-            def inputFile = visit.file
-            def inputPath = visit.path
-            def outputPath = inputPath.replaceAll(/\.coffee$/, '.js')
-            def outputFile = new File(outputDirFile, outputPath)
-
-            logger.info "Compiling ${inputPath}"
-
-            outputFile.parentFile.mkdirs()
-
-            def resource = Resource.create(inputFile.absolutePath, 
ResourceType.JS)
-
-            processor.process(resource, inputFile.newReader(), 
outputFile.newWriter())
-        }
-    }
-
-}
diff --git a/buildSrc/src/main/groovy/t5build/PreprocessCoffeeScript.groovy 
b/buildSrc/src/main/groovy/t5build/PreprocessCoffeeScript.groovy
deleted file mode 100644
index 10c948116..000000000
--- a/buildSrc/src/main/groovy/t5build/PreprocessCoffeeScript.groovy
+++ /dev/null
@@ -1,103 +0,0 @@
-package t5build
-
-import org.gradle.api.*
-import org.gradle.api.tasks.*
-
-/**
- * Used by the tapestry-core module, to split t5-core-dom into two flavors: 
one for prototype, one for jQuery.
- */
-class PreprocessCoffeeScript extends DefaultTask {
-
-    {
-        description = "Splits CoffeeScript source files into multiple flavors."
-        group = "build"
-    }
-
-    @Internal
-    def flavors = ["prototype", "jquery"]
-    def srcDir = "src/main/preprocessed-coffeescript"
-    def outputDir = "${project.buildDir}/postprocessed-coffeescript"
-
-    @InputDirectory
-    File getSrcDir() { project.file(srcDir) }
-
-    @OutputDirectory
-    File getOutputDir() { project.file(outputDir) }
-
-    @TaskAction
-    void doSplit() {
-        logger.info "Splitting CoffeeScript sources from $srcDir into 
$outputDir ($flavors)"
-
-        def outputDirFile = getOutputDir()
-        // Recursively delete output directory if it exists
-        outputDirFile.deleteDir()
-
-        def tree = project.fileTree srcDir, {
-            include '**/*.coffee'
-        }
-
-        tree.visit { visit ->
-            if (visit.directory) return
-
-            def inputFile = visit.file
-            def inputPath = visit.path
-
-            flavors.each { flavor ->
-
-                def dotx = inputPath.lastIndexOf "."
-
-                def outputPath = inputPath.substring(0, dotx) + 
"-${flavor}.coffee"
-
-                def outputFile = new File(outputDirFile, outputPath)
-
-                logger.info "Generating ${outputPath} from ${inputPath}"
-
-                outputFile.parentFile.mkdirs()
-
-                split inputFile, outputFile, flavor
-            }
-        }
-    }
-
-    // Very sloppy; doesn't actually differentiate between #if and #elseif 
(nesting is not actually
-    // supported). Some more C Macro support would be nice, too.
-    @Internal
-    def ifPattern = ~/^#(else)?if\s+(\w+)$/
-
-    void split(File inputFile, File outputFile, String flavor) {
-
-        def ignoring = false
-
-        outputFile.withPrintWriter { pw ->
-
-            inputFile.eachLine { line ->
-
-                def matcher = ifPattern.matcher line
-
-                if (matcher.matches()) {
-
-                    // ignore the block unless it matches the flavor
-                    ignoring = matcher[0][2] != flavor
-
-                    // And don't copy the "#if" line at all.
-                    return;
-                }
-
-                // Note that we don't check for nested #if, and those aren't 
supported.
-
-                if (line == "#endif") {
-                    ignoring = false;
-                    return;
-                }
-
-                if (ignoring) {
-                    return;
-                }
-
-                // Copy the line to the output:
-
-                pw.println line
-            }
-        }
-    }
-}
diff --git 
a/tapestry-core/src/main/java/org/apache/tapestry5/validator/Email.java 
b/tapestry-core/src/main/java/org/apache/tapestry5/validator/Email.java
index ac3990f46..07d84631c 100644
--- a/tapestry-core/src/main/java/org/apache/tapestry5/validator/Email.java
+++ b/tapestry-core/src/main/java/org/apache/tapestry5/validator/Email.java
@@ -32,7 +32,7 @@ public class Email extends AbstractValidator<Void, String>
 {
 
     // The client-side uses a similar RE, but converts the input to lower case 
before applying the pattern.
-    // See validation.coffee.
+    // See validation.ts.
 
     private static final Pattern PATTERN = Pattern
             
.compile("[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?",
 Pattern.CASE_INSENSITIVE);
diff --git a/tapestry-core/src/main/typescript/package.json 
b/tapestry-core/src/main/typescript/package.json
index 93c0bf46e..265a1a6bd 100644
--- a/tapestry-core/src/main/typescript/package.json
+++ b/tapestry-core/src/main/typescript/package.json
@@ -1,5 +1,4 @@
 {
-  "packageManager": "npm",
   "type": "module",
   "devDependencies": {
     "@hpcc-js/wasm": "^2.22.4",

Reply via email to