mirror of
https://github.com/cincheo/jsweet.git
synced 2025-12-15 15:29:22 +00:00
update dependencies
This commit is contained in:
parent
6124944e2b
commit
89cb7b0883
@ -68,8 +68,8 @@ ${{DEPENDENCIES}}
|
||||
<configuration>
|
||||
<verbose>true</verbose>
|
||||
<bundle>true</bundle>
|
||||
<outDir>src/main/resources/META-INF/resources/typings/${project.artifactId}/${project.version}/sources</outDir>
|
||||
<tsOut>src/main/resources/META-INF/resources/typings/${project.artifactId}/${project.version}/sources</tsOut>
|
||||
<outDir>src/main/resources/META-INF/resources/typings/${project.artifactId}/${project.version}</outDir>
|
||||
<tsOut>src/main/resources/META-INF/resources/typings/${project.artifactId}/${project.version}</tsOut>
|
||||
<targetVersion>ES6</targetVersion>
|
||||
<encoding>UTF-8</encoding>
|
||||
</configuration>
|
||||
|
||||
@ -216,91 +216,91 @@
|
||||
<dependency>
|
||||
<groupId>org.jsweet</groupId>
|
||||
<artifactId>jsweet-core</artifactId>
|
||||
<version>5-SNAPSHOT</version>
|
||||
<version>5-20170726</version>
|
||||
<scope>test</scope>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jsweet.candies.trusted</groupId>
|
||||
<groupId>org.jsweet.candies</groupId>
|
||||
<artifactId>es6-promise</artifactId>
|
||||
<version>0.0.0-SNAPSHOT</version>
|
||||
<version>0.0.0-20170726</version>
|
||||
<scope>test</scope>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jsweet.candies.ext</groupId>
|
||||
<groupId>org.jsweet.candies</groupId>
|
||||
<artifactId>jquery</artifactId>
|
||||
<version>1.10.0-SNAPSHOT</version>
|
||||
<version>1.10.0-20170726</version>
|
||||
<scope>test</scope>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jsweet.candies.ext</groupId>
|
||||
<groupId>org.jsweet.candies</groupId>
|
||||
<artifactId>jqueryui</artifactId>
|
||||
<version>1.11.0-SNAPSHOT</version>
|
||||
<version>1.11.0-20170726</version>
|
||||
<scope>test</scope>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jsweet.candies.ext</groupId>
|
||||
<groupId>org.jsweet.candies</groupId>
|
||||
<artifactId>backbone</artifactId>
|
||||
<version>1.3.0-SNAPSHOT</version>
|
||||
<version>1.3.0-20170726</version>
|
||||
<scope>test</scope>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jsweet.candies.ext</groupId>
|
||||
<groupId>org.jsweet.candies</groupId>
|
||||
<artifactId>angular</artifactId>
|
||||
<version>1.4.0-SNAPSHOT</version>
|
||||
<version>1.4.0-20170726</version>
|
||||
<scope>test</scope>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jsweet.candies.ext</groupId>
|
||||
<groupId>org.jsweet.candies</groupId>
|
||||
<artifactId>angular-route</artifactId>
|
||||
<version>1.2.0-SNAPSHOT</version>
|
||||
<version>1.2.0-20170726</version>
|
||||
<scope>test</scope>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jsweet.candies.ext</groupId>
|
||||
<groupId>org.jsweet.candies</groupId>
|
||||
<artifactId>node</artifactId>
|
||||
<version>7.5.0</version>
|
||||
<version>7.5.0-20170726</version>
|
||||
<scope>test</scope>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jsweet.candies.ext</groupId>
|
||||
<groupId>org.jsweet.candies</groupId>
|
||||
<artifactId>express</artifactId>
|
||||
<version>4.14.0</version>
|
||||
<version>4.14.0-20170726</version>
|
||||
<scope>test</scope>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jsweet.candies.ext</groupId>
|
||||
<groupId>org.jsweet.candies</groupId>
|
||||
<artifactId>express-errorhandler</artifactId>
|
||||
<version>4.14.0</version>
|
||||
<version>4.14.0-20170726</version>
|
||||
<scope>test</scope>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jsweet.candies.ext</groupId>
|
||||
<groupId>org.jsweet.candies</groupId>
|
||||
<artifactId>express-body-parser</artifactId>
|
||||
<version>4.14.0</version>
|
||||
<version>4.14.0-20170726</version>
|
||||
<scope>test</scope>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jsweet.candies.ext</groupId>
|
||||
<groupId>org.jsweet.candies</groupId>
|
||||
<artifactId>socket.io</artifactId>
|
||||
<version>1.4.5</version>
|
||||
<version>1.4.5-20170726</version>
|
||||
<scope>test</scope>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jsweet.candies.ext</groupId>
|
||||
<groupId>org.jsweet.candies</groupId>
|
||||
<artifactId>threejs</artifactId>
|
||||
<version>75-SNAPSHOT</version>
|
||||
<version>75-20170726</version>
|
||||
<scope>test</scope>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
|
||||
@ -16,9 +16,6 @@
|
||||
*/
|
||||
package org.jsweet.test.transpiler;
|
||||
|
||||
import static org.jsweet.transpiler.JSweetProblem.GLOBAL_DELETE;
|
||||
import static org.jsweet.transpiler.JSweetProblem.GLOBAL_INDEXER_GET;
|
||||
import static org.jsweet.transpiler.JSweetProblem.GLOBAL_INDEXER_SET;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
@ -75,7 +72,6 @@ import source.structural.globalclasses.a.InterfaceWithStaticMethod;
|
||||
import source.structural.globalclasses.c.ClassUsingStaticMethod;
|
||||
import source.structural.globalclasses.c.GlobalFunctionGetSetDelete;
|
||||
import source.structural.globalclasses.d.GlobalFunctionAccessFromMain;
|
||||
import source.structural.globalclasses.f.InvalidGlobalSetGetDelete;
|
||||
import source.structural.other.Wrapping;
|
||||
|
||||
public class StructuralTests extends AbstractTest {
|
||||
@ -257,13 +253,6 @@ public class StructuralTests extends AbstractTest {
|
||||
transpile(TestTranspilationHandler::assertNoProblems, getSourceFile(GlobalFunctionGetSetDelete.class));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testNoStaticDeleteInGlobalFunction() {
|
||||
transpile(logHandler -> {
|
||||
logHandler.assertReportedProblems(GLOBAL_INDEXER_GET, GLOBAL_INDEXER_SET, GLOBAL_DELETE);
|
||||
}, getSourceFile(InvalidGlobalSetGetDelete.class));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGlobalFunctionAccessFromMain() {
|
||||
// TODO: make it work with modules
|
||||
|
||||
@ -3,8 +3,6 @@ package source.api;
|
||||
import static def.js.JSON.stringify;
|
||||
import def.js.JSON;
|
||||
import static jsweet.util.Lang.object;
|
||||
import static jsweet.util.Globals.$get;
|
||||
import jsweet.util.Globals;
|
||||
|
||||
public class AccessStaticMethod {
|
||||
|
||||
@ -13,13 +11,14 @@ public class AccessStaticMethod {
|
||||
def.js.JSON.stringify("test");
|
||||
stringify("test");
|
||||
Object o = null;
|
||||
$get(o, "f");
|
||||
Globals.$get(o, "f");
|
||||
jsweet.util.Globals.$get(o, "f");
|
||||
// deprecated
|
||||
// $get(o, "f");
|
||||
// Globals.$get(o, "f");
|
||||
// jsweet.util.Globals.$get(o, "f");
|
||||
|
||||
// non-deprecated way
|
||||
object(o).$get("f");
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -20,7 +20,6 @@ import static def.js.Globals.eval;
|
||||
import static def.dom.Globals.console;
|
||||
import static jsweet.util.Lang.any;
|
||||
import static jsweet.util.Lang.$strict;
|
||||
import static jsweet.util.Globals.equalsLoose;
|
||||
import static jsweet.util.Lang.$loose;
|
||||
import static jsweet.util.Lang.typeof;
|
||||
|
||||
@ -96,7 +95,8 @@ public class InstanceOf {
|
||||
|
||||
assert $loose(any(2) == any("2"));
|
||||
assert $loose(any(s2) == any(n2));
|
||||
assert equalsLoose(any(s2), any(n2));
|
||||
// deprecated
|
||||
//assert equalsLoose(any(s2), any(n2));
|
||||
assert s != null;
|
||||
assert $strict(s != null);
|
||||
|
||||
|
||||
@ -1,39 +0,0 @@
|
||||
/*
|
||||
* JSweet - http://www.jsweet.org
|
||||
* Copyright (C) 2015 CINCHEO SAS <renaud.pawlak@cincheo.fr>
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package source.structural.globalclasses.f;
|
||||
|
||||
import static jsweet.util.Globals.$delete;
|
||||
import static jsweet.util.Globals.$get;
|
||||
import static jsweet.util.Globals.$set;
|
||||
|
||||
@SuppressWarnings("all")
|
||||
class Globals {
|
||||
|
||||
public static void test() {
|
||||
Object val;
|
||||
// TODO: invalid
|
||||
val = $get(Globals.class, "ttest");
|
||||
$set(Globals.class, "ttest", val);
|
||||
$delete(Globals.class, "ttest");
|
||||
}
|
||||
}
|
||||
|
||||
public class InvalidGlobalSetGetDelete {
|
||||
|
||||
public void main(String[] args) {
|
||||
}
|
||||
}
|
||||
@ -18,8 +18,6 @@ package source.syntax;
|
||||
|
||||
import static jsweet.util.Lang.$export;
|
||||
import static jsweet.util.Lang.object;
|
||||
import static jsweet.util.Globals.$get;
|
||||
import static jsweet.util.Globals.$set;
|
||||
|
||||
import def.js.Date;
|
||||
import jsweet.lang.Interface;
|
||||
@ -27,10 +25,11 @@ import jsweet.lang.Interface;
|
||||
public class ValidIndexedAccesses {
|
||||
|
||||
{
|
||||
$get(this, "a");
|
||||
$set(this, "a", "value");
|
||||
jsweet.util.Globals.$get(this, "a");
|
||||
jsweet.util.Globals.$set(this, "a", "value");
|
||||
// deprecated
|
||||
// $get(this, "a");
|
||||
// $set(this, "a", "value");
|
||||
// jsweet.util.Globals.$get(this, "a");
|
||||
// jsweet.util.Globals.$set(this, "a", "value");
|
||||
object(this).$get("a");
|
||||
object(this).$set("a", "value");
|
||||
jsweet.util.Lang.object(this).$get("a");
|
||||
@ -38,10 +37,11 @@ public class ValidIndexedAccesses {
|
||||
}
|
||||
|
||||
public ValidIndexedAccesses() {
|
||||
$get(this, "a");
|
||||
$set(this, "a", "value");
|
||||
jsweet.util.Globals.$get(this, "a");
|
||||
jsweet.util.Globals.$set(this, "a", "value");
|
||||
// deprecated
|
||||
// $get(this, "a");
|
||||
// $set(this, "a", "value");
|
||||
// jsweet.util.Globals.$get(this, "a");
|
||||
// jsweet.util.Globals.$set(this, "a", "value");
|
||||
object(this).$get("a");
|
||||
object(this).$set("a", "value");
|
||||
jsweet.util.Lang.object(this).$get("a");
|
||||
@ -49,10 +49,11 @@ public class ValidIndexedAccesses {
|
||||
}
|
||||
|
||||
public void m() {
|
||||
$get(this, "a");
|
||||
$set(this, "a", "value");
|
||||
jsweet.util.Globals.$get(this, "a");
|
||||
jsweet.util.Globals.$set(this, "a", "value");
|
||||
// deprecated
|
||||
// $get(this, "a");
|
||||
// $set(this, "a", "value");
|
||||
// jsweet.util.Globals.$get(this, "a");
|
||||
// jsweet.util.Globals.$set(this, "a", "value");
|
||||
object(this).$get("a");
|
||||
object(this).$set("a", "value");
|
||||
jsweet.util.Lang.object(this).$get("a");
|
||||
@ -63,13 +64,15 @@ public class ValidIndexedAccesses {
|
||||
new ValidIndexedAccesses2() {
|
||||
{
|
||||
$set("a", "value");
|
||||
jsweet.util.Globals.$set(this, "a2", "value");
|
||||
// deprecated
|
||||
// jsweet.util.Globals.$set(this, "a2", "value");
|
||||
}
|
||||
};
|
||||
new ValidIndexedAccesses() {
|
||||
{
|
||||
$set(this, "a", "value");
|
||||
jsweet.util.Globals.$set(this, "a2", "value");
|
||||
// deprecated
|
||||
// $set(this, "a", "value");
|
||||
// jsweet.util.Globals.$set(this, "a2", "value");
|
||||
object(this).$set("a", "value");
|
||||
jsweet.util.Lang.object(this).$set("a", "value");
|
||||
}
|
||||
@ -80,8 +83,9 @@ public class ValidIndexedAccesses {
|
||||
public static void m1() {
|
||||
new ValidIndexedAccesses() {
|
||||
{
|
||||
$set(this, "a", "value");
|
||||
jsweet.util.Globals.$set(this, "a", "value");
|
||||
// deprecated
|
||||
// $set(this, "a", "value");
|
||||
// jsweet.util.Globals.$set(this, "a", "value");
|
||||
object(this).$set("a", "value");
|
||||
jsweet.util.Lang.object(this).$set("a", "value");
|
||||
}
|
||||
@ -108,10 +112,14 @@ public class ValidIndexedAccesses {
|
||||
|
||||
Object validAccesses2 = new Object();
|
||||
|
||||
$set(validAccesses2, "field4", "value4");
|
||||
// deprecated
|
||||
// $set(validAccesses2, "field4", "value4");
|
||||
object(validAccesses2).$set("field4", "value4");
|
||||
object(validAccesses2).$set("field5", "value5");
|
||||
|
||||
$export("field4", $get(validAccesses2, "field4"));
|
||||
|
||||
// deprecated
|
||||
// $export("field4", $get(validAccesses2, "field4"));
|
||||
$export("field4", object(validAccesses2).$get("field4"));
|
||||
$export("field5", object(validAccesses2).$get("field5"));
|
||||
|
||||
}
|
||||
@ -122,28 +130,33 @@ class ValidIndexedAccesses2 extends def.js.Object {
|
||||
{
|
||||
$get("a");
|
||||
$set("a", "value");
|
||||
jsweet.util.Globals.$get(this, "a");
|
||||
jsweet.util.Globals.$set(this, "a", "value");
|
||||
// deprecated
|
||||
// jsweet.util.Globals.$get(this, "a");
|
||||
// jsweet.util.Globals.$set(this, "a", "value");
|
||||
}
|
||||
|
||||
public ValidIndexedAccesses2() {
|
||||
$get("a");
|
||||
$set("a", "value");
|
||||
jsweet.util.Globals.$get(this, "a");
|
||||
jsweet.util.Globals.$set(this, "a", "value");
|
||||
// deprecated
|
||||
// jsweet.util.Globals.$get(this, "a");
|
||||
// jsweet.util.Globals.$set(this, "a", "value");
|
||||
}
|
||||
|
||||
public void m() {
|
||||
$get("a");
|
||||
$set("a", "value");
|
||||
jsweet.util.Globals.$get(this, "a");
|
||||
jsweet.util.Globals.$set(this, "a", "value");
|
||||
// deprecated
|
||||
// jsweet.util.Globals.$get(this, "a");
|
||||
// jsweet.util.Globals.$set(this, "a", "value");
|
||||
Test t = new Test() {
|
||||
{
|
||||
}
|
||||
};
|
||||
@SuppressWarnings("unused")
|
||||
String s = t.$get("test");
|
||||
AClass2 c2 = new AClass2();
|
||||
@SuppressWarnings("unused")
|
||||
Date d = c2.$get("test");
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user