repo stringclasses 21
values | pull_number float64 88 192k | instance_id stringlengths 16 34 | issue_numbers stringlengths 6 20 | base_commit stringlengths 40 40 | patch stringlengths 266 270k | test_patch stringlengths 350 165k | problem_statement stringlengths 38 24k | hints_text stringlengths 1 33.2k ⌀ | created_at stringdate 2016-01-11 17:37:29 2024-10-18 14:52:41 | language stringclasses 4
values | Dockerfile stringlengths 100 3.03k | P2P stringlengths 2 216k | F2P stringlengths 11 10.5k | F2F stringclasses 26
values | test_command stringlengths 27 5.49k | task_category stringclasses 3
values | is_no_nodes bool 2
classes | is_func_only bool 2
classes | is_class_only bool 2
classes | is_mixed bool 2
classes | num_func_changes int64 0 238 | num_class_changes int64 0 70 | num_nodes int64 0 264 | is_single_func bool 2
classes | is_single_class bool 2
classes | modified_nodes stringlengths 2 42.2k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
trinodb/trino | 4,129 | trinodb__trino-4129 | ['3827'] | b2c82193ce107856cb6554e1bfbf9483344c7bb6 | diff --git a/presto-main/src/main/java/io/prestosql/dispatcher/DispatchManager.java b/presto-main/src/main/java/io/prestosql/dispatcher/DispatchManager.java
index 61ce2b743b0c..c25eb6c3b215 100644
--- a/presto-main/src/main/java/io/prestosql/dispatcher/DispatchManager.java
+++ b/presto-main/src/main/java/io/prestosql/d... | diff --git a/presto-main/src/main/java/io/prestosql/server/testing/TestingPrestoServer.java b/presto-main/src/main/java/io/prestosql/server/testing/TestingPrestoServer.java
index 4dd7ca349955..7b7fd7c94cb2 100644
--- a/presto-main/src/main/java/io/prestosql/server/testing/TestingPrestoServer.java
+++ b/presto-main/src/... | WebUI and JMX don't agree on number of queued queries
I have a cluster with PrestoSQL 333 running and the WebUI and JMX metrics are showing different values for queued queries.
## Current Status According to WebUI
 while it is in ... | 2020-06-22 01:45:13+00:00 | Java | FROM polybench_java_base
WORKDIR /testbed
COPY . .
ENV JAVA_HOME=/usr/lib/jvm/java-11-amazon-corretto.x86_64/
RUN update-alternatives --set java /usr/lib/jvm/java-11-amazon-corretto.x86_64/bin/java | [] | ['io.prestosql.execution.TestExecutionJmxMetrics.testQueryStats'] | [] | find /testbed -path "*/target/surefire-reports/TEST-*.xml" -delete; export JAVA_HOME=/usr/lib/jvm/java-11-amazon-corretto.x86_64/ && update-alternatives --set java /usr/lib/jvm/java-11-amazon-corretto.x86_64/bin/java && sed -i '/<properties>/a \ <air.check.skip-all>true</air.check.skip-all>\n <checkstyle.skip>tru... | Bug Fix | false | false | false | true | 12 | 3 | 15 | false | false | ["presto-main/src/main/java/io/prestosql/execution/QueryManagerStats.java->program->class_declaration:QueryManagerStats->method_declaration:queryStarted", "presto-main/src/main/java/io/prestosql/dispatcher/DispatchManager.java->program->class_declaration:DispatchManager->method_declaration:getQueuedQueries", "presto-ma... |
trinodb/trino | 963 | trinodb__trino-963 | ['958'] | 527d00f0355b2da566c44831f6f23762a070d6cc | diff --git a/presto-spi/src/main/java/io/prestosql/spi/type/UnscaledDecimal128Arithmetic.java b/presto-spi/src/main/java/io/prestosql/spi/type/UnscaledDecimal128Arithmetic.java
index 84ed27e24257..de42f534b6c6 100644
--- a/presto-spi/src/main/java/io/prestosql/spi/type/UnscaledDecimal128Arithmetic.java
+++ b/presto-spi... | diff --git a/presto-main/src/test/java/io/prestosql/type/TestDecimalOperators.java b/presto-main/src/test/java/io/prestosql/type/TestDecimalOperators.java
index 8f6e8f4a98de..eeb9702af297 100644
--- a/presto-main/src/test/java/io/prestosql/type/TestDecimalOperators.java
+++ b/presto-main/src/test/java/io/prestosql/type... | Incorrect result for decimal division
```
presto> SELECT cast(1000 as decimal(38,8)) / cast(25 AS decimal(38,8));
_col0
------------
9.16269668
(1 row)
```
It happens because https://github.com/prestosql/presto/blob/master/presto-spi/src/main/java/io/prestosql/spi/type/UnscaledDecimal128Arithmetic.java#L15... | null | 2019-06-11 18:16:48+00:00 | Java | FROM polybench_java_base
WORKDIR /testbed
COPY . .
ENV JAVA_HOME=/usr/lib/jvm/java-11-amazon-corretto.x86_64/
RUN update-alternatives --set java /usr/lib/jvm/java-11-amazon-corretto.x86_64/bin/java | ['io.prestosql.type.TestDecimalOperators.testNegation', 'io.prestosql.type.TestDecimalOperators.testLessThanOrEqual', 'io.prestosql.type.TestDecimalOperators.testGreaterThanOrEqual', 'io.prestosql.type.TestDecimalOperators.testMultiply', 'io.prestosql.type.TestDecimalOperators.testEqual', 'io.prestosql.type.TestDecimal... | ['io.prestosql.type.TestDecimalOperators.testDivide'] | [] | find /testbed -path "*/target/surefire-reports/TEST-*.xml" -delete; export JAVA_HOME=/usr/lib/jvm/java-11-amazon-corretto.x86_64/ && update-alternatives --set java /usr/lib/jvm/java-11-amazon-corretto.x86_64/bin/java && sed -i '/<properties>/a \ <air.check.skip-all>true</air.check.skip-all>\n <checkstyle.skip>tru... | Bug Fix | false | false | false | true | 12 | 1 | 13 | false | false | ["presto-spi/src/main/java/io/prestosql/spi/type/UnscaledDecimal128Arithmetic.java->program->class_declaration:UnscaledDecimal128Arithmetic->method_declaration:addUnsignedMultiPrecision", "presto-spi/src/main/java/io/prestosql/spi/type/UnscaledDecimal128Arithmetic.java->program->class_declaration:UnscaledDecimal128Arit... |
trinodb/trino | 4,458 | trinodb__trino-4458 | ['4449'] | 277f1543cb16d338a7eaba3c38685218d7dd13bf | diff --git a/presto-hive/pom.xml b/presto-hive/pom.xml
index 38c0bbfe23c3..9ae8bda156e1 100644
--- a/presto-hive/pom.xml
+++ b/presto-hive/pom.xml
@@ -77,6 +77,11 @@
<artifactId>event</artifactId>
</dependency>
+ <dependency>
+ <groupId>io.airlift</groupId>
+ <artifa... | diff --git a/presto-hive/src/test/java/io/prestosql/plugin/hive/AbstractTestHiveFileSystem.java b/presto-hive/src/test/java/io/prestosql/plugin/hive/AbstractTestHiveFileSystem.java
index fce134b8ed21..30a8ddc7bef6 100644
--- a/presto-hive/src/test/java/io/prestosql/plugin/hive/AbstractTestHiveFileSystem.java
+++ b/pres... | Expose CachingHiveMetastore metrics via JMX
CachingHiveMetastore is available in JMX, however it doesn't include any metrics:
```SQL
select * from jmx.current."presto.plugin.hive.metastore.cache:name=hive,type=cachinghivemetastore";
```
returns something like:
```
node | ... | null | 2020-07-15 15:28:20+00:00 | Java | FROM polybench_java_base
WORKDIR /testbed
COPY . .
ENV JAVA_HOME=/usr/lib/jvm/java-11-amazon-corretto.x86_64/
RUN update-alternatives --set java /usr/lib/jvm/java-11-amazon-corretto.x86_64/bin/java | [] | ['io.prestosql.plugin.hive.metastore.cache.TestCachingHiveMetastore.testGetAllTable', 'io.prestosql.plugin.hive.metastore.cache.TestCachingHiveMetastore.testCachingHiveMetastoreCreationWithTtlOnly', 'io.prestosql.plugin.hive.metastore.cache.TestCachingHiveMetastore.testInvalidGetPartitionsByNames', 'io.prestosql.plugin... | [] | find /testbed -path "*/target/surefire-reports/TEST-*.xml" -delete; export JAVA_HOME=/usr/lib/jvm/java-11-amazon-corretto.x86_64/ && update-alternatives --set java /usr/lib/jvm/java-11-amazon-corretto.x86_64/bin/java && sed -i '/<properties>/a \ <air.check.skip-all>true</air.check.skip-all>\n <checkstyle.skip>tru... | Feature | false | false | false | true | 19 | 2 | 21 | false | false | ["presto-hive/src/main/java/io/prestosql/plugin/hive/metastore/cache/CachingHiveMetastore.java->program->class_declaration:CachingHiveMetastore->method_declaration:CacheStatsMBean_getPartitionNamesStats", "presto-hive/src/main/java/io/prestosql/plugin/hive/metastore/cache/CachingHiveMetastore.java->program->class_decla... |
trinodb/trino | 2,081 | trinodb__trino-2081 | ['1998'] | 14a301a6f79d8ad6eebf5a59856d7e7739624b46 | diff --git a/presto-main/src/main/java/io/prestosql/sql/gen/BytecodeUtils.java b/presto-main/src/main/java/io/prestosql/sql/gen/BytecodeUtils.java
index 95c6fec9db21..b71d6a895ec4 100644
--- a/presto-main/src/main/java/io/prestosql/sql/gen/BytecodeUtils.java
+++ b/presto-main/src/main/java/io/prestosql/sql/gen/Bytecode... | diff --git a/presto-main/src/test/java/io/prestosql/operator/scalar/CustomFunctions.java b/presto-main/src/test/java/io/prestosql/operator/scalar/CustomFunctions.java
index 63a71b6b589d..9ffb1cee2ad4 100644
--- a/presto-main/src/test/java/io/prestosql/operator/scalar/CustomFunctions.java
+++ b/presto-main/src/test/java... | Using dot in ScalarFunctions name value cause failures
We are wring a custom functions like `@ScalarFunction(value = "pretradedate", alias = "default.pretradedate")`. When select on `default.pretradedate`, it throws error
```
io.prestosql.spi.PrestoException: line 1:1: Function default.pretradedate not registered
... | @findepi @martint @Praveen2112 | 2019-11-22 07:35:04+00:00 | Java | FROM polybench_java_base
WORKDIR /testbed
COPY . .
ENV JAVA_HOME=/usr/lib/jvm/java-11-amazon-corretto.x86_64/
RUN update-alternatives --set java /usr/lib/jvm/java-11-amazon-corretto.x86_64/bin/java | ['io.prestosql.operator.scalar.TestCustomFunctions.testCustomAdd', 'io.prestosql.operator.scalar.TestCustomFunctions.testSliceIsNull', 'io.prestosql.operator.scalar.TestCustomFunctions.testLongIsNull'] | ['io.prestosql.operator.scalar.TestCustomFunctions.testIdentityFunction'] | [] | find /testbed -path "*/target/surefire-reports/TEST-*.xml" -delete; export JAVA_HOME=/usr/lib/jvm/java-11-amazon-corretto.x86_64/ && update-alternatives --set java /usr/lib/jvm/java-11-amazon-corretto.x86_64/bin/java && sed -i '/<properties>/a \ <air.check.skip-all>true</air.check.skip-all>\n <checkstyle.skip>tru... | Bug Fix | false | true | false | false | 1 | 0 | 1 | true | false | ["presto-main/src/main/java/io/prestosql/sql/gen/BytecodeUtils.java->program->class_declaration:BytecodeUtils->method_declaration:BytecodeExpression_invoke"] |
trinodb/trino | 3,603 | trinodb__trino-3603 | ['3550'] | 19abcb7ddeacaf1ca7bad52f998b524dc83b6904 | diff --git a/presto-main/src/main/java/io/prestosql/sql/planner/optimizations/AddLocalExchanges.java b/presto-main/src/main/java/io/prestosql/sql/planner/optimizations/AddLocalExchanges.java
index 25c568303bfa..fdf64e3e337f 100644
--- a/presto-main/src/main/java/io/prestosql/sql/planner/optimizations/AddLocalExchanges.... | diff --git a/presto-main/src/test/java/io/prestosql/sql/planner/assertions/RowNumberMatcher.java b/presto-main/src/test/java/io/prestosql/sql/planner/assertions/RowNumberMatcher.java
index f6876120e427..f3daad68bf6a 100644
--- a/presto-main/src/test/java/io/prestosql/sql/planner/assertions/RowNumberMatcher.java
+++ b/p... | Avoid local exchanges around trivial projection
When a projection is below "scrambling" and sorting operations, it's currently surrounded with local exchanges.
For a trivial projection (e.g. pruning), those exchanges are redundant.
```
presto> EXPLAIN SELECT name, row_number() OVER (ORDER BY name) FROM (SELECT * F... | In this particular case this is caused by the fact TopN unconditionally outputs sort symbols (cannot prune).
This causes hiccups in some other places too. I propose that we have a rule that every Node can be pruning.
This seems like a limitation in AddLocalExchanges. For trivial projections (not just those that prun... | 2020-05-03 12:25:16+00:00 | Java | FROM polybench_java_base
WORKDIR /testbed
COPY . .
ENV JAVA_HOME=/usr/lib/jvm/java-11-amazon-corretto.x86_64/
RUN update-alternatives --set java /usr/lib/jvm/java-11-amazon-corretto.x86_64/bin/java | ['io.prestosql.sql.planner.optimizations.TestAddExchangesPlans.testNonSpillableBroadcastJoinAboveTableScan', 'io.prestosql.sql.planner.optimizations.TestAddExchangesPlans.testForcePartitioningMarkDistinctInput', 'io.prestosql.sql.planner.optimizations.TestAddExchangesPlans.testImplementOffsetWithUnorderedSource', 'io.p... | ['io.prestosql.sql.planner.optimizations.TestAddExchangesPlans.testExchangesAroundTrivialProjection'] | [] | find /testbed -path "*/target/surefire-reports/TEST-*.xml" -delete; export JAVA_HOME=/usr/lib/jvm/java-11-amazon-corretto.x86_64/ && update-alternatives --set java /usr/lib/jvm/java-11-amazon-corretto.x86_64/bin/java && sed -i '/<properties>/a \ <air.check.skip-all>true</air.check.skip-all>\n <checkstyle.skip>tru... | Refactoring | false | false | false | true | 1 | 1 | 2 | false | false | ["presto-main/src/main/java/io/prestosql/sql/planner/optimizations/AddLocalExchanges.java->program->class_declaration:AddLocalExchanges->class_declaration:Rewriter->method_declaration:PlanWithProperties_visitProject", "presto-main/src/main/java/io/prestosql/sql/planner/optimizations/AddLocalExchanges.java->program->cla... |
trinodb/trino | 3,859 | trinodb__trino-3859 | ['3829'] | 2f902bd6b092fe214a87ded5ca2b2500eff3a7d9 | diff --git a/presto-main/src/main/java/io/prestosql/sql/analyzer/AggregationAnalyzer.java b/presto-main/src/main/java/io/prestosql/sql/analyzer/AggregationAnalyzer.java
index 81ed6bc40779..d216c50e2e31 100644
--- a/presto-main/src/main/java/io/prestosql/sql/analyzer/AggregationAnalyzer.java
+++ b/presto-main/src/main/j... | diff --git a/presto-main/src/test/java/io/prestosql/sql/query/TestFormat.java b/presto-main/src/test/java/io/prestosql/sql/query/TestFormat.java
new file mode 100644
index 000000000000..f6e3e1446414
--- /dev/null
+++ b/presto-main/src/test/java/io/prestosql/sql/query/TestFormat.java
@@ -0,0 +1,53 @@
+package io.prestos... | "Compiler failed" when aggregation is used as an argument to format()
`format` function was added in `315` but it doesn't support aggregations in the expression (and the doc doesn't mention aggregation is not supported, maybe we should consider adding this to the doc for now).
```
select format('%.6f', sum(fees / 1... | ```
presto> select format('%s', sum(nationkey)) from tpch.tiny.nation;
Query 20200522_175544_00011_kci5a failed: Compiler failed
io.prestosql.spi.PrestoException: Compiler failed
at io.prestosql.sql.planner.LocalExecutionPlanner$Visitor.visitScanFilterAndProject(LocalExecutionPlanner.java:1306)
at io.prestosql.s... | 2020-05-26 22:38:57+00:00 | Java | FROM polybench_java_base
WORKDIR /testbed
COPY . .
ENV JAVA_HOME=/usr/lib/jvm/java-11-amazon-corretto.x86_64/
RUN update-alternatives --set java /usr/lib/jvm/java-11-amazon-corretto.x86_64/bin/java | [] | ['io.prestosql.sql.query.TestFormat.testAggregationInFormat'] | [] | find /testbed -path "*/target/surefire-reports/TEST-*.xml" -delete; export JAVA_HOME=/usr/lib/jvm/java-11-amazon-corretto.x86_64/ && update-alternatives --set java /usr/lib/jvm/java-11-amazon-corretto.x86_64/bin/java && sed -i '/<properties>/a \ <air.check.skip-all>true</air.check.skip-all>\n <checkstyle.skip>tru... | Bug Fix | false | false | false | true | 2 | 2 | 4 | false | false | ["presto-main/src/main/java/io/prestosql/sql/analyzer/AggregationAnalyzer.java->program->class_declaration:AggregationAnalyzer->class_declaration:Visitor->method_declaration:Boolean_visitFormat", "presto-main/src/main/java/io/prestosql/sql/analyzer/AggregationAnalyzer.java->program->class_declaration:AggregationAnalyze... |
trinodb/trino | 5,661 | trinodb__trino-5661 | ['5660'] | e9be099acc53b8f08e11e3a47d9cd1c23b283326 | diff --git a/presto-main/src/main/java/io/prestosql/sql/analyzer/CanonicalizationAware.java b/presto-main/src/main/java/io/prestosql/sql/analyzer/CanonicalizationAware.java
index d8b7917c8d82..affecc096aed 100644
--- a/presto-main/src/main/java/io/prestosql/sql/analyzer/CanonicalizationAware.java
+++ b/presto-main/src/... | diff --git a/presto-main/src/test/java/io/prestosql/sql/analyzer/TestAnalyzer.java b/presto-main/src/test/java/io/prestosql/sql/analyzer/TestAnalyzer.java
index fc49c3dedefe..b857d41d6184 100644
--- a/presto-main/src/test/java/io/prestosql/sql/analyzer/TestAnalyzer.java
+++ b/presto-main/src/test/java/io/prestosql/sql/... | Improper resolution for fully qualified reference to field from inner query
This query should fail because `t` is not in scope for the outer query:
```sql
SELECT t.a FROM (
SELECT * FROM (VALUES 1) t(a)
);
```
| null | 2020-10-22 19:47:38+00:00 | Java | FROM polybench_java_base
WORKDIR /testbed
COPY . .
ENV JAVA_HOME=/usr/lib/jvm/java-11-amazon-corretto.x86_64/
RUN update-alternatives --set java /usr/lib/jvm/java-11-amazon-corretto.x86_64/bin/java | ['io.prestosql.sql.analyzer.TestAnalyzer.testGroupingTooManyArguments', 'io.prestosql.sql.analyzer.TestAnalyzer.testNotNullInJoinClause', 'io.prestosql.sql.analyzer.TestAnalyzer.testNonAggregationDistinct', 'io.prestosql.sql.analyzer.TestAnalyzer.testInvalidAttribute', 'io.prestosql.sql.analyzer.TestAnalyzer.testInVali... | ['io.prestosql.sql.analyzer.TestAnalyzer.testSelectAllColumns', 'io.prestosql.sql.analyzer.TestAnalyzer.testOrderByWithWildcard'] | [] | find /testbed -path "*/target/surefire-reports/TEST-*.xml" -delete; export JAVA_HOME=/usr/lib/jvm/java-11-amazon-corretto.x86_64/ && update-alternatives --set java /usr/lib/jvm/java-11-amazon-corretto.x86_64/bin/java && sed -i '/<properties>/a \ <air.check.skip-all>true</air.check.skip-all>\n <checkstyle.skip>tru... | Bug Fix | false | true | false | false | 3 | 0 | 3 | false | false | ["presto-main/src/main/java/io/prestosql/sql/analyzer/StatementAnalyzer.java->program->class_declaration:StatementAnalyzer->class_declaration:Visitor->method_declaration:Scope_computeAndAssignOutputScope", "presto-main/src/main/java/io/prestosql/sql/analyzer/StatementAnalyzer.java->program->class_declaration:StatementA... |
trinodb/trino | 1,512 | trinodb__trino-1512 | ['1510'] | 0637de3ef0b5873b285a62a72ddb82505c707bb3 | diff --git a/presto-main/src/main/java/io/prestosql/sql/planner/optimizations/HashGenerationOptimizer.java b/presto-main/src/main/java/io/prestosql/sql/planner/optimizations/HashGenerationOptimizer.java
index c541a6b76c5b..0152699f6ee3 100644
--- a/presto-main/src/main/java/io/prestosql/sql/planner/optimizations/HashGe... | diff --git a/presto-main/src/test/java/io/prestosql/sql/planner/TestLogicalPlanner.java b/presto-main/src/test/java/io/prestosql/sql/planner/TestLogicalPlanner.java
index 35fac9f0b56e..093ad8a97ab8 100644
--- a/presto-main/src/test/java/io/prestosql/sql/planner/TestLogicalPlanner.java
+++ b/presto-main/src/test/java/io... | Multiple entries failure in HashGenerationOptimizer
# Problem
From 318, the following error happens when we use aggregation with the union and distinct.
```
Multiple entries with same key: HashComputation{fields=[expr_62]}=HashComputation{fields=[expr_47]} and HashComputation{fields=[expr_62]}=HashComputation{fi... | In that case can we go for a `MultiMap` for handing this so duplicate entries can be handled
@Praveen2112 Thank you for the response.
Yes, but how can we look up the computed hash when using `MultiMap`? There are multiple possible hashes returned by `lookup`. Sorry, I do not fully understand the background of the ... | 2019-09-13 06:44:28+00:00 | Java | FROM polybench_java_base
WORKDIR /testbed
COPY . .
ENV JAVA_HOME=/usr/lib/jvm/java-11-amazon-corretto.x86_64/
RUN update-alternatives --set java /usr/lib/jvm/java-11-amazon-corretto.x86_64/bin/java | ['io.prestosql.sql.planner.TestLogicalPlanner.testAggregation', 'io.prestosql.sql.planner.TestLogicalPlanner.testRemoveUnreferencedScalarInputApplyNodes', 'io.prestosql.sql.planner.TestLogicalPlanner.testRemoveSingleRowSort', 'io.prestosql.sql.planner.TestLogicalPlanner.testRemoveAggregationInSemiJoin', 'io.prestosql.s... | ['io.prestosql.sql.query.TestPrecomputedHashes.testUnionAllAndDistinctLimit', 'io.prestosql.sql.planner.TestLogicalPlanner.testRedundantHashRemovalForUnionAllAndMarkDistinct'] | [] | find /testbed -path "*/target/surefire-reports/TEST-*.xml" -delete; export JAVA_HOME=/usr/lib/jvm/java-11-amazon-corretto.x86_64/ && update-alternatives --set java /usr/lib/jvm/java-11-amazon-corretto.x86_64/bin/java && sed -i '/<properties>/a \ <air.check.skip-all>true</air.check.skip-all>\n <checkstyle.skip>tru... | Bug Fix | false | false | false | true | 4 | 2 | 6 | false | false | ["presto-main/src/main/java/io/prestosql/sql/planner/optimizations/HashGenerationOptimizer.java->program->class_declaration:HashGenerationOptimizer->class_declaration:HashComputationSet->method_declaration:HashComputationSet_pruneSymbols", "presto-main/src/main/java/io/prestosql/sql/planner/optimizations/HashGeneration... |
trinodb/trino | 799 | trinodb__trino-799 | ['680'] | 8c447eaba401f0dfb7b2867674e301bbb2ccdc06 | diff --git a/presto-main/src/main/java/io/prestosql/execution/resourcegroups/IndexedPriorityQueue.java b/presto-main/src/main/java/io/prestosql/execution/resourcegroups/IndexedPriorityQueue.java
index ebef17b7f6d2..e8dc64e78792 100644
--- a/presto-main/src/main/java/io/prestosql/execution/resourcegroups/IndexedPriority... | diff --git a/presto-main/src/test/java/io/prestosql/execution/TestNodeScheduler.java b/presto-main/src/test/java/io/prestosql/execution/TestNodeScheduler.java
index 4883a055cf60..f65e266e7a12 100644
--- a/presto-main/src/test/java/io/prestosql/execution/TestNodeScheduler.java
+++ b/presto-main/src/test/java/io/prestosq... | Data locality based scheduling of source splits with uniform distribution of load
For cases where Presto workers are co-located with the data (actual or cache), we want to maximize local reads by assigning source splits to workers which contain the data for that split. But we do not want to do this at the cost of lower... | null | 2019-05-21 07:05:10+00:00 | Java | FROM polybench_java_base
WORKDIR /testbed
COPY . .
ENV JAVA_HOME=/usr/lib/jvm/java-11-amazon-corretto.x86_64/
RUN update-alternatives --set java /usr/lib/jvm/java-11-amazon-corretto.x86_64/bin/java | [] | ['io.prestosql.execution.TestNodeSchedulerConfig.testExplicitPropertyMappings', 'io.prestosql.execution.TestNodeScheduler.testEquateDistribution', 'io.prestosql.execution.TestNodeScheduler.testBasicAssignment', 'io.prestosql.execution.TestNodeScheduler.testEmptyAssignmentWithFullNodes', 'io.prestosql.execution.TestNode... | [] | find /testbed -path "*/target/surefire-reports/TEST-*.xml" -delete; export JAVA_HOME=/usr/lib/jvm/java-11-amazon-corretto.x86_64/ && update-alternatives --set java /usr/lib/jvm/java-11-amazon-corretto.x86_64/bin/java && sed -i '/<properties>/a \ <air.check.skip-all>true</air.check.skip-all>\n <checkstyle.skip>tru... | Feature | false | false | false | true | 8 | 7 | 15 | false | false | ["presto-main/src/main/java/io/prestosql/execution/scheduler/NodeSchedulerConfig.java->program->class_declaration:NodeSchedulerConfig", "presto-main/src/main/java/io/prestosql/execution/scheduler/SimpleNodeSelector.java->program->class_declaration:SimpleNodeSelector->method_declaration:SplitPlacementResult_computeAssig... |
trinodb/trino | 4,600 | trinodb__trino-4600 | ['4553'] | 9bc01164ad67510e363fe2d5fec273ca828d2fe0 | diff --git a/presto-client/src/main/java/io/prestosql/client/StageStats.java b/presto-client/src/main/java/io/prestosql/client/StageStats.java
index e60c4e276e5d..379c04d0be53 100644
--- a/presto-client/src/main/java/io/prestosql/client/StageStats.java
+++ b/presto-client/src/main/java/io/prestosql/client/StageStats.ja... | diff --git a/presto-jdbc/src/test/java/io/prestosql/jdbc/TestProgressMonitor.java b/presto-jdbc/src/test/java/io/prestosql/jdbc/TestProgressMonitor.java
index aec5e9a17c4a..aff2523f4ff7 100644
--- a/presto-jdbc/src/test/java/io/prestosql/jdbc/TestProgressMonitor.java
+++ b/presto-jdbc/src/test/java/io/prestosql/jdbc/Te... | Add physicalInputDataSize to StatementStats
In https://github.com/prestosql/presto/pull/4354 `physicalInputDataSize` was added to `BasicQueryStats`. We should also add the same to `StatementStats` so that the query API response includes data scan stats.
Discussed at https://prestosql.slack.com/archives/CFPVDCDHV/p15... | null | 2020-07-27 15:23:36+00:00 | Java | FROM polybench_java_base
WORKDIR /testbed
COPY . .
ENV JAVA_HOME=/usr/lib/jvm/java-11-amazon-corretto.x86_64/
RUN update-alternatives --set java /usr/lib/jvm/java-11-amazon-corretto.x86_64/bin/java | [] | ['io.prestosql.jdbc.TestProgressMonitor.test'] | [] | find /testbed -path "*/target/surefire-reports/TEST-*.xml" -delete; export JAVA_HOME=/usr/lib/jvm/java-11-amazon-corretto.x86_64/ && update-alternatives --set java /usr/lib/jvm/java-11-amazon-corretto.x86_64/bin/java && sed -i '/<properties>/a \ <air.check.skip-all>true</air.check.skip-all>\n <checkstyle.skip>tru... | Feature | false | false | false | true | 10 | 6 | 16 | false | false | ["presto-client/src/main/java/io/prestosql/client/StageStats.java->program->class_declaration:StageStats->method_declaration:String_toString", "presto-main/src/main/java/io/prestosql/server/protocol/Query.java->program->class_declaration:Query->method_declaration:StageStats_toStageStats", "presto-client/src/main/java/i... |
trinodb/trino | 725 | trinodb__trino-725 | ['724'] | 450aca024111f45dd0aaded007963d407fda3177 | diff --git a/presto-main/src/main/java/io/prestosql/memory/MemoryPool.java b/presto-main/src/main/java/io/prestosql/memory/MemoryPool.java
index d3b8082370c2..7e470328b00f 100644
--- a/presto-main/src/main/java/io/prestosql/memory/MemoryPool.java
+++ b/presto-main/src/main/java/io/prestosql/memory/MemoryPool.java
@@ -1... | diff --git a/presto-main/src/test/java/io/prestosql/memory/TestMemoryPools.java b/presto-main/src/test/java/io/prestosql/memory/TestMemoryPools.java
index c4aae2800fed..83d361571657 100644
--- a/presto-main/src/test/java/io/prestosql/memory/TestMemoryPools.java
+++ b/presto-main/src/test/java/io/prestosql/memory/TestMe... | NullPointerException when local memory limits are exceeded
Getting this when local memory limits are exceeded (intermittently) on Presto 308:
```
java.lang.NullPointerException: null value in entry: 20190430_043249_01003_x7dxw=null
at com.google.common.collect.CollectPreconditions.checkEntryNotNull(CollectPrecondit... | null | 2019-05-07 17:45:48+00:00 | Java | FROM polybench_java_base
WORKDIR /testbed
COPY . .
ENV JAVA_HOME=/usr/lib/jvm/java-11-amazon-corretto.x86_64/
RUN update-alternatives --set java /usr/lib/jvm/java-11-amazon-corretto.x86_64/bin/java | ['io.prestosql.memory.TestMemoryPools.testBlockingOnRevocableMemoryFreeViaRevoke', 'io.prestosql.memory.TestMemoryPools.testMemoryFutureCancellation', 'io.prestosql.memory.TestMemoryPools.testTaggedAllocations', 'io.prestosql.memory.TestMemoryPools.testBlockingOnUserMemory', 'io.prestosql.memory.TestMemoryPools.testMov... | ['io.prestosql.memory.TestMemoryPools.testMoveUnknownQuery'] | [] | find /testbed -path "*/target/surefire-reports/TEST-*.xml" -delete; export JAVA_HOME=/usr/lib/jvm/java-11-amazon-corretto.x86_64/ && update-alternatives --set java /usr/lib/jvm/java-11-amazon-corretto.x86_64/bin/java && sed -i '/<properties>/a \ <air.check.skip-all>true</air.check.skip-all>\n <checkstyle.skip>tru... | Bug Fix | false | true | false | false | 1 | 0 | 1 | true | false | ["presto-main/src/main/java/io/prestosql/memory/MemoryPool.java->program->class_declaration:MemoryPool->method_declaration:moveQuery"] |
trinodb/trino | 2,768 | trinodb__trino-2768 | ['2767'] | b749331afcdaf917bbf2530c03f8a6a1d39b80fa | diff --git a/presto-main/src/main/java/io/prestosql/execution/CreateRoleTask.java b/presto-main/src/main/java/io/prestosql/execution/CreateRoleTask.java
index f37eca3d2334..40e0292dc289 100644
--- a/presto-main/src/main/java/io/prestosql/execution/CreateRoleTask.java
+++ b/presto-main/src/main/java/io/prestosql/executi... | diff --git a/presto-main/src/test/java/io/prestosql/execution/TestSetRoleTask.java b/presto-main/src/test/java/io/prestosql/execution/TestSetRoleTask.java
index 7bfb9f25cbaa..f17703475d0f 100644
--- a/presto-main/src/test/java/io/prestosql/execution/TestSetRoleTask.java
+++ b/presto-main/src/test/java/io/prestosql/exec... | USE fails when in an invalid catalog when a role for that catalog is set
```
$ presto --debug --catalog test
presto> set role admin;
SET ROLE
presto> use tpch.tiny;
Query 20200208_184255_00004_a53s9 failed: Catalog does not exist: test
io.prestosql.spi.PrestoException: Catalog does not exist: test
at io.... | null | 2020-02-08 18:56:05+00:00 | Java | FROM polybench_java_base
WORKDIR /testbed
COPY . .
ENV JAVA_HOME=/usr/lib/jvm/java-11-amazon-corretto.x86_64/
RUN update-alternatives --set java /usr/lib/jvm/java-11-amazon-corretto.x86_64/bin/java | ['io.prestosql.execution.TestSetRoleTask.testSetRole'] | ['io.prestosql.execution.TestSetRoleTask.testSetRoleInvalidCatalog'] | [] | find /testbed -path "*/target/surefire-reports/TEST-*.xml" -delete; export JAVA_HOME=/usr/lib/jvm/java-11-amazon-corretto.x86_64/ && update-alternatives --set java /usr/lib/jvm/java-11-amazon-corretto.x86_64/bin/java && sed -i '/<properties>/a \ <air.check.skip-all>true</air.check.skip-all>\n <checkstyle.skip>tru... | Bug Fix | false | true | false | false | 7 | 0 | 7 | false | false | ["presto-main/src/main/java/io/prestosql/metadata/MetadataUtil.java->program->class_declaration:MetadataUtil->method_declaration:String_createCatalogName", "presto-main/src/main/java/io/prestosql/execution/GrantRolesTask.java->program->class_declaration:GrantRolesTask->method_declaration:execute", "presto-main/src/main... |
trinodb/trino | 3,392 | trinodb__trino-3392 | ['3394'] | 840d589dbb3c389abfea8d08bdb0d496431cf97f | diff --git a/presto-docs/src/main/sphinx/functions/list.rst b/presto-docs/src/main/sphinx/functions/list.rst
index 8fa185d0c5be..5295e7f381bd 100644
--- a/presto-docs/src/main/sphinx/functions/list.rst
+++ b/presto-docs/src/main/sphinx/functions/list.rst
@@ -390,6 +390,7 @@ S
- :func:`ST_Y`
- :func:`ST_YMax`
- :func... | diff --git a/presto-main/src/test/java/io/prestosql/operator/scalar/TestStringFunctions.java b/presto-main/src/test/java/io/prestosql/operator/scalar/TestStringFunctions.java
index 850df620e364..38b636ef1763 100644
--- a/presto-main/src/test/java/io/prestosql/operator/scalar/TestStringFunctions.java
+++ b/presto-main/s... | Add the starts_with function to determine whether a string starts with a pattern
In our use case, we mainly use `position()` function to determine whether a string starts with a pattern.
However, `position()` function is a little inefficient to determine it.
As far as I investigate, regardless of the length of 1s... | null | 2020-04-09 11:45:50+00:00 | Java | FROM polybench_java_base
WORKDIR /testbed
COPY . .
ENV JAVA_HOME=/usr/lib/jvm/java-11-amazon-corretto.x86_64/
RUN update-alternatives --set java /usr/lib/jvm/java-11-amazon-corretto.x86_64/bin/java | ['io.prestosql.operator.scalar.TestStringFunctions.testCharLength', 'io.prestosql.operator.scalar.TestStringFunctions.testSubstring', 'io.prestosql.operator.scalar.TestStringFunctions.testCharSubstring', 'io.prestosql.operator.scalar.TestStringFunctions.testNormalize', 'io.prestosql.operator.scalar.TestStringFunctions.... | ['io.prestosql.operator.scalar.TestStringFunctions.testStringPosition'] | [] | find /testbed -path "*/target/surefire-reports/TEST-*.xml" -delete; export JAVA_HOME=/usr/lib/jvm/java-11-amazon-corretto.x86_64/ && update-alternatives --set java /usr/lib/jvm/java-11-amazon-corretto.x86_64/bin/java && sed -i '/<properties>/a \ <air.check.skip-all>true</air.check.skip-all>\n <checkstyle.skip>tru... | Feature | false | false | false | true | 1 | 1 | 2 | false | false | ["presto-main/src/main/java/io/prestosql/operator/scalar/StringFunctions.java->program->class_declaration:StringFunctions->method_declaration:startsWith", "presto-main/src/main/java/io/prestosql/operator/scalar/StringFunctions.java->program->class_declaration:StringFunctions"] |
trinodb/trino | 748 | trinodb__trino-748 | ['726'] | e0c2cb7621bc8b55c423f023b659f2050f93e9ed | diff --git a/presto-hive/src/main/java/io/prestosql/plugin/hive/metastore/glue/GlueHiveMetastore.java b/presto-hive/src/main/java/io/prestosql/plugin/hive/metastore/glue/GlueHiveMetastore.java
index dba6594e0586..226588ed24ea 100644
--- a/presto-hive/src/main/java/io/prestosql/plugin/hive/metastore/glue/GlueHiveMetasto... | diff --git a/presto-hive/src/test/java/io/prestosql/plugin/hive/metastore/glue/TestGlueHiveMetastoreConfig.java b/presto-hive/src/test/java/io/prestosql/plugin/hive/metastore/glue/TestGlueHiveMetastoreConfig.java
index b63b0b5d39fc..5bbd14f78661 100644
--- a/presto-hive/src/test/java/io/prestosql/plugin/hive/metastore/... | Accessing AWS Glue Catalog in different account using presto
Well, this is not an issue but I am trying to access aws glue catalog using presto which is situated in a different account. I can access the Glue catalog in the account where the presto instance is running using the below configuration:
connector.name=hiv... | This is a current limitation, but should be easy to add. If you're interested in working on this yourself, it should be just adding them to `GlueHiveMetastoreConfig` and using them in `GlueHiveMetastore` to create the AWS client (with a `BasicAWSCredentials`).
In the latest `310` release, we did add `hive.metastore.... | 2019-05-11 20:31:24+00:00 | Java | FROM polybench_java_base
WORKDIR /testbed
COPY . .
ENV JAVA_HOME=/usr/lib/jvm/java-11-amazon-corretto.x86_64/
RUN update-alternatives --set java /usr/lib/jvm/java-11-amazon-corretto.x86_64/bin/java | [] | ['io.prestosql.plugin.hive.metastore.glue.TestGlueHiveMetastoreConfig.testExplicitPropertyMapping', 'io.prestosql.plugin.hive.metastore.glue.TestGlueHiveMetastoreConfig.testDefaults'] | [] | find /testbed -path "*/target/surefire-reports/TEST-*.xml" -delete; export JAVA_HOME=/usr/lib/jvm/java-11-amazon-corretto.x86_64/ && update-alternatives --set java /usr/lib/jvm/java-11-amazon-corretto.x86_64/bin/java && sed -i '/<properties>/a \ <air.check.skip-all>true</air.check.skip-all>\n <checkstyle.skip>tru... | Feature | false | false | false | true | 5 | 1 | 6 | false | false | ["presto-hive/src/main/java/io/prestosql/plugin/hive/metastore/glue/GlueHiveMetastoreConfig.java->program->class_declaration:GlueHiveMetastoreConfig->method_declaration:getAwsSecretKey", "presto-hive/src/main/java/io/prestosql/plugin/hive/metastore/glue/GlueHiveMetastore.java->program->class_declaration:GlueHiveMetasto... |
trinodb/trino | 3,638 | trinodb__trino-3638 | ['2493'] | 3344fd7cc280bef364fc3f50a7f2b5ba91cf9042 | diff --git a/presto-hive/src/main/java/io/prestosql/plugin/hive/HiveConfig.java b/presto-hive/src/main/java/io/prestosql/plugin/hive/HiveConfig.java
index 31da98d177ef..6463d6ef93f0 100644
--- a/presto-hive/src/main/java/io/prestosql/plugin/hive/HiveConfig.java
+++ b/presto-hive/src/main/java/io/prestosql/plugin/hive/H... | diff --git a/presto-hive/src/test/java/io/prestosql/plugin/hive/AbstractTestHive.java b/presto-hive/src/test/java/io/prestosql/plugin/hive/AbstractTestHive.java
index 24d0dc4b97f0..3fbe4238ffc4 100644
--- a/presto-hive/src/test/java/io/prestosql/plugin/hive/AbstractTestHive.java
+++ b/presto-hive/src/test/java/io/prest... | Make stats update parallel in Hive connector
Currently, stats are updated in sequence which takes a lot of time if there are many partitions. This should be parallelized in order to reduce INSERT or ANALYZE latency.
| null | 2020-05-06 05:51:22+00:00 | Java | FROM polybench_java_base
WORKDIR /testbed
COPY . .
ENV JAVA_HOME=/usr/lib/jvm/java-11-amazon-corretto.x86_64/
RUN update-alternatives --set java /usr/lib/jvm/java-11-amazon-corretto.x86_64/bin/java | [] | ['io.prestosql.plugin.hive.metastore.TestSemiTransactionalHiveMetastore.testParallelUpdateStatisticsOperations', 'io.prestosql.plugin.hive.metastore.TestSemiTransactionalHiveMetastore.testParallelPartitionDrops', 'io.prestosql.plugin.hive.TestHiveConfig.testExplicitPropertyMappings', 'io.prestosql.plugin.hive.TestHiveC... | [] | find /testbed -path "*/target/surefire-reports/TEST-*.xml" -delete; export JAVA_HOME=/usr/lib/jvm/java-11-amazon-corretto.x86_64/ && update-alternatives --set java /usr/lib/jvm/java-11-amazon-corretto.x86_64/bin/java && sed -i '/<properties>/a \ <air.check.skip-all>true</air.check.skip-all>\n <checkstyle.skip>tru... | Feature | false | false | false | true | 7 | 5 | 12 | false | false | ["presto-hive/src/main/java/io/prestosql/plugin/hive/HiveConfig.java->program->class_declaration:HiveConfig", "presto-hive/src/main/java/io/prestosql/plugin/hive/HiveMetadataFactory.java->program->class_declaration:HiveMetadataFactory->constructor_declaration:HiveMetadataFactory", "presto-hive/src/main/java/io/prestosq... |
trinodb/trino | 3,599 | trinodb__trino-3599 | ['3456'] | ca8922eaeb0ad9da60c0856827ff747589775ae5 | diff --git a/presto-main/src/main/java/io/prestosql/operator/scalar/StringFunctions.java b/presto-main/src/main/java/io/prestosql/operator/scalar/StringFunctions.java
index 2fb86d047f8a..983b1418839d 100644
--- a/presto-main/src/main/java/io/prestosql/operator/scalar/StringFunctions.java
+++ b/presto-main/src/main/java... | diff --git a/presto-main/src/test/java/io/prestosql/operator/scalar/TestStringFunctions.java b/presto-main/src/test/java/io/prestosql/operator/scalar/TestStringFunctions.java
index da44808cdd97..fcf6407cb9b9 100644
--- a/presto-main/src/test/java/io/prestosql/operator/scalar/TestStringFunctions.java
+++ b/presto-main/s... | Substr to a CHAR(n) column returns padded string
## Problem
When I do substr to a fixed length CHAR(n) column, it returns white-space-padded string. But I think it should return a truncated string without padding.
I've done the same thing in MySQL and it returned a truncated string which I expected for.
## How t... | I need to take another look at the SQL specification, but this seems like the correct and expected behavior.
CHAR(n) is a fixed-length type (as opposed to VARCHAR(n). The result of applying substr to a CHAR(n) is, by necessity, of the same type — the type system is not powerful enough to derive a new type based on the... | 2020-05-02 09:51:55+00:00 | Java | FROM polybench_java_base
WORKDIR /testbed
COPY . .
ENV JAVA_HOME=/usr/lib/jvm/java-11-amazon-corretto.x86_64/
RUN update-alternatives --set java /usr/lib/jvm/java-11-amazon-corretto.x86_64/bin/java | ['io.prestosql.operator.scalar.TestStringFunctions.testCharLength', 'io.prestosql.operator.scalar.TestStringFunctions.testSubstring', 'io.prestosql.operator.scalar.TestStringFunctions.testNormalize', 'io.prestosql.operator.scalar.TestStringFunctions.testTrimParametrized', 'io.prestosql.operator.scalar.TestStringFunctio... | ['io.prestosql.operator.scalar.TestStringFunctions.testCharSubstring'] | [] | find /testbed -path "*/target/surefire-reports/TEST-*.xml" -delete; export JAVA_HOME=/usr/lib/jvm/java-11-amazon-corretto.x86_64/ && update-alternatives --set java /usr/lib/jvm/java-11-amazon-corretto.x86_64/bin/java && sed -i '/<properties>/a \ <air.check.skip-all>true</air.check.skip-all>\n <checkstyle.skip>tru... | Bug Fix | false | true | false | false | 1 | 0 | 1 | true | false | ["presto-main/src/main/java/io/prestosql/operator/scalar/StringFunctions.java->program->class_declaration:StringFunctions->method_declaration:Slice_charSubstr"] |
trinodb/trino | 3,725 | trinodb__trino-3725 | ['3716'] | f4d7de398006aca2bccf84b5e59d69e93cf51a58 | diff --git a/presto-iceberg/src/main/java/io/prestosql/plugin/iceberg/IcebergPageSource.java b/presto-iceberg/src/main/java/io/prestosql/plugin/iceberg/IcebergPageSource.java
index 4fc0262d9a7b..6029f309228b 100644
--- a/presto-iceberg/src/main/java/io/prestosql/plugin/iceberg/IcebergPageSource.java
+++ b/presto-iceber... | diff --git a/presto-iceberg/src/test/java/io/prestosql/plugin/iceberg/TestIcebergSmoke.java b/presto-iceberg/src/test/java/io/prestosql/plugin/iceberg/TestIcebergSmoke.java
index 8a10fe006074..71c4df3392e2 100644
--- a/presto-iceberg/src/test/java/io/prestosql/plugin/iceberg/TestIcebergSmoke.java
+++ b/presto-iceberg/s... | IcebergConnector: Handle `null` partition value
If the partition value is null.
here if partition column value is null. it fails with exception.
```File hdfs://abc.parquet has no partition data for partitioning column event_dt\```
Place from where this condition is checked:
```
private static Map<Integer... | null | 2020-05-13 21:39:56+00:00 | Java | FROM polybench_java_base
WORKDIR /testbed
COPY . .
ENV JAVA_HOME=/usr/lib/jvm/java-11-amazon-corretto.x86_64/
RUN update-alternatives --set java /usr/lib/jvm/java-11-amazon-corretto.x86_64/bin/java | ['io.prestosql.plugin.iceberg.TestIcebergSmoke.testExactPredicate', 'io.prestosql.plugin.iceberg.TestIcebergSmoke.testSelectInformationSchemaTables', 'io.prestosql.plugin.iceberg.TestIcebergSmoke.testConcurrentScans', 'io.prestosql.plugin.iceberg.TestIcebergSmoke.ensureDistributedQueryRunner', 'io.prestosql.plugin.iceb... | ['io.prestosql.plugin.iceberg.TestIcebergSmoke.testCreatePartitionedTable'] | [] | find /testbed -path "*/target/surefire-reports/TEST-*.xml" -delete; export JAVA_HOME=/usr/lib/jvm/java-11-amazon-corretto.x86_64/ && update-alternatives --set java /usr/lib/jvm/java-11-amazon-corretto.x86_64/bin/java && sed -i '/<properties>/a \ <air.check.skip-all>true</air.check.skip-all>\n <checkstyle.skip>tru... | Bug Fix | false | false | false | true | 2 | 2 | 4 | false | false | ["presto-iceberg/src/main/java/io/prestosql/plugin/iceberg/IcebergPageSource.java->program->class_declaration:IcebergPageSource->constructor_declaration:IcebergPageSource", "presto-iceberg/src/main/java/io/prestosql/plugin/iceberg/IcebergPageSource.java->program->class_declaration:IcebergPageSource->method_declaration:... |
trinodb/trino | 1,193 | trinodb__trino-1193 | ['1189'] | eb1779efb4a9ca1f48682bb9e4da1f993f683069 | diff --git a/presto-main/src/main/java/io/prestosql/dispatcher/DispatcherConfig.java b/presto-main/src/main/java/io/prestosql/dispatcher/DispatcherConfig.java
index 9fbb67394901..aa3878ae978f 100644
--- a/presto-main/src/main/java/io/prestosql/dispatcher/DispatcherConfig.java
+++ b/presto-main/src/main/java/io/prestosq... | diff --git a/presto-main/src/test/java/io/prestosql/dispatcher/TestDispatcherConfig.java b/presto-main/src/test/java/io/prestosql/dispatcher/TestDispatcherConfig.java
index 5460a996c597..1077619d4292 100644
--- a/presto-main/src/test/java/io/prestosql/dispatcher/TestDispatcherConfig.java
+++ b/presto-main/src/test/java... | Support for X-Forwarded-For breaks existing behavior
After upgrading to the latest build, existing installation does not work and connections are rejected with "Presto is configured to REJECT this header: X-Forwarded-For". It is not clear why the default is REJECT and not IGNORE, so it preserves the functionality. If ... | @vrozov
thank you for your feedback. Please accept apologies that I broke your installation.
First, the simple thing:
> Additionally, `dispatcher.forwarded-header` should _not_ be case sensitive and should equally accept `ignore` or `accept`.
This is standard behavior for config values that are backed by a J... | 2019-07-26 07:23:16+00:00 | Java | FROM polybench_java_base
WORKDIR /testbed
COPY . .
ENV JAVA_HOME=/usr/lib/jvm/java-11-amazon-corretto.x86_64/
RUN update-alternatives --set java /usr/lib/jvm/java-11-amazon-corretto.x86_64/bin/java | [] | ['io.prestosql.dispatcher.TestDispatcherConfig.testDefaults', 'io.prestosql.server.TestHttpRequestSessionContext.testSessionContext', 'io.prestosql.server.TestHttpRequestSessionContext.testPreparedStatementsHeaderDoesNotParse', 'io.prestosql.server.TestHttpRequestSessionContext.testXForwardedFor', 'io.prestosql.server.... | [] | find /testbed -path "*/target/surefire-reports/TEST-*.xml" -delete; export JAVA_HOME=/usr/lib/jvm/java-11-amazon-corretto.x86_64/ && update-alternatives --set java /usr/lib/jvm/java-11-amazon-corretto.x86_64/bin/java && sed -i '/<properties>/a \ <air.check.skip-all>true</air.check.skip-all>\n <checkstyle.skip>tru... | Bug Fix | false | false | false | true | 2 | 2 | 4 | false | false | ["presto-main/src/main/java/io/prestosql/dispatcher/DispatcherConfig.java->program->class_declaration:DispatcherConfig", "presto-main/src/main/java/io/prestosql/server/HttpRequestSessionContext.java->program->class_declaration:HttpRequestSessionContext", "presto-main/src/main/java/io/prestosql/dispatcher/DispatcherConf... |
trinodb/trino | 3,771 | trinodb__trino-3771 | ['3220'] | 73aa2888afe85abf4faa0403eecab93dc89ca214 | diff --git a/presto-docs/src/main/sphinx/connector/hive.rst b/presto-docs/src/main/sphinx/connector/hive.rst
index fde819b5d5c2..134cc29e0c85 100644
--- a/presto-docs/src/main/sphinx/connector/hive.rst
+++ b/presto-docs/src/main/sphinx/connector/hive.rst
@@ -249,48 +249,52 @@ Property Name ... | diff --git a/presto-hive/src/test/java/io/prestosql/plugin/hive/metastore/thrift/TestThriftMetastoreConfig.java b/presto-hive/src/test/java/io/prestosql/plugin/hive/metastore/thrift/TestThriftMetastoreConfig.java
index c551e8b333bf..571b02ff83d6 100644
--- a/presto-hive/src/test/java/io/prestosql/plugin/hive/metastore/... | Reduce numbers to issue delegation tokens for kerberized HMS
Currently, Hive connector creates new delegation tokens per request, but our Zookeeper sometimes cannot handle those many requests. This issue may happen especially when we use `information_schema.columns` tables.
We are going to use HMS cache, but it wou... | null | 2020-05-18 13:17:30+00:00 | Java | FROM polybench_java_base
WORKDIR /testbed
COPY . .
ENV JAVA_HOME=/usr/lib/jvm/java-11-amazon-corretto.x86_64/
RUN update-alternatives --set java /usr/lib/jvm/java-11-amazon-corretto.x86_64/bin/java | [] | ['io.prestosql.plugin.hive.metastore.thrift.TestThriftMetastoreConfig.testDefaults', 'io.prestosql.plugin.hive.metastore.thrift.TestThriftMetastoreConfig.testExplicitPropertyMappings'] | [] | find /testbed -path "*/target/surefire-reports/TEST-*.xml" -delete; export JAVA_HOME=/usr/lib/jvm/java-11-amazon-corretto.x86_64/ && update-alternatives --set java /usr/lib/jvm/java-11-amazon-corretto.x86_64/bin/java && sed -i '/<properties>/a \ <air.check.skip-all>true</air.check.skip-all>\n <checkstyle.skip>tru... | Feature | false | false | false | true | 6 | 3 | 9 | false | false | ["presto-hive/src/main/java/io/prestosql/plugin/hive/metastore/thrift/ThriftHiveMetastore.java->program->class_declaration:ThriftHiveMetastore->method_declaration:String_loadDelegationToken", "presto-hive/src/main/java/io/prestosql/plugin/hive/metastore/thrift/ThriftMetastoreConfig.java->program->class_declaration:Thri... |
trinodb/trino | 6,074 | trinodb__trino-6074 | ['5955'] | e95dac7347df3ab31a69298c5d3904cab45f5e02 | diff --git a/presto-kafka/src/main/java/io/prestosql/plugin/kafka/encoder/json/format/MillisecondsSinceEpochFormatter.java b/presto-kafka/src/main/java/io/prestosql/plugin/kafka/encoder/json/format/MillisecondsSinceEpochFormatter.java
index cb9f2affb839..9973122ae251 100644
--- a/presto-kafka/src/main/java/io/prestosql... | diff --git a/presto-kafka/src/test/java/io/prestosql/plugin/kafka/encoder/json/TestJsonEncoder.java b/presto-kafka/src/test/java/io/prestosql/plugin/kafka/encoder/json/TestJsonEncoder.java
index 6b600c7ac900..fdeb09f2454d 100644
--- a/presto-kafka/src/test/java/io/prestosql/plugin/kafka/encoder/json/TestJsonEncoder.jav... | Extend support for INSERT TIME/TIMESTAMP WITH TIMEZONE in Kafka connector JSON encoder
Allow INSERT of temporal types with time-zone in Kafka connector with JSON Encoder when using the `milliseconds-since-epoch` or `seconds-since-epoch` formatters.
See discussion at https://github.com/prestosql/presto/pull/5838#disc... | null | 2020-11-24 13:02:22+00:00 | Java | FROM polybench_java_base
WORKDIR /testbed
COPY . .
ENV JAVA_HOME=/usr/lib/jvm/java-11-amazon-corretto.x86_64/
RUN update-alternatives --set java /usr/lib/jvm/java-11-amazon-corretto.x86_64/bin/java | ['io.prestosql.plugin.kafka.encoder.json.TestSecondsJsonDateTimeFormatter.testTime', 'io.prestosql.plugin.kafka.encoder.json.TestMillisecondsJsonDateTimeFormatter.testTimestamp', 'io.prestosql.plugin.kafka.encoder.json.TestSecondsJsonDateTimeFormatter.testTimestamp', 'io.prestosql.plugin.kafka.encoder.json.TestMillisec... | ['io.prestosql.plugin.kafka.encoder.json.TestSecondsJsonDateTimeFormatter.testTimestampWithTimeZone', 'io.prestosql.plugin.kafka.encoder.json.TestJsonEncoder.testColumnValidation', 'io.prestosql.plugin.kafka.encoder.json.TestMillisecondsJsonDateTimeFormatter.testTimestampWithTimeZone'] | [] | find /testbed -path "*/target/surefire-reports/TEST-*.xml" -delete; export JAVA_HOME=/usr/lib/jvm/java-11-amazon-corretto.x86_64/ && update-alternatives --set java /usr/lib/jvm/java-11-amazon-corretto.x86_64/bin/java && sed -i '/<properties>/a \ <air.check.skip-all>true</air.check.skip-all>\n <checkstyle.skip>tru... | Feature | false | false | false | true | 4 | 2 | 6 | false | false | ["presto-kafka/src/main/java/io/prestosql/plugin/kafka/encoder/json/format/SecondsSinceEpochFormatter.java->program->class_declaration:SecondsSinceEpochFormatter->method_declaration:isSupportedType", "presto-kafka/src/main/java/io/prestosql/plugin/kafka/encoder/json/format/SecondsSinceEpochFormatter.java->program->clas... |
trinodb/trino | 4,664 | trinodb__trino-4664 | ['4630'] | 417c859c257dfd1a135aa38a8ccba161400f1b28 | diff --git a/presto-docs/src/main/sphinx/connector/kafka.rst b/presto-docs/src/main/sphinx/connector/kafka.rst
index ef9c5050fb41..5c75b894f057 100644
--- a/presto-docs/src/main/sphinx/connector/kafka.rst
+++ b/presto-docs/src/main/sphinx/connector/kafka.rst
@@ -62,7 +62,6 @@ Property Name Description... | diff --git a/presto-kafka/src/test/java/io/prestosql/plugin/kafka/KafkaQueryRunner.java b/presto-kafka/src/test/java/io/prestosql/plugin/kafka/KafkaQueryRunner.java
index b43d66e2742b..d9d681afbe59 100644
--- a/presto-kafka/src/test/java/io/prestosql/plugin/kafka/KafkaQueryRunner.java
+++ b/presto-kafka/src/test/java/i... | Confused kafka config `kafka.connect-timeout`
Currently, Kafka client doesn't support the connection timeout, there is only one in-progress pull request / issue which was created long time ago (see [KIP-148](https://cwiki.apache.org/confluence/display/KAFKA/KIP-148%3A+Add+a+connect+timeout+for+client) and https://githu... | It would be good to control the timeout.
For now, let's remove the ignored config, it is easy to
re-add it when we actually implement it. | 2020-08-01 09:12:52+00:00 | Java | FROM polybench_java_base
WORKDIR /testbed
COPY . .
ENV JAVA_HOME=/usr/lib/jvm/java-11-amazon-corretto.x86_64/
RUN update-alternatives --set java /usr/lib/jvm/java-11-amazon-corretto.x86_64/bin/java | [] | ['io.prestosql.plugin.kafka.TestKafkaConfig.testDefaults', 'io.prestosql.plugin.kafka.TestKafkaConfig.testExplicitPropertyMappings'] | [] | find /testbed -path "*/target/surefire-reports/TEST-*.xml" -delete; export JAVA_HOME=/usr/lib/jvm/java-11-amazon-corretto.x86_64/ && update-alternatives --set java /usr/lib/jvm/java-11-amazon-corretto.x86_64/bin/java && sed -i '/<properties>/a \ <air.check.skip-all>true</air.check.skip-all>\n <checkstyle.skip>tru... | Refactoring | false | false | false | true | 2 | 1 | 3 | false | false | ["presto-kafka/src/main/java/io/prestosql/plugin/kafka/KafkaConfig.java->program->class_declaration:KafkaConfig", "presto-kafka/src/main/java/io/prestosql/plugin/kafka/KafkaConfig.java->program->class_declaration:KafkaConfig->method_declaration:Duration_getKafkaConnectTimeout", "presto-kafka/src/main/java/io/prestosql/... |
trinodb/trino | 1,417 | trinodb__trino-1417 | ['1407'] | 016a722127e2c44d22a3aa9b35d56f5714317a90 | diff --git a/presto-parser/src/main/java/io/prestosql/sql/parser/ErrorHandler.java b/presto-parser/src/main/java/io/prestosql/sql/parser/ErrorHandler.java
index 108af47cf2ef..d45929d9b057 100644
--- a/presto-parser/src/main/java/io/prestosql/sql/parser/ErrorHandler.java
+++ b/presto-parser/src/main/java/io/prestosql/sq... | diff --git a/presto-parser/src/test/java/io/prestosql/sql/parser/TestSqlParserErrorHandling.java b/presto-parser/src/test/java/io/prestosql/sql/parser/TestSqlParserErrorHandling.java
index e1de45ee4197..4db7ecb1860f 100644
--- a/presto-parser/src/test/java/io/prestosql/sql/parser/TestSqlParserErrorHandling.java
+++ b/p... | Excessive runtime for parser error reporting
The following query takes over ten minutes to fail with a syntax error:
```sql
SELECT CASE
WHEN orderkey = 1 THEN rand() * rand() * rand() * rand() * rand() * rand() * orderkey
WHEN orderkey = 2 THEN rand() * rand() * rand() * rand() * rand() * rand() * orderkey
WHEN or... | This seems to be caused by 2b33e57518b92d841a48a7d7132f675ee3a847d0 | 2019-08-30 00:11:22+00:00 | Java | FROM polybench_java_base
WORKDIR /testbed
COPY . .
ENV JAVA_HOME=/usr/lib/jvm/java-11-amazon-corretto.x86_64/
RUN update-alternatives --set java /usr/lib/jvm/java-11-amazon-corretto.x86_64/bin/java | ['io.prestosql.sql.parser.TestSqlParserErrorHandling.testStackOverflowExpression', 'io.prestosql.sql.parser.TestSqlParserErrorHandling.testStatement', 'io.prestosql.sql.parser.TestSqlParserErrorHandling.testExpression', 'io.prestosql.sql.parser.TestSqlParserErrorHandling.testParsingExceptionPositionInfo', 'io.prestosql... | ['io.prestosql.sql.parser.TestSqlParserErrorHandling.testStatement', 'io.prestosql.sql.parser.TestSqlParserErrorHandling.testExpression', 'io.prestosql.sql.parser.TestSqlParserErrorHandling.testPossibleExponentialBacktracking'] | [] | find /testbed -path "*/target/surefire-reports/TEST-*.xml" -delete; export JAVA_HOME=/usr/lib/jvm/java-11-amazon-corretto.x86_64/ && update-alternatives --set java /usr/lib/jvm/java-11-amazon-corretto.x86_64/bin/java && sed -i '/<properties>/a \ <air.check.skip-all>true</air.check.skip-all>\n <checkstyle.skip>tru... | Bug Fix | false | false | false | true | 10 | 10 | 20 | false | false | ["presto-parser/src/main/java/io/prestosql/sql/parser/ErrorHandler.java->program->class_declaration:ErrorHandler->class_declaration:Analyzer->method_declaration:Result_process", "presto-parser/src/main/java/io/prestosql/sql/parser/ErrorHandler.java->program->class_declaration:ErrorHandler", "presto-parser/src/main/java... |
trinodb/trino | 2,764 | trinodb__trino-2764 | ['2763'] | 0d67da73beca706c472dbf772d73d378006dc6b1 | diff --git a/presto-main/src/main/java/io/prestosql/execution/UseTask.java b/presto-main/src/main/java/io/prestosql/execution/UseTask.java
index d49678e85b6e..087fd88e3c74 100644
--- a/presto-main/src/main/java/io/prestosql/execution/UseTask.java
+++ b/presto-main/src/main/java/io/prestosql/execution/UseTask.java
@@ -1... | diff --git a/presto-jdbc/src/test/java/io/prestosql/jdbc/TestJdbcConnection.java b/presto-jdbc/src/test/java/io/prestosql/jdbc/TestJdbcConnection.java
index d644b18545d3..b05eb052c681 100644
--- a/presto-jdbc/src/test/java/io/prestosql/jdbc/TestJdbcConnection.java
+++ b/presto-jdbc/src/test/java/io/prestosql/jdbc/TestJ... | Validate schema with use command
As discussed with @electrum and @martint on slack.
https://prestosql.slack.com/archives/CFLB9AMBN/p1581114375346700
```
use tpch.foo
```
should fail if the schema does not exist.
Just like
```
use foo.bar
```
fails.
Connectors need to implement checkSchemaExi... | null | 2020-02-07 23:58:56+00:00 | Java | FROM polybench_java_base
WORKDIR /testbed
COPY . .
ENV JAVA_HOME=/usr/lib/jvm/java-11-amazon-corretto.x86_64/
RUN update-alternatives --set java /usr/lib/jvm/java-11-amazon-corretto.x86_64/bin/java | ['io.prestosql.tests.TestDistributedEngineOnlyQueries.testTimeLiterals', 'io.prestosql.jdbc.TestPrestoDatabaseMetaData.testGetCatalogs', 'io.prestosql.jdbc.TestPrestoDatabaseMetaData.testGetAttributes', 'io.prestosql.jdbc.TestPrestoDatabaseMetaData.testGetSuperTypes', 'io.prestosql.jdbc.TestPrestoDatabaseMetaData.testG... | ['io.prestosql.jdbc.TestJdbcConnection.testUse', 'io.prestosql.tests.TestDistributedEngineOnlyQueries.testUse'] | [] | find /testbed -path "*/target/surefire-reports/TEST-*.xml" -delete; export JAVA_HOME=/usr/lib/jvm/java-11-amazon-corretto.x86_64/ && update-alternatives --set java /usr/lib/jvm/java-11-amazon-corretto.x86_64/bin/java && sed -i '/<properties>/a \ <air.check.skip-all>true</air.check.skip-all>\n <checkstyle.skip>tru... | Bug Fix | false | true | false | false | 1 | 0 | 1 | true | false | ["presto-main/src/main/java/io/prestosql/execution/UseTask.java->program->class_declaration:UseTask->method_declaration:execute"] |
trinodb/trino | 1,848 | trinodb__trino-1848 | ['1834'] | 7c090491a3682640af4c932b9cffb813d5ad480a | diff --git a/presto-docs/src/main/sphinx/functions/math.rst b/presto-docs/src/main/sphinx/functions/math.rst
index ae00b4bc85f5..8048cf4e6767 100644
--- a/presto-docs/src/main/sphinx/functions/math.rst
+++ b/presto-docs/src/main/sphinx/functions/math.rst
@@ -135,6 +135,10 @@ Mathematical Functions
Returns a pseu... | diff --git a/presto-main/src/test/java/io/prestosql/operator/scalar/TestMathFunctions.java b/presto-main/src/test/java/io/prestosql/operator/scalar/TestMathFunctions.java
index 450c41e6473c..9306874a2a29 100644
--- a/presto-main/src/test/java/io/prestosql/operator/scalar/TestMathFunctions.java
+++ b/presto-main/src/tes... | Add random function taking range min, max
Currently we have `random(n)` (_Returns a pseudo-random number between 0 and n (exclusive)_)
Implement `random(m, n)` returning a pseudo-random number between m and n (exclusive).
| Hello! Can I take this issue?
@victormazevedo Please go ahead :) | 2019-10-24 00:03:48+00:00 | Java | FROM polybench_java_base
WORKDIR /testbed
COPY . .
ENV JAVA_HOME=/usr/lib/jvm/java-11-amazon-corretto.x86_64/
RUN update-alternatives --set java /usr/lib/jvm/java-11-amazon-corretto.x86_64/bin/java | ['io.prestosql.operator.scalar.TestMathFunctions.testBetaCdf', 'io.prestosql.operator.scalar.TestMathFunctions.testInfinity', 'io.prestosql.operator.scalar.TestMathFunctions.testCeil', 'io.prestosql.operator.scalar.TestMathFunctions.testPi', 'io.prestosql.operator.scalar.TestMathFunctions.testFloor', 'io.prestosql.oper... | ['io.prestosql.operator.scalar.TestMathFunctions.testRandom'] | [] | find /testbed -path "*/target/surefire-reports/TEST-*.xml" -delete; export JAVA_HOME=/usr/lib/jvm/java-11-amazon-corretto.x86_64/ && update-alternatives --set java /usr/lib/jvm/java-11-amazon-corretto.x86_64/bin/java && sed -i '/<properties>/a \ <air.check.skip-all>true</air.check.skip-all>\n <checkstyle.skip>tru... | Feature | false | false | false | true | 4 | 1 | 5 | false | false | ["presto-main/src/main/java/io/prestosql/operator/scalar/MathFunctions.java->program->class_declaration:MathFunctions->method_declaration:randomSmallint", "presto-main/src/main/java/io/prestosql/operator/scalar/MathFunctions.java->program->class_declaration:MathFunctions->method_declaration:randomTinyint", "presto-main... |
trinodb/trino | 1,090 | trinodb__trino-1090 | ['1085'] | 669bcb49800fc4e40fb4db9f9eb180c23f9a6b6a | diff --git a/presto-hive/src/main/java/io/prestosql/plugin/hive/HiveMetadata.java b/presto-hive/src/main/java/io/prestosql/plugin/hive/HiveMetadata.java
index 3e2b2352ec2d..e2c9c1e6ffa0 100644
--- a/presto-hive/src/main/java/io/prestosql/plugin/hive/HiveMetadata.java
+++ b/presto-hive/src/main/java/io/prestosql/plugin/... | diff --git a/presto-hive/src/test/java/io/prestosql/plugin/hive/TestBackgroundHiveSplitLoader.java b/presto-hive/src/test/java/io/prestosql/plugin/hive/TestBackgroundHiveSplitLoader.java
index d258f7055cb3..d12f52fb30e0 100644
--- a/presto-hive/src/test/java/io/prestosql/plugin/hive/TestBackgroundHiveSplitLoader.java
+... | Allow to set header and footer skip line count for CSV tables
| null | 2019-07-06 14:23:28+00:00 | Java | FROM polybench_java_base
WORKDIR /testbed
COPY . .
ENV JAVA_HOME=/usr/lib/jvm/java-11-amazon-corretto.x86_64/
RUN update-alternatives --set java /usr/lib/jvm/java-11-amazon-corretto.x86_64/bin/java | [] | ['io.prestosql.plugin.hive.TestHiveIntegrationSmokeTest.testRangePredicate', 'io.prestosql.plugin.hive.TestHiveIntegrationSmokeTest.testSelectInformationSchemaTables', 'io.prestosql.plugin.hive.TestHiveIntegrationSmokeTest.testCreateTableOnlyPartitionColumns', 'io.prestosql.plugin.hive.TestHiveIntegrationSmokeTest.test... | [] | find /testbed -path "*/target/surefire-reports/TEST-*.xml" -delete; export JAVA_HOME=/usr/lib/jvm/java-11-amazon-corretto.x86_64/ && update-alternatives --set java /usr/lib/jvm/java-11-amazon-corretto.x86_64/bin/java && sed -i '/<properties>/a \ <air.check.skip-all>true</air.check.skip-all>\n <checkstyle.skip>tru... | Feature | false | false | false | true | 10 | 3 | 13 | false | false | ["presto-hive/src/main/java/io/prestosql/plugin/hive/HiveMetadata.java->program->class_declaration:HiveMetadata->method_declaration:ConnectorTableMetadata_doGetTableMetadata", "presto-hive/src/main/java/io/prestosql/plugin/hive/HiveTableProperties.java->program->class_declaration:HiveTableProperties->method_declaration... |
mrdoob/three.js | 14,566 | mrdoob__three.js-14566 | ['14565'] | 8921bfaee413e809cb2d27f0aec917408d690a0f | diff --git a/docs/api/en/objects/LOD.html b/docs/api/en/objects/LOD.html
--- a/docs/api/en/objects/LOD.html
+++ b/docs/api/en/objects/LOD.html
@@ -70,18 +70,20 @@ <h3>[property:Array levels]</h3>
<p>
An array of [page:Object level] objects<br /><br />
- Each level is an object with two properties:<br />
+ Eac... | diff --git a/test/unit/src/objects/LOD.tests.js b/test/unit/src/objects/LOD.tests.js
--- a/test/unit/src/objects/LOD.tests.js
+++ b/test/unit/src/objects/LOD.tests.js
@@ -73,14 +73,14 @@ export default QUnit.module( 'Objects', () => {
var mid = new Object3D();
var low = new Object3D();
- lod.addLevel( high,... | LOD: Consider adding hysteresis option.
With the LOD systems in Unreal, Unity, and Blender, LODs have a threshold that offsets the distance where the LOD appears from the distance where it disappears, to reduce flickering from small movements (e.g. head movement with roomscale VR). From [Unreal docs](https://docs.unrea... | null | 2018-07-27 04:10:43+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi && npm i --prefix test && sed -i 's/failonlyreporter/tap/g' package.json test/pac... | ['348 Core > Object3D > copy', '512 Extras > Curves > SplineCurve > getPointAt', '342 Core > Object3D > traverse/traverseVisible/traverseAncestors', '885 Maths > Color > copy', '283 Core > InterleavedBuffer > copyAt', '894 Maths > Color > offsetHSL', '857 Maths > Box3 > expandByScalar', '1232 Maths > Vector2 > min/max/... | ['1402 Objects > LOD > addLevel'] | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test --exit | Feature | false | false | false | true | 6 | 1 | 7 | false | false | ["src/objects/LOD.js->program->class_declaration:LOD->method_definition:getObjectForDistance", "src/objects/LOD.js->program->class_declaration:LOD->method_definition:copy", "src/loaders/ObjectLoader.js->program->class_declaration:ObjectLoader->method_definition:parseObject", "src/objects/LOD.js->program->class_declarat... |
mrdoob/three.js | 14,836 | mrdoob__three.js-14836 | ['14834'] | c570b9bd95cf94829715b2cd3a8b128e37768a9c | diff --git a/src/math/Box3.js b/src/math/Box3.js
--- a/src/math/Box3.js
+++ b/src/math/Box3.js
@@ -384,7 +384,7 @@ Object.assign( Box3.prototype, {
}
- return ( min <= plane.constant && max >= plane.constant );
+ return ( min <= - plane.constant && max >= - plane.constant );
},
| diff --git a/test/unit/src/math/Box3.tests.js b/test/unit/src/math/Box3.tests.js
--- a/test/unit/src/math/Box3.tests.js
+++ b/test/unit/src/math/Box3.tests.js
@@ -409,10 +409,22 @@ export default QUnit.module( 'Maths', () => {
var b = new Plane( new Vector3( 0, 1, 0 ), 1 );
var c = new Plane( new Vector3( 0, 1,... | box3.intersectsPlane bug
In the following example, the plane obviously intersects with the box, but the function intersectsPlane returns false.
[example](https://jsfiddle.net/rn6jzdub/4/)
I find that adding two negative sign before both of the plane.constant can fix the bug.
https://github.com/mrdoob/three.js/blob/c... | Good find! Would you like to do a PR with the fix? It would be great if you also adjust the wrong [unit test](https://github.com/mrdoob/three.js/blob/dev/test/unit/src/math/Box3.tests.js#L406).
> Also, I think the definition of the constant of the plane is not distinct, which cause the bug
`three.js` uses [Hessia... | 2018-09-03 10:34:13+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi && sed -i 's/failonlyreporter/tap/g' package.json
RUN . $NVM_DIR/nvm.sh && nvm al... | ['1431 Source > Maths > Vector3 > length/lengthSq', '1266 Source > Maths > Sphere > equals', '631 Source > Geometries > PlaneGeometry > Standard geometry tests', '1040 Source > Maths > Color > setStyleRGBAPercentWithSpaces', '553 Source > Extras > Curves > SplineCurve > getTangent', '1238 Source > Maths > Ray > distanc... | ['988 Source > Maths > Box3 > intersectsPlane'] | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test --exit | Bug Fix | true | false | false | false | 0 | 0 | 0 | false | false | [] |
mrdoob/three.js | 17,649 | mrdoob__three.js-17649 | ['17608'] | c2cf0d97334bc97673053aaa381ae2cc3982a0f6 | diff --git a/docs/api/en/core/BufferGeometry.html b/docs/api/en/core/BufferGeometry.html
--- a/docs/api/en/core/BufferGeometry.html
+++ b/docs/api/en/core/BufferGeometry.html
@@ -144,6 +144,13 @@ <h3>[property:Object morphAttributes]</h3>
Hashmap of [page:BufferAttribute]s holding details of the geometry's [page:Ge... | diff --git a/test/unit/src/core/BufferGeometry.tests.js b/test/unit/src/core/BufferGeometry.tests.js
--- a/test/unit/src/core/BufferGeometry.tests.js
+++ b/test/unit/src/core/BufferGeometry.tests.js
@@ -870,6 +870,7 @@ export default QUnit.module( 'Core', () => {
"name": "attribute1"
} ]
};
+ gold.data... | GLTFLoader: Morph targets only work for matching accessor types
glTF files assume that morph target data is specified as relative adjustments, and three.js assumes that the data in morph target buffers is absolute.
This leads to a few obvious memory/performance caveats - the morph target data needs to be duplicated ... | Here's an example mesh with this problem that works perfectly fine in Babylon.JS but doesn't work in three.js.
[morphbytedeltas.glb.zip](https://github.com/mrdoob/three.js/files/3668257/morphbytedeltas.glb.zip)
> because three.js attempts to reconstruct the absolute position however, attempting to encode Int8 delt... | 2019-10-03 06:01:18+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi && sed -i 's/failonlyreporter/tap/g' package.json
RUN . $NVM_DIR/nvm.sh && nvm al... | ['966 Source > Maths > Color > toJSON', '1085 Source > Maths > Matrix4 > clone', '943 Source > Maths > Color > clone', '357 Source > Core > Object3D > applyQuaternion', '471 Source > Extras > Curves > CatmullRomCurve3 > getSpacedPoints', '911 Source > Maths > Box3 > isEmpty', '777 Source > Loaders > LoaderUtils > decod... | ['259 Source > Core > BufferGeometry > toJSON'] | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test --exit | Feature | false | false | false | true | 9 | 1 | 10 | false | false | ["examples/js/loaders/GLTFLoader.js->program->function_declaration:addMorphTargets", "src/renderers/webgl/WebGLMorphtargets.js->program->function_declaration:WebGLMorphtargets->function_declaration:update", "examples/js/loaders/GLTFLoader.js->program->function_declaration:cloneBufferAttribute", "examples/jsm/exporters/... |
mrdoob/three.js | 17,894 | mrdoob__three.js-17894 | ['17812'] | 47a438f14fcd878758c319773d76c4dbd55fbe4a | diff --git a/src/objects/LOD.d.ts b/src/objects/LOD.d.ts
--- a/src/objects/LOD.d.ts
+++ b/src/objects/LOD.d.ts
@@ -10,9 +10,10 @@ export class LOD extends Object3D {
type: 'LOD';
levels: { distance: number; object: Object3D }[];
+ autoUpdate: boolean;
addLevel( object: Object3D, distance?: number ): this;
- g... | diff --git a/test/unit/src/objects/LOD.tests.js b/test/unit/src/objects/LOD.tests.js
--- a/test/unit/src/objects/LOD.tests.js
+++ b/test/unit/src/objects/LOD.tests.js
@@ -3,6 +3,8 @@
*/
/* global QUnit */
+import { Object3D } from '../../../../src/core/Object3D';
+import { Raycaster } from '../../../../src/core/Ra... | Exception if LOD has no levels defined
##### Description of the problem
This is a very simple problem in the code of `getObjectForDistance` in `LOD.js`:
```
getObjectForDistance: function ( distance ) {
var levels = this.levels;
for ( var i = 1, l = levels.length; i < l; i ++ ) {
if ( distance < levels[ i... | In this case, it's also necessary to change `LOD.raycast()`. Even with your proposed change, the method would throw an exception because of the following line.
```js
this.getObjectForDistance( distance ).raycast( raycaster, intersects );
```
If no levels are defined, `getObjectForDistance()` would return `undefined... | 2019-11-08 14:13:48+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi && sed -i 's/failonlyreporter/tap/g' package.json
RUN . $NVM_DIR/nvm.sh && nvm al... | ['966 Source > Maths > Color > toJSON', '1085 Source > Maths > Matrix4 > clone', '943 Source > Maths > Color > clone', '357 Source > Core > Object3D > applyQuaternion', '471 Source > Extras > Curves > CatmullRomCurve3 > getSpacedPoints', '911 Source > Maths > Box3 > isEmpty', '777 Source > Loaders > LoaderUtils > decod... | ['1451 Source > Objects > LOD > copy', '1453 Source > Objects > LOD > getObjectForDistance', '1454 Source > Objects > LOD > raycast'] | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test --exit | Bug Fix | false | false | true | false | 0 | 1 | 1 | false | true | ["src/objects/LOD.d.ts->program->class_declaration:LOD"] |
mrdoob/three.js | 17,933 | mrdoob__three.js-17933 | ['17920'] | 92f08b4cdece761ba27abd87f33e624ecb16c284 | diff --git a/src/loaders/LoadingManager.js b/src/loaders/LoadingManager.js
--- a/src/loaders/LoadingManager.js
+++ b/src/loaders/LoadingManager.js
@@ -121,6 +121,8 @@ function LoadingManager( onLoad, onProgress, onError ) {
var regex = handlers[ i ];
var loader = handlers[ i + 1 ];
+ if ( regex.global ) reg... | diff --git a/test/unit/src/loaders/LoadingManager.tests.js b/test/unit/src/loaders/LoadingManager.tests.js
--- a/test/unit/src/loaders/LoadingManager.tests.js
+++ b/test/unit/src/loaders/LoadingManager.tests.js
@@ -4,6 +4,7 @@
/* global QUnit */
import { LoadingManager } from '../../../../src/loaders/LoadingManager... | LoadingManager.getHandler does not work half the time if a regex with g flag is passed
If adding a handler with a regex that has the `g` flag, the `regex.test` in `getHandler` will return null every other time.
I think `string.match` should be used rather than `regex.test` to avoid any side effect like this
| Could you share an example to reproduce this issue?
Here you go @donmccurdy
https://jsfiddle.net/qkwx4Lg1/2
so basically this:

mozdev says:
> As with exec() (or in combination ... | 2019-11-14 19:29:58+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi && sed -i 's/failonlyreporter/tap/g' package.json
RUN . $NVM_DIR/nvm.sh && nvm al... | ['357 Source > Core > Object3D > applyQuaternion', '1093 Source > Maths > Matrix4 > premultiply', '471 Source > Extras > Curves > CatmullRomCurve3 > getSpacedPoints', '1116 Source > Maths > Plane > Instancing', '1172 Source > Maths > Ray > closestPointToPoint', '777 Source > Loaders > LoaderUtils > decodeText', '1186 S... | ['787 Source > Loaders > LoadingManager > getHandler'] | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test --exit | Bug Fix | false | true | false | false | 1 | 0 | 1 | true | false | ["src/loaders/LoadingManager.js->program->function_declaration:LoadingManager"] |
mrdoob/three.js | 18,648 | mrdoob__three.js-18648 | ['18590'] | cceffcbec987ba640b98285503e1267336626f22 | diff --git a/docs/api/en/core/Raycaster.html b/docs/api/en/core/Raycaster.html
--- a/docs/api/en/core/Raycaster.html
+++ b/docs/api/en/core/Raycaster.html
@@ -93,11 +93,6 @@ <h3>[property:float far]</h3>
This value shouldn't be negative and should be larger than the near property.
</p>
- <h3>[property:float li... | diff --git a/test/unit/src/core/Raycaster.tests.js b/test/unit/src/core/Raycaster.tests.js
--- a/test/unit/src/core/Raycaster.tests.js
+++ b/test/unit/src/core/Raycaster.tests.js
@@ -7,6 +7,9 @@ import { Raycaster } from '../../../../src/core/Raycaster';
import { Vector3 } from '../../../../src/math/Vector3';
import ... | Inconsistent raycast precision API
##### Description of the problem
Both `Points` and `Line` implement a `raycast()` function/method. They both use a threshold/precision:
https://github.com/mrdoob/three.js/blob/138d25dbd138f9feedbb20ade26f104155a50d8f/src/objects/Points.js#L37-L59
https://github.com/mrdoob/thr... | Related #5366.
Just to be clear, I am not suggesting changing the units of the raycaster precision. I think world units are just fine. :blush:
Agreed, a common approach for `Points` and `Lines` is desirable. I think I vote for enhancing `Raycaster.params`, too. And deprecating `Raycaster.linePrecision`.
So will the con... | 2020-02-17 00:53:10+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi && sed -i 's/failonlyreporter/tap/g' package.json
RUN . $NVM_DIR/nvm.sh && nvm al... | ['1111 Source > Maths > Plane > clone', '1355 Source > Maths > Vector3 > multiply/divide', '1133 Source > Maths > Quaternion > clone', '1280 Source > Maths > Vector2 > multiply/divide', '357 Source > Core > Object3D > applyQuaternion', '969 Source > Maths > Color > setStyleHSLRed', '1272 Source > Maths > Vector2 > mult... | ['394 Source > Core > Raycaster > Line intersection threshold'] | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test --exit | Refactoring | false | false | false | true | 1 | 1 | 2 | false | false | ["src/core/Raycaster.js->program->function_declaration:Raycaster", "src/core/Raycaster.d.ts->program->class_declaration:Raycaster"] |
mrdoob/three.js | 18,885 | mrdoob__three.js-18885 | ['17926'] | e3d60b17c0497a08ecb166eae799eb5cf6d9e7f5 | diff --git a/docs/api/en/math/Matrix3.html b/docs/api/en/math/Matrix3.html
--- a/docs/api/en/math/Matrix3.html
+++ b/docs/api/en/math/Matrix3.html
@@ -106,15 +106,14 @@ <h3>[method:this fromArray]( [param:Array array], [param:Integer offset] )</h3>
[link:https://en.wikipedia.org/wiki/Row-_and_column-major_order#Colu... | diff --git a/test/unit/src/math/Matrix3.tests.js b/test/unit/src/math/Matrix3.tests.js
--- a/test/unit/src/math/Matrix3.tests.js
+++ b/test/unit/src/math/Matrix3.tests.js
@@ -6,7 +6,6 @@
import { Matrix3 } from '../../../../src/math/Matrix3';
import { Matrix4 } from '../../../../src/math/Matrix4';
-import { Float32... | Cleaner handling of 0 scale
##### Description of the problem
Whenever an object is scaled to 0 (scale.set(0,0,0)) or a camera and target are at position (0, 0, 0), ThreeJS stops rendering the objects and fills the console with errors:
THREE.Matrix3: .getInverse() can't invert matrix, determinant is 0
I feel li... | When this issue was last discussed in 2012, I think that negative scales were not supported.
Now that we support both positive and negative scale values, this seems like a more reasonable request. Otherwise I don't think there's any way for someone to tween from negative to positive scale.
> I don't think there's ... | 2020-03-12 20:34:41+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi && sed -i 's/failonlyreporter/tap/g' package.json
RUN . $NVM_DIR/nvm.sh && nvm al... | ['1111 Source > Maths > Plane > clone', '1355 Source > Maths > Vector3 > multiply/divide', '1133 Source > Maths > Quaternion > clone', '1280 Source > Maths > Vector2 > multiply/divide', '357 Source > Core > Object3D > applyQuaternion', '969 Source > Maths > Color > setStyleHSLRed', '1272 Source > Maths > Vector2 > mult... | ['1089 Source > Maths > Matrix4 > getInverse', '1061 Source > Maths > Matrix3 > getInverse'] | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test --exit | Bug Fix | false | false | true | false | 0 | 1 | 1 | false | true | ["src/math/Matrix4.d.ts->program->class_declaration:Matrix4"] |
mrdoob/three.js | 20,478 | mrdoob__three.js-20478 | ['20414'] | b47af3a31dd770a731563476089b97852a1117cb | diff --git a/docs/api/en/core/Object3D.html b/docs/api/en/core/Object3D.html
--- a/docs/api/en/core/Object3D.html
+++ b/docs/api/en/core/Object3D.html
@@ -314,6 +314,11 @@ <h3>[method:this remove]( [param:Object3D object], ... )</h3>
Removes *object* as child of this object. An arbitrary number of objects may be rem... | diff --git a/test/unit/src/core/Object3D.tests.js b/test/unit/src/core/Object3D.tests.js
--- a/test/unit/src/core/Object3D.tests.js
+++ b/test/unit/src/core/Object3D.tests.js
@@ -296,7 +296,7 @@ export default QUnit.module( 'Core', () => {
} );
- QUnit.test( "add/remove", ( assert ) => {
+ QUnit.test( "add/rem... | Object3D: Add removeAll or clear.
I'd like to have removeAll or clear method in Object3D.
```
remove: function ( object ) {
if ( arguments.length > 1 ) {
for ( let i = 0; i < arguments.length; i ++ ) {
this.remove( arguments[ i ] );
}
return this;
}
const index = this.childr... | Sounds good to me.
I thing I would prefer something like this:
```js
clear: function () {
while ( this.children.length > 0 ) {
const object = this.children.pop();
object.parent = null;
object.dispatchEvent( _removedEvent );
}
return this;
}
```
`this.children.pop` spends more time than... | 2020-10-08 12:18:34+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi && npm i --prefix test && sed -i 's/failonlyreporter/tap/g' package.json test/pac... | ['1405 Source > Maths > Vector4 > toArray', '995 Source > Maths > Euler > set/get properties, check callbacks', '1176 Source > Maths > Sphere > Instancing', '1361 Source > Maths > Vector4 > Instancing', '1050 Source > Maths > Matrix3 > isMatrix3', '471 Source > Extras > Curves > CatmullRomCurve3 > getSpacedPoints', '13... | ['373 Source > Core > Object3D > add/remove/removeAll'] | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test --exit | Feature | false | false | true | false | 0 | 1 | 1 | false | true | ["src/core/Object3D.d.ts->program->class_declaration:Object3D"] |
mrdoob/three.js | 21,532 | mrdoob__three.js-21532 | ['21498'] | ff75ee91591e6c977cf0ceb716e73adb34c090f2 | diff --git a/docs/api/en/math/Quaternion.html b/docs/api/en/math/Quaternion.html
--- a/docs/api/en/math/Quaternion.html
+++ b/docs/api/en/math/Quaternion.html
@@ -163,6 +163,9 @@ <h3>[method:Quaternion slerp]( [param:Quaternion qb], [param:Float t] )</h3>
</code>
</p>
+ <h3>[method:this slerpQuaternions]( [pa... | diff --git a/test/unit/src/math/Quaternion.tests.js b/test/unit/src/math/Quaternion.tests.js
--- a/test/unit/src/math/Quaternion.tests.js
+++ b/test/unit/src/math/Quaternion.tests.js
@@ -657,6 +657,22 @@ export default QUnit.module( 'Maths', () => {
} );
+ QUnit.test( "slerpQuaternions", ( assert ) => {
+
+ v... | Feature: Quaternion.slerpQuaternions()
It's already possible to easily interpolate between two quaternions by using the static helper, but the Vector classes already implement a .lerpVectors, would it make sense to also have the same API for quaternions?
```js
const q = new Quaternion()
q.slerpQuaternions(quatA, q... | I'm fine with such a method. It should be:
```js
slerpQuaternions( qa, qb, t ) {
this.copy( qa ).slerp( qb, t );
}
```
I'll PR it later today 👍
Yes, and I would suggest having it replace the static method:
```js
static slerp( qa, qb, qm, t ) {
return qm.copy( qa ).slerp( qb, t );
}
```
Retai... | 2021-03-27 09:07:34+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi && npm i --prefix test && sed -i 's/failonlyreporter/tap/g' package.json test/pac... | ['303 Source > Core > Layers > toggle', '328 Source > Core > Object3D > localToWorld', '877 Source > Maths > Box3 > intersect', '901 Source > Maths > Color > getStyle', '846 Source > Maths > Box2 > union', '965 Source > Maths > Frustum > setFromProjectionMatrix/makePerspective/containsPoint', '828 Source > Maths > Box2... | ['1109 Source > Maths > Quaternion > slerpQuaternions'] | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test --exit | Feature | false | false | false | true | 2 | 1 | 3 | false | false | ["src/math/Quaternion.js->program->class_declaration:Quaternion", "src/math/Quaternion.js->program->class_declaration:Quaternion->method_definition:slerp", "src/math/Quaternion.js->program->class_declaration:Quaternion->method_definition:slerpQuaternions"] |
mrdoob/three.js | 21,826 | mrdoob__three.js-21826 | ['21714'] | c4002a6004dd88070b8dac7740020c9f169f27e9 | diff --git a/docs/api/en/core/Object3D.html b/docs/api/en/core/Object3D.html
--- a/docs/api/en/core/Object3D.html
+++ b/docs/api/en/core/Object3D.html
@@ -325,6 +325,11 @@ <h3>[method:this remove]( [param:Object3D object], ... )</h3>
Removes *object* as child of this object. An arbitrary number of objects may be rem... | diff --git a/test/unit/src/core/Object3D.tests.js b/test/unit/src/core/Object3D.tests.js
--- a/test/unit/src/core/Object3D.tests.js
+++ b/test/unit/src/core/Object3D.tests.js
@@ -440,6 +440,12 @@ export default QUnit.module( 'Core', () => {
assert.strictEqual( child1.parent, null, "First child has no parent" );
... | can we have Object3D.remove() with no arguments remove an object itself?
so that we can write `light.remove();` instead of `light.parent.remove(light);` ?
right now .remove() does not seem to be doing anything so there will be no conflict.
| I think this is a good feature request. I've often encountered issues where this semantic would be convenient. The method would then behave like [the remove() method of DOM elements](https://www.w3schools.com/jsref/met_element_remove.asp) if invocated with no parameters.
>can we have Object3D.remove() with no arguments... | 2021-05-13 08:52:13+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi && npm i --prefix test && sed -i 's/failonlyreporter/tap/g' package.json test/pac... | ['303 Source > Core > Layers > toggle', '328 Source > Core > Object3D > localToWorld', '877 Source > Maths > Box3 > intersect', '901 Source > Maths > Color > getStyle', '1049 Source > Maths > Matrix4 > setPosition', '846 Source > Maths > Box2 > union', '1364 Source > Maths > Vector4 > normalize', '1127 Source > Maths >... | ['331 Source > Core > Object3D > add/remove/clear'] | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test --exit | Feature | false | false | false | true | 1 | 1 | 2 | false | false | ["src/core/Object3D.js->program->class_declaration:Object3D", "src/core/Object3D.js->program->class_declaration:Object3D->method_definition:removeFromParent"] |
mrdoob/three.js | 22,566 | mrdoob__three.js-22566 | ['8522'] | 7f6a0990feec2946225147ab2a4fbcaf69dcb359 | diff --git a/src/core/BufferGeometry.js b/src/core/BufferGeometry.js
--- a/src/core/BufferGeometry.js
+++ b/src/core/BufferGeometry.js
@@ -1004,31 +1004,7 @@ class BufferGeometry extends EventDispatcher {
clone() {
- /*
- // Handle primitives
-
- const parameters = this.parameters;
-
- if ( parameters !== ... | diff --git a/test/unit/utils/qunit-utils.js b/test/unit/utils/qunit-utils.js
--- a/test/unit/utils/qunit-utils.js
+++ b/test/unit/utils/qunit-utils.js
@@ -83,12 +83,10 @@ function checkGeometryClone( geom ) {
QUnit.assert.notEqual( copy.uuid, geom.uuid, "clone uuid should differ from original" );
QUnit.assert.notEq... | Clone cylinderGeometry Creates Geometry
##### Description of the problem
When cloning a cylinderGeometry the clone is a geometry not a cylinderGeometry.
simple fiddle,check the console: http://jsfiddle.net/momve8hk/
Tested in r72 and i get a cylinderGeometry.
...
##### Three.js version
- [x] r75
| /ping @Mugen87
I ended up just making new cylinder geometries from the parameters object. Seems to work pretty well.
I think this [line of code](https://github.com/mrdoob/three.js/blob/7e0a78beb9317e580d7fa4da9b5b12be051c6feb/src/core/Geometry.js#L1151) causes the behavior. The implementation of the `Geometry .clo... | 2021-09-22 08:38:30+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi && npm i --prefix test && sed -i 's/failonlyreporter/tap/g' package.json test/pac... | ['241 Source > Core > BufferGeometry > scale', '303 Source > Core > Layers > toggle', '426 Source > Extras > Curves > CatmullRomCurve3 > computeFrenetFrames', '901 Source > Maths > Color > toArray', '328 Source > Core > Object3D > localToWorld', '686 Source > Loaders > BufferGeometryLoader > parser - attributes - circl... | ['526 Source > Geometries > CylinderGeometry > Standard geometry tests', '573 Source > Geometries > TorusBufferGeometry > Standard geometry tests', '546 Source > Geometries > IcosahedronGeometry > Standard geometry tests', '520 Source > Geometries > CircleGeometry > Standard geometry tests', '576 Source > Geometries > ... | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test --exit | Bug Fix | false | true | false | false | 3 | 0 | 3 | false | false | ["src/core/BufferGeometry.js->program->class_declaration:BufferGeometry->method_definition:clone", "src/core/BufferGeometry.js->program->class_declaration:BufferGeometry->method_definition:copy", "src/geometries/PolyhedronGeometry.js->program->class_declaration:PolyhedronGeometry->method_definition:constructor"] |
mrdoob/three.js | 22,981 | mrdoob__three.js-22981 | ['22980'] | 8abf54b18078206ab4aac148ed956456d0d6bff7 | diff --git a/src/math/Sphere.js b/src/math/Sphere.js
--- a/src/math/Sphere.js
+++ b/src/math/Sphere.js
@@ -193,7 +193,16 @@ class Sphere {
// 1) Enclose the farthest point on the other sphere into this sphere.
// 2) Enclose the opposite point of the farthest point into this sphere.
- _toFarthestPoint.subVector... | diff --git a/test/unit/src/math/Sphere.tests.js b/test/unit/src/math/Sphere.tests.js
--- a/test/unit/src/math/Sphere.tests.js
+++ b/test/unit/src/math/Sphere.tests.js
@@ -279,6 +279,16 @@ export default QUnit.module( 'Maths', () => {
assert.ok( c.center.equals( new Vector3( 1, 0, 0 ) ), 'Passed!' );
assert.ok( ... | Sphere.union() produces incorrect results if both spheres have the same center
<!-- Ignoring this template may result in your bug report getting deleted -->
**Describe the bug**
When using Sphere.union() the original sphere is not expanded to enclose the given sphere (even if the given one is bigger) if both of t... | null | 2021-12-08 13:09:13+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi && npm i --prefix test && sed -i 's/failonlyreporter/tap/g' package.json test/pac... | ['241 Source > Core > BufferGeometry > scale', '303 Source > Core > Layers > toggle', '512 Source > Extras > Curves > SplineCurve > getSpacedPoints', '863 Source > Maths > Box3 > union', '1060 Source > Maths > Plane > distanceToPoint', '850 Source > Maths > Box3 > expandByScalar', '937 Source > Maths > Euler > reorder'... | ['1142 Source > Maths > Sphere > union'] | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test --exit | Bug Fix | false | true | false | false | 1 | 0 | 1 | true | false | ["src/math/Sphere.js->program->class_declaration:Sphere->method_definition:union"] |
mrdoob/three.js | 23,596 | mrdoob__three.js-23596 | ['23563'] | 30f34a310375c2a7ad58effa5474cdbf5375c595 | diff --git a/docs/api/en/extras/DataUtils.html b/docs/api/en/extras/DataUtils.html
--- a/docs/api/en/extras/DataUtils.html
+++ b/docs/api/en/extras/DataUtils.html
@@ -19,7 +19,14 @@ <h3>[method:Number toHalfFloat]( [param:Number val] )</h3>
<p>
val -- A single precision floating point value.<br /><br />
- Retu... | diff --git a/test/unit/src/extras/DataUtils.tests.js b/test/unit/src/extras/DataUtils.tests.js
new file mode 100644
--- /dev/null
+++ b/test/unit/src/extras/DataUtils.tests.js
@@ -0,0 +1,37 @@
+/* global QUnit */
+
+import { DataUtils } from '../../../../src/extras/DataUtils.js';
+
+export default QUnit.module( 'Extras... | Feature request: Add `.fromHalfFloat()` to DataUtils.
`DataUtils` already has `.toHalfFloat( val )`.
`DataUtils.fromHalfFloat( half )` would be useful for evaluating the dynamic range of HDR textures in .exr format, for example.
| null | 2022-02-26 10:19:20+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi && npm i --prefix test && sed -i 's/failonlyreporter/tap/g' package.json test/pac... | ['348 Core > Object3D > copy', '512 Extras > Curves > SplineCurve > getPointAt', '342 Core > Object3D > traverse/traverseVisible/traverseAncestors', '885 Maths > Color > copy', '283 Core > InterleavedBuffer > copyAt', '894 Maths > Color > offsetHSL', '857 Maths > Box3 > expandByScalar', '1232 Maths > Vector2 > min/max/... | ['359 Extras > DataUtils > toHalfFloat', '360 Extras > DataUtils > fromHalfFloat'] | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test --exit | Feature | false | false | false | true | 2 | 1 | 3 | false | false | ["src/extras/DataUtils.js->program->class_declaration:DataUtils->method_definition:toHalfFloat", "src/extras/DataUtils.js->program->class_declaration:DataUtils", "src/extras/DataUtils.js->program->class_declaration:DataUtils->method_definition:fromHalfFloat"] |
mrdoob/three.js | 23,796 | mrdoob__three.js-23796 | ['23793'] | 1e0cdd9c6304dac238e9d6891652c1ce81f38580 | diff --git a/docs/api/en/math/Color.html b/docs/api/en/math/Color.html
--- a/docs/api/en/math/Color.html
+++ b/docs/api/en/math/Color.html
@@ -13,6 +13,10 @@ <h1>[name]</h1>
Class representing a color.
</p>
+ <p>
+ Iterating through a [name] instance will yield its components (r, g, b) in the corresponding or... | diff --git a/test/unit/src/math/Color.tests.js b/test/unit/src/math/Color.tests.js
--- a/test/unit/src/math/Color.tests.js
+++ b/test/unit/src/math/Color.tests.js
@@ -651,6 +651,16 @@ export default QUnit.module( 'Maths', () => {
} );
+ QUnit.test( 'iterable', ( assert ) => {
+
+ var c = new Color( 0.5, 0.75,... | RFC: Making Euler, Color, Quaternions iterable - and consequently spreadable - like Vector*
Vectors are iterable, so they can be spread to an array like `[...vector]`. The same isn't true for Euler, and users ** cough cough me right now ** might expect consistent behaviour.
I was surprised to see this missing, so I'... | `Color` is also missing an iterator.
@LeviPesin also Quaternion. Let me report all of those in the initial comment, it's a good idea | 2022-03-26 08:39:02+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi && npm i --prefix test && sed -i 's/failonlyreporter/tap/g' package.json test/pac... | ['348 Core > Object3D > copy', '512 Extras > Curves > SplineCurve > getPointAt', '342 Core > Object3D > traverse/traverseVisible/traverseAncestors', '885 Maths > Color > copy', '1034 Maths > Matrix4 > lookAt', '283 Core > InterleavedBuffer > copyAt', '894 Maths > Color > offsetHSL', '1312 Maths > Vector3 > setComponent... | ['951 Maths > Euler > iterable', '1111 Maths > Quaternion > iterable', '927 Maths > Color > iterable'] | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test --exit | Feature | false | false | false | true | 3 | 3 | 6 | false | false | ["src/math/Quaternion.js->program->class_declaration:Quaternion", "src/math/Quaternion.js->program->class_declaration:Quaternion->method_definition:[ Symbol.iterator ]", "src/math/Color.js->program->class_declaration:Color", "src/math/Euler.js->program->class_declaration:Euler->method_definition:[ Symbol.iterator ]", "... |
mrdoob/three.js | 24,461 | mrdoob__three.js-24461 | ['24441'] | 9e5512f067e3a0de8d4069217d20903c1725edf7 | diff --git a/src/math/Color.js b/src/math/Color.js
--- a/src/math/Color.js
+++ b/src/math/Color.js
@@ -222,12 +222,12 @@ class Color {
case 'hsl':
case 'hsla':
- if ( color = /^\s*(\d*\.?\d+)\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec( components ) ) {
+ if ( color = /^\s*(\d*\.?\d... | diff --git a/test/unit/src/math/Color.tests.js b/test/unit/src/math/Color.tests.js
--- a/test/unit/src/math/Color.tests.js
+++ b/test/unit/src/math/Color.tests.js
@@ -611,6 +611,30 @@ export default QUnit.module( 'Maths', () => {
} );
+ QUnit.test( 'setStyleHSLRedWithDecimals', ( assert ) => {
+
+ var c = new... | Color: Support HSL percentage values with decimals.
**Describe the bug**
Using decimal values for `saturation` or `lightness` in an HSL colors lead to `Unknown color` warning
**To Reproduce**
see live example
***Code***
```js
new THREE.Color('hsl(209, 95.0%, 90.1%)')
```
***Live example***
https:... | I have always thought percentage values for saturation and lightness are integers. If this is not exactly defined in the CSS spec, I vote to not change the current implementation.
If I’m reading the spec correctly, `percent` contains `number` which supports decimal values: https://www.w3.org/TR/css-values-4/#number-val... | 2022-08-07 08:05:56+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi && npm i --prefix test && sed -i 's/failonlyreporter/tap/g' package.json test/pac... | ['1026 Maths > Matrix4 > identity', '483 Extras > Curves > LineCurve3 > computeFrenetFrames', '957 Maths > Frustum > clone', '823 Maths > Box2 > copy', '81 Animation > KeyframeTrack > optimize', '1491 Renderers > WebGL > WebGLExtensions > has', '233 Core > BufferGeometry > setIndex/getIndex', '1159 Maths > Triangle > I... | ['923 Maths > Color > setStyleHSLRedWithDecimals', '924 Maths > Color > setStyleHSLARedWithDecimals'] | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test --exit | Bug Fix | false | true | false | false | 1 | 0 | 1 | true | false | ["src/math/Color.js->program->class_declaration:Color->method_definition:setStyle"] |
sveltejs/svelte | 556 | sveltejs__svelte-556 | ['540'] | c712ad502a07d653b6a5e9e1934bbfd576757c3d | diff --git a/src/generators/dom/visitors/IfBlock.js b/src/generators/dom/visitors/IfBlock.js
--- a/src/generators/dom/visitors/IfBlock.js
+++ b/src/generators/dom/visitors/IfBlock.js
@@ -5,6 +5,10 @@ function isElseIf ( node ) {
return node && node.children.length === 1 && node.children[0].type === 'IfBlock';
}
+f... | diff --git a/test/js/samples/if-block-no-update/expected.js b/test/js/samples/if-block-no-update/expected.js
--- a/test/js/samples/if-block-no-update/expected.js
+++ b/test/js/samples/if-block-no-update/expected.js
@@ -9,24 +9,24 @@ function create_main_fragment ( state, component ) {
}
var current_block = get_bl... | Remove unnecessary `current_block &&`
Very minor thing I noticed while working on #525 — if you have an `if` block (or a chain of if, elseif, elseif...) followed by an `else` block, then there's no need to check for the existence of `current_block`:
```diff
function get_block ( state ) {
if ( state.foo ) return ... | null | 2017-05-03 21:31:10+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['runtime shared helpers select-bind-array', 'parse binding', 'runtime shared helpers event-handler-each-deconflicted', 'ssr component', 'formats cjs generates a CommonJS module', 'ssr each-block-else', 'validate ondestroy-arrow-no-this', 'runtime inline helpers if-block-elseif-text', 'runtime inline helpers helpers', ... | ['js if-block-no-update'] | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Refactoring | false | true | false | false | 4 | 0 | 4 | false | false | ["src/generators/dom/visitors/IfBlock.js->program->function_declaration:compoundWithOutros", "src/generators/dom/visitors/IfBlock.js->program->function_declaration:compound", "src/generators/dom/visitors/IfBlock.js->program->function_declaration:isElseBranch", "src/generators/dom/visitors/IfBlock.js->program->function_... |
sveltejs/svelte | 560 | sveltejs__svelte-560 | ['546'] | c712ad502a07d653b6a5e9e1934bbfd576757c3d | diff --git a/src/generators/dom/visitors/Element/addTransitions.js b/src/generators/dom/visitors/Element/addTransitions.js
--- a/src/generators/dom/visitors/Element/addTransitions.js
+++ b/src/generators/dom/visitors/Element/addTransitions.js
@@ -40,7 +40,10 @@ export default function addTransitions ( generator, block,... | diff --git a/test/runtime/samples/transition-js-each-block-intro-outro/_config.js b/test/runtime/samples/transition-js-each-block-intro-outro/_config.js
new file mode 100644
--- /dev/null
+++ b/test/runtime/samples/transition-js-each-block-intro-outro/_config.js
@@ -0,0 +1,43 @@
+export default {
+ data: {
+ visible: ... | Outros aren't correctly aborted
State is getting corrupted in this example:

[REPL](https://svelte.technology/repl?version=1.18.2&gist=9dd404e533a3c2139aa328e3342b6a9d) (though it will just give... | null | 2017-05-04 02:16:51+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['runtime shared helpers select-bind-array', 'parse binding', 'runtime shared helpers event-handler-each-deconflicted', 'ssr component', 'formats cjs generates a CommonJS module', 'ssr each-block-else', 'validate ondestroy-arrow-no-this', 'runtime inline helpers if-block-elseif-text', 'runtime inline helpers helpers', ... | ['runtime shared helpers transition-js-each-block-intro-outro', 'runtime inline helpers transition-js-each-block-intro-outro'] | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Bug Fix | false | true | false | false | 2 | 0 | 2 | false | false | ["src/generators/dom/visitors/Element/addTransitions.js->program->function_declaration:addTransitions", "src/shared/transitions.js->program->function_declaration:wrapTransition"] |
sveltejs/svelte | 597 | sveltejs__svelte-597 | ['593', '593'] | 1e14a6265440611cad4fe371717003a5d4d5a092 | diff --git a/src/generators/dom/shared.ts b/src/generators/dom/shared.ts
--- a/src/generators/dom/shared.ts
+++ b/src/generators/dom/shared.ts
@@ -29,7 +29,7 @@ export default {
"linear": "function linear ( t ) {\n\treturn t;\n}",
"generateKeyframes": "function generateKeyframes ( a, b, delta, duration, ease, fn, n... | diff --git a/test/js/index.js b/test/js/index.js
--- a/test/js/index.js
+++ b/test/js/index.js
@@ -1,6 +1,7 @@
import assert from 'assert';
import * as fs from 'fs';
import * as path from 'path';
+import { rollup } from 'rollup';
import { svelte } from '../helpers.js';
describe( 'js', () => {
@@ -31,11 +32,31 @@... | Using Rollup with shared helpers always includes transitionManager
This is probably technically in Rollup's court, but if there's anything we can do here to make the bundler behave better, that would be nice to do.
If you import any of the helpers in `shared.js` and bundle with Rollup with default settings, the `tra... | Ah, curses. Rollup should be detecting and removing that. It might need to be written in a slightly different way.
Ideally Butternut would also detect and remove it, but the earlier it happens in the process the better.
Ah, curses. Rollup should be detecting and removing that. It might need to be written in a slight... | 2017-05-27 14:00:08+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['runtime shared helpers select-bind-array', 'parse binding', 'runtime shared helpers event-handler-each-deconflicted', 'ssr component', 'formats cjs generates a CommonJS module', 'ssr each-block-else', 'validate ondestroy-arrow-no-this', 'runtime inline helpers if-block-elseif-text', 'runtime inline helpers helpers', ... | ['js if-block-simple', 'js if-block-no-update', 'js onrender-onteardown-rewritten', 'js event-handlers-custom', 'js each-block-changed-check', 'js non-imported-component', 'js use-elements-as-anchors', 'js collapses-text-around-comments', 'js computed-collapsed-if'] | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Refactoring | true | false | false | false | 0 | 0 | 0 | false | false | [] |
sveltejs/svelte | 600 | sveltejs__svelte-600 | ['575'] | 4f56b6553c098c3b4852b797785472387703d6fc | diff --git a/src/generators/Generator.ts b/src/generators/Generator.ts
--- a/src/generators/Generator.ts
+++ b/src/generators/Generator.ts
@@ -117,11 +117,7 @@ export default class Generator {
const { name } = flattenReference( node );
if ( scope.has( name ) ) return;
- if ( parent && parent.type === ... | diff --git a/test/runtime/samples/helpers-not-call-expression/_config.js b/test/runtime/samples/helpers-not-call-expression/_config.js
new file mode 100644
--- /dev/null
+++ b/test/runtime/samples/helpers-not-call-expression/_config.js
@@ -0,0 +1,3 @@
+export default {
+ html: '<p>1,4,9</p>'
+};
diff --git a/test/runti... | Can't access easing functions from helpers
This...
```html
<div in:fly='{x: -200, easing: elasticOut}'>
wheee!!!!
</div>
<script>
import fly from 'svelte-transitions-fly';
import { elasticOut } from 'eases-jsnext';
export default {
helpers: { elasticOut },
transitions: { fly }
};
</s... | null | 2017-05-27 17:23:34+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['runtime shared helpers select-bind-array', 'parse binding', 'runtime shared helpers event-handler-each-deconflicted', 'ssr component', 'formats cjs generates a CommonJS module', 'ssr each-block-else', 'validate ondestroy-arrow-no-this', 'runtime inline helpers if-block-elseif-text', 'runtime inline helpers helpers', ... | ['validate helper-clash-context', 'runtime inline helpers helpers-not-call-expression', 'ssr helpers-not-call-expression', 'runtime shared helpers helpers-not-call-expression'] | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Bug Fix | false | true | false | false | 2 | 0 | 2 | false | false | ["src/generators/Generator.ts->program->class_declaration:Generator->method_definition:contextualise->method_definition:enter", "src/validate/html/index.ts->program->function_declaration:validateHtml->function_declaration:visit"] |
sveltejs/svelte | 733 | sveltejs__svelte-733 | ['375', '375'] | 71047c2961d037cfcabb5c7382fb4b75ea2625f9 | diff --git a/src/generators/dom/index.ts b/src/generators/dom/index.ts
--- a/src/generators/dom/index.ts
+++ b/src/generators/dom/index.ts
@@ -25,6 +25,8 @@ export class DomGenerator extends Generator {
hasOutroTransitions: boolean;
hasComplexBindings: boolean;
+ needsEncapsulateHelper: boolean;
+
constructor(
... | diff --git a/test/js/samples/collapses-text-around-comments/expected-bundle.js b/test/js/samples/collapses-text-around-comments/expected-bundle.js
--- a/test/js/samples/collapses-text-around-comments/expected-bundle.js
+++ b/test/js/samples/collapses-text-around-comments/expected-bundle.js
@@ -143,6 +143,10 @@ var temp... | Store CSS hashed attribute in a variable
A nice easy win — currently if you have a component with CSS, top-level elements get this treatment:
```js
setAttribute( div, 'svelte-3599223440', '' );
```
If there's more than one top-level element, it would make more sense to do this instead:
```js
var cssAttr = '... | 2017-07-29 23:10:58+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['runtime each-block-keyed-dynamic (inline helpers)', 'runtime transition-js-events (inline helpers)', 'parse binding', 'parse error-binding-rvalue', 'runtime component-binding-deep (shared helpers)', 'runtime default-data-function (shared helpers)', 'runtime svg-child-component-declared-namespace-shorthand (inline hel... | ['js collapses-text-around-comments', 'js css-media-query'] | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Refactoring | false | false | false | true | 3 | 1 | 4 | false | false | ["src/generators/dom/visitors/Element/Element.ts->program->function_declaration:visitElement", "src/generators/dom/index.ts->program->class_declaration:DomGenerator", "src/generators/dom/index.ts->program->class_declaration:DomGenerator->method_definition:constructor", "src/generators/dom/index.ts->program->function_de... | |
sveltejs/svelte | 778 | sveltejs__svelte-778 | ['773'] | cd1e8c12c1cac219b4f5659d3c0e494654bb431e | diff --git a/src/generators/dom/index.ts b/src/generators/dom/index.ts
--- a/src/generators/dom/index.ts
+++ b/src/generators/dom/index.ts
@@ -20,6 +20,7 @@ export class DomGenerator extends Generator {
metaBindings: string[];
hydratable: boolean;
+ legacy: boolean;
hasIntroTransitions: boolean;
hasOutroTra... | diff --git a/test/js/index.js b/test/js/index.js
--- a/test/js/index.js
+++ b/test/js/index.js
@@ -2,7 +2,7 @@ import assert from "assert";
import * as fs from "fs";
import * as path from "path";
import { rollup } from "rollup";
-import { svelte } from "../helpers.js";
+import { loadConfig, svelte } from "../helpers... | Potentially catch input type assignment for older browsers?
The new input types are great for progressive enhancement in HTML because if an old browser doesn't support them it just renders a `type="text"` input, which is perfect. Unfortunately, doing this doesn't work in svelte because (at least in IE9) the `input.type... | Gah, didn't realise that caused an error! I wonder if the best solution would be to have a `legacy` compile option that changed that code to this:
```js
try { input.type = 'search'; } catch (e) {}
// or
setInputType(input, 'search'); // where setInputType does the above
```
That would be perfect!
+1 for moving... | 2017-08-17 23:04:34+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['runtime each-block-keyed-dynamic (inline helpers)', 'runtime transition-js-events (inline helpers)', 'parse binding', 'parse error-binding-rvalue', 'runtime component-binding-deep (shared helpers)', 'runtime default-data-function (shared helpers)', 'runtime ignore-unchanged-attribute-compound (shared helpers)', 'form... | ['js legacy-input-type'] | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Feature | false | false | false | true | 4 | 1 | 5 | false | false | ["src/generators/dom/visitors/Element/Attribute.ts->program->function_declaration:visitAttribute", "src/generators/dom/index.ts->program->class_declaration:DomGenerator->method_definition:constructor", "src/generators/dom/index.ts->program->class_declaration:DomGenerator", "src/shared/dom.js->program->function_declarat... |
sveltejs/svelte | 785 | sveltejs__svelte-785 | ['784'] | c7dda9ff79f5588cce6e77edbb9ff243f2db43f5 | diff --git a/src/generators/dom/index.ts b/src/generators/dom/index.ts
--- a/src/generators/dom/index.ts
+++ b/src/generators/dom/index.ts
@@ -213,7 +213,7 @@ export default function dom(
${options.dev && `if ( options.hydrate ) throw new Error( 'options.hydrate only works if the component was compiled with the ... | diff --git a/test/js/samples/collapses-text-around-comments/expected-bundle.js b/test/js/samples/collapses-text-around-comments/expected-bundle.js
--- a/test/js/samples/collapses-text-around-comments/expected-bundle.js
+++ b/test/js/samples/collapses-text-around-comments/expected-bundle.js
@@ -237,7 +237,7 @@ function ... | Allow `anchor` to be passed in initial component instantiation
Hi, just started using svelte and I'm really liking it so far!
What do you think about allowing the initial config object to contain an `anchor` attribute so the component could be bootstrapped at a particular place in the dom?
In practice it would lo... | null | 2017-08-25 17:35:50+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['runtime each-block-keyed-dynamic (inline helpers)', 'runtime transition-js-events (inline helpers)', 'parse binding', 'parse error-binding-rvalue', 'runtime component-binding-deep (shared helpers)', 'runtime default-data-function (shared helpers)', 'runtime ignore-unchanged-attribute-compound (shared helpers)', 'form... | ['js setup-method', 'js legacy-input-type', 'js css-media-query', 'js if-block-simple', 'js if-block-no-update', 'js onrender-onteardown-rewritten', 'js event-handlers-custom', 'js each-block-changed-check', 'js non-imported-component', 'js use-elements-as-anchors', 'js collapses-text-around-comments', 'js computed-col... | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Feature | false | true | false | false | 1 | 0 | 1 | true | false | ["src/generators/dom/index.ts->program->function_declaration:dom"] |
sveltejs/svelte | 814 | sveltejs__svelte-814 | ['645'] | 2c8268bf1cb6e48d095c0475356612ed6561169b | diff --git a/src/generators/dom/visitors/Element/Binding.ts b/src/generators/dom/visitors/Element/Binding.ts
--- a/src/generators/dom/visitors/Element/Binding.ts
+++ b/src/generators/dom/visitors/Element/Binding.ts
@@ -51,10 +51,13 @@ export default function visitBinding(
let setter = getSetter(block, name, snippet... | diff --git a/test/js/samples/input-without-blowback-guard/expected-bundle.js b/test/js/samples/input-without-blowback-guard/expected-bundle.js
new file mode 100644
--- /dev/null
+++ b/test/js/samples/input-without-blowback-guard/expected-bundle.js
@@ -0,0 +1,237 @@
+function noop() {}
+
+function assign(target) {
+ var... | Redundant input blowback guard?
First of a couple of random thoughts I just had:
If you have a template like [this](https://svelte.technology/repl?version=1.22.4&gist=814af8163ea6d4d7be709b7e55040d84)...
```html
<input bind:value>
```
...Svelte generates code like this:
```js
function input_input_handler... | null | 2017-09-03 16:46:51+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['ssr component-slot-default', 'runtime each-block-keyed-dynamic (inline helpers)', 'runtime transition-js-events (inline helpers)', 'parse binding', 'parse error-binding-rvalue', 'runtime raw-anchor-previous-sibling (inline helpers)', 'runtime component-binding-deep (shared helpers)', 'runtime default-data-function (s... | ['js input-without-blowback-guard'] | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Refactoring | false | true | false | false | 1 | 0 | 1 | true | false | ["src/generators/dom/visitors/Element/Binding.ts->program->function_declaration:visitBinding"] |
sveltejs/svelte | 921 | sveltejs__svelte-921 | ['917'] | be0837e48011fc73e5a4b0d26a9a11cf8a9d41f4 | diff --git a/src/shared/index.js b/src/shared/index.js
--- a/src/shared/index.js
+++ b/src/shared/index.js
@@ -156,9 +156,12 @@ export function _set(newState) {
this._state = assign({}, oldState, newState);
this._recompute(changed, this._state);
if (this._bind) this._bind(changed, this._state);
- dispatchObserver... | diff --git a/test/js/samples/collapses-text-around-comments/expected-bundle.js b/test/js/samples/collapses-text-around-comments/expected-bundle.js
--- a/test/js/samples/collapses-text-around-comments/expected-bundle.js
+++ b/test/js/samples/collapses-text-around-comments/expected-bundle.js
@@ -157,9 +157,12 @@ function... | TypeError: this._fragment is null
```html
<!-- App.html -->
{{#if show}}
<Nested bind:show/>
{{else}}
<button on:click="set({show:true})">Show it</button>
{{/if}}
<script>
import Nested from './Nested.html';
export default {
components: {
Nested
}
};
</script>
```
```html
<!--... | null | 2017-11-12 20:55:47+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['ssr component-slot-default', 'runtime each-block-keyed-dynamic (inline helpers)', 'runtime transition-js-events (inline helpers)', 'parse binding', 'parse error-binding-rvalue', 'validate a11y-no-autofocus', 'runtime raw-anchor-previous-sibling (inline helpers)', 'runtime component-binding-deep (shared helpers)', 'ru... | ['js inline-style-optimized-multiple', 'js event-handlers-custom', 'js inline-style-optimized-url', 'js setup-method', 'js legacy-input-type', 'js css-media-query', 'js use-elements-as-anchors', 'js collapses-text-around-comments', 'js input-without-blowback-guard', 'js component-static', 'js if-block-simple', 'js onre... | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Bug Fix | false | true | false | false | 1 | 0 | 1 | true | false | ["src/shared/index.js->program->function_declaration:_set"] |
sveltejs/svelte | 929 | sveltejs__svelte-929 | ['858'] | be0837e48011fc73e5a4b0d26a9a11cf8a9d41f4 | diff --git a/src/generators/dom/visitors/Element/Attribute.ts b/src/generators/dom/visitors/Element/Attribute.ts
--- a/src/generators/dom/visitors/Element/Attribute.ts
+++ b/src/generators/dom/visitors/Element/Attribute.ts
@@ -3,7 +3,6 @@ import deindent from '../../../../utils/deindent';
import visitStyleAttribute, {... | diff --git a/test/js/samples/do-use-dataset/expected-bundle.js b/test/js/samples/do-use-dataset/expected-bundle.js
new file mode 100644
--- /dev/null
+++ b/test/js/samples/do-use-dataset/expected-bundle.js
@@ -0,0 +1,236 @@
+function noop() {}
+
+function assign(target) {
+ var k,
+ source,
+ i = 1,
+ len = argument... | Use el.dataset.foo = bar instead of setAttribute(el, 'data-foo', bar)
[REPL](https://svelte.technology/repl?version=1.39.3&gist=c9f289fc5bd3af71d2137b3a8315b320). `dataset` is supported in all current browsers — we should probably generate this code...
```js
div.dataset.foo = "bar";
```
...instead of this...
... | null | 2017-11-16 09:42:30+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['ssr component-slot-default', 'runtime each-block-keyed-dynamic (inline helpers)', 'runtime transition-js-events (inline helpers)', 'parse binding', 'parse error-binding-rvalue', 'validate a11y-no-autofocus', 'runtime raw-anchor-previous-sibling (inline helpers)', 'runtime component-binding-deep (shared helpers)', 'ru... | ['js do-use-dataset'] | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Refactoring | false | true | false | false | 1 | 0 | 1 | true | false | ["src/generators/dom/visitors/Element/Attribute.ts->program->function_declaration:visitAttribute"] |
sveltejs/svelte | 1,148 | sveltejs__svelte-1148 | ['1143'] | 56e9343294d4a83806ab4640c6f4df968a258353 | diff --git a/src/generators/nodes/Attribute.ts b/src/generators/nodes/Attribute.ts
--- a/src/generators/nodes/Attribute.ts
+++ b/src/generators/nodes/Attribute.ts
@@ -540,6 +540,7 @@ const attributeLookup = {
'textarea',
],
},
+ volume: { appliesTo: ['audio', 'video'] },
width: {
appliesTo: ['canvas', 'em... | diff --git a/test/js/samples/media-bindings/expected-bundle.js b/test/js/samples/media-bindings/expected-bundle.js
--- a/test/js/samples/media-bindings/expected-bundle.js
+++ b/test/js/samples/media-bindings/expected-bundle.js
@@ -226,6 +226,12 @@ function create_main_fragment(state, component) {
component.set({ buf... | HTML <audio> volume attribute
I know that `volume` is not one of the documented bind properties for `<audio>`, but I'm surprised that setting the attribute doesn't work at all. This can be worked around with refs, but it would be handy if svelte did that for us when changing `volume`.
```html
<audio src="{{src}}" v... | Volume attributes currently compile the same way any regular attribute does:
```javascript
setAttribute(audio, "volume", state.volume);
```
Is there some corresponding property that needs to be used instead, that was missed [here](https://github.com/sveltejs/svelte/blob/56e9343294d4a83806ab4640c6f4df968a258353/... | 2018-02-03 17:33:43+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['runtime each-block-random-permute (shared helpers , hydration)', 'runtime default-data-function (shared helpers)', 'runtime svg-child-component-declared-namespace-shorthand (inline helpers)', 'ssr each-block-else', 'runtime refs-unset (shared helpers , hydration)', 'validate ondestroy-arrow-no-this', 'ssr binding-inp... | ['js media-bindings'] | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Feature | false | true | false | false | 3 | 0 | 3 | false | false | ["src/generators/nodes/Binding.ts->program->function_declaration:isComputed", "src/validate/html/validateElement.ts->program->function_declaration:validateElement", "src/generators/nodes/Binding.ts->program->class_declaration:Binding->method_definition:munge"] |
sveltejs/svelte | 1,210 | sveltejs__svelte-1210 | ['1201', '1201'] | 18d3313838bb744017f18a60d28046c2af645ac8 | diff --git a/src/generators/dom/index.ts b/src/generators/dom/index.ts
--- a/src/generators/dom/index.ts
+++ b/src/generators/dom/index.ts
@@ -267,7 +267,7 @@ export default function dom(
this._fragment.c();
this._fragment.${block.hasIntroMethod ? 'i' : 'm'}(this.shadowRoot, null);
- if (options.target) thi... | diff --git a/test/js/samples/collapses-text-around-comments/expected-bundle.js b/test/js/samples/collapses-text-around-comments/expected-bundle.js
--- a/test/js/samples/collapses-text-around-comments/expected-bundle.js
+++ b/test/js/samples/collapses-text-around-comments/expected-bundle.js
@@ -171,7 +171,7 @@ function ... | always use `_mount`, even if top-level
Using `this._mount(target, anchor)` instead of `this._fragment.m(target, anchor)` would fix https://github.com/sveltejs/svelte-loader/issues/43. Using a private `_mount` method like this is arguably a bit of a hack, and we could discuss whether we need to make it a public method f... | 2018-03-06 17:31:01+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['runtime each-block-random-permute (shared helpers , hydration)', 'runtime default-data-function (shared helpers)', 'runtime svg-child-component-declared-namespace-shorthand (inline helpers)', 'ssr each-block-else', 'runtime refs-unset (shared helpers , hydration)', 'validate ondestroy-arrow-no-this', 'ssr binding-inp... | ['js window-binding-scroll', 'runtime transition-js-nested-intro (shared helpers , hydration)', 'js inline-style-optimized-multiple', 'js legacy-default', 'js event-handlers-custom', 'js inline-style-optimized-url', 'js setup-method', 'js legacy-input-type', 'js css-media-query', 'runtime transition-js-nested-intro (in... | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Refactoring | false | true | false | false | 2 | 0 | 2 | false | false | ["src/shared/index.js->program->function_declaration:_mount", "src/generators/dom/index.ts->program->function_declaration:dom"] | |
sveltejs/svelte | 1,258 | sveltejs__svelte-1258 | ['1254', '1254'] | 35a7fc6d3280cb628605343d1edc777b00ad9b1e | diff --git a/src/generators/nodes/EachBlock.ts b/src/generators/nodes/EachBlock.ts
--- a/src/generators/nodes/EachBlock.ts
+++ b/src/generators/nodes/EachBlock.ts
@@ -54,9 +54,11 @@ export default class EachBlock extends Node {
this.block.contextTypes.set(this.context, 'each');
this.block.indexNames.set(this.cont... | diff --git a/test/helpers.js b/test/helpers.js
--- a/test/helpers.js
+++ b/test/helpers.js
@@ -174,7 +174,7 @@ function capitalise(str) {
return str[0].toUpperCase() + str.slice(1);
}
-export function showOutput(cwd, options = {}, s = svelte) {
+export function showOutput(cwd, options = {}, compile = svelte.compil... | Element name can conflict with local context var
[REPL](https://svelte.technology/repl?version=1.57.4&gist=67af4efd3216f0ddadf3c66e8b7c5e05) — the `i` in `{{#each tagList as tag, i}}` conflicts with the `<i>` element
Element name can conflict with local context var
[REPL](https://svelte.technology/repl?version=1.57.4&g... | 2018-03-18 23:49:37+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['runtime each-block-random-permute (shared helpers , hydration)', 'runtime default-data-function (shared helpers)', 'runtime svg-child-component-declared-namespace-shorthand (inline helpers)', 'ssr each-block-else', 'runtime refs-unset (shared helpers , hydration)', 'validate ondestroy-arrow-no-this', 'ssr binding-inp... | ['runtime deconflict-elements-indexes (shared helpers)', 'runtime deconflict-elements-indexes (inline helpers)', 'runtime deconflict-elements-indexes (shared helpers , hydration)'] | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Bug Fix | false | true | false | false | 1 | 0 | 1 | true | false | ["src/generators/nodes/EachBlock.ts->program->class_declaration:EachBlock->method_definition:init"] | |
sveltejs/svelte | 1,298 | sveltejs__svelte-1298 | ['795'] | ae25641f8b5c3deb393b4aed5eba26e4f8b52f3a | diff --git a/src/css/Stylesheet.ts b/src/css/Stylesheet.ts
--- a/src/css/Stylesheet.ts
+++ b/src/css/Stylesheet.ts
@@ -375,7 +375,7 @@ export default class Stylesheet {
render(cssOutputFilename: string, shouldTransformSelectors: boolean) {
if (!this.hasStyles) {
- return { css: null, cssMap: null };
+ return... | diff --git a/test/css/index.js b/test/css/index.js
--- a/test/css/index.js
+++ b/test/css/index.js
@@ -81,7 +81,7 @@ describe('css', () => {
checkCodeIsValid(dom.code);
checkCodeIsValid(ssr.code);
- assert.equal(dom.css, ssr.css);
+ assert.equal(dom.css.toString(), ssr.css.toString());
assert.deepEq... | const { js, css } = svelte.compile(...)
This is a relatively minor aesthetic thing, but the current API doesn't treat CSS as a first-class citizen. Rather than this...
```js
const { code, map, css, cssMap, ast } = svelte.compile(...);
```
...I think we should have this:
```js
const { js, css, ast } = svelte... | Then again v2 will change the return value to a Promise, so perhaps it makes sense to wait until then. | 2018-04-01 15:18:11+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['runtime each-block-random-permute (shared helpers , hydration)', 'runtime default-data-function (shared helpers)', 'runtime svg-child-component-declared-namespace-shorthand (inline helpers)', 'ssr each-block-else', 'runtime refs-unset (shared helpers , hydration)', 'validate ondestroy-arrow-no-this', 'ssr binding-inp... | ['sourcemaps basic', 'sourcemaps binding', 'sourcemaps static-no-script', 'sourcemaps each-block', 'sourcemaps css-cascade-false', 'sourcemaps script', 'sourcemaps binding-shorthand', 'sourcemaps css'] | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Refactoring | false | true | false | false | 4 | 0 | 4 | false | false | ["src/css/Stylesheet.ts->program->class_declaration:Stylesheet->method_definition:render", "src/generators/Generator.ts->program->class_declaration:Generator->method_definition:generate", "src/generators/server-side-rendering/index.ts->program->function_declaration:ssr", "src/generators/dom/index.ts->program->function_... |
sveltejs/svelte | 1,310 | sveltejs__svelte-1310 | ['1300'] | b4ade9d4b2e32657bbc95b4cdbfcd2322a8bdbef | diff --git a/src/css/Selector.ts b/src/css/Selector.ts
--- a/src/css/Selector.ts
+++ b/src/css/Selector.ts
@@ -223,6 +223,9 @@ const operators = {
};
function attributeMatches(node: Node, name: string, expectedValue: string, operator: string, caseInsensitive: boolean) {
+ const spread = node.attributes.find(attr =>... | diff --git a/test/css/samples/spread/_config.js b/test/css/samples/spread/_config.js
new file mode 100644
--- /dev/null
+++ b/test/css/samples/spread/_config.js
@@ -0,0 +1,3 @@
+export default {
+ cascade: false
+};
\ No newline at end of file
diff --git a/test/css/samples/spread/expected.css b/test/css/samples/spread/... | Spread properties cause CSS to be DCE'd incorrectly
[REPL](https://svelte.technology/repl?version=1.60.0&gist=678853cb781d28931abbc159c22d2d7f)
```html
<div {{...props}} >
Big red Comic Sans
</div>
<style>
.foo {
color: red;
font-size: 2em;
font-family: 'Comic Sans MS';
}
</style>
```
`.foo`... | null | 2018-04-04 10:47:16+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['runtime each-block-random-permute (shared helpers , hydration)', 'runtime default-data-function (shared helpers)', 'runtime svg-child-component-declared-namespace-shorthand (inline helpers)', 'ssr each-block-else', 'runtime refs-unset (shared helpers , hydration)', 'validate ondestroy-arrow-no-this', 'ssr binding-inp... | ['css spread'] | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Bug Fix | false | true | false | false | 1 | 0 | 1 | true | false | ["src/css/Selector.ts->program->function_declaration:attributeMatches"] |
sveltejs/svelte | 1,378 | sveltejs__svelte-1378 | ['1286'] | ed605bfa790f5989bca5241adddcb30367a8c70b | diff --git a/src/compile/nodes/EachBlock.ts b/src/compile/nodes/EachBlock.ts
--- a/src/compile/nodes/EachBlock.ts
+++ b/src/compile/nodes/EachBlock.ts
@@ -443,9 +443,9 @@ export default class EachBlock extends Node {
`;
block.builders.update.addBlock(deindent`
- var ${each_block_value} = ${snippet};
-
... | diff --git a/test/js/samples/deconflict-builtins/expected-bundle.js b/test/js/samples/deconflict-builtins/expected-bundle.js
--- a/test/js/samples/deconflict-builtins/expected-bundle.js
+++ b/test/js/samples/deconflict-builtins/expected-bundle.js
@@ -186,9 +186,9 @@ function create_main_fragment(component, ctx) {
},... | Only recalculate each_value if necessary
Svelte knows that it doesn't need to update each blocks whose dependencies haven't changed. But it isn't smart not to recalculate `each_value`. In [this example](https://svelte.technology/repl?version=1.58.4&gist=04aeba5150c7e3aaa4c7066d61d3c1e6)...
```html
{{#each Object.en... | null | 2018-04-29 03:51:25+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['runtime default-data-function (shared helpers)', 'runtime svg-child-component-declared-namespace-shorthand (inline helpers)', 'ssr each-block-else', 'validate ondestroy-arrow-no-this', 'runtime component-yield-multiple-in-each (shared helpers, hydration)', 'ssr binding-input-checkbox-group-outside-each', 'ssr compone... | ['js each-block-changed-check', 'js deconflict-builtins'] | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Refactoring | false | true | false | false | 1 | 0 | 1 | true | false | ["src/compile/nodes/EachBlock.ts->program->class_declaration:EachBlock->method_definition:buildUnkeyed"] |
sveltejs/svelte | 1,384 | sveltejs__svelte-1384 | ['1287'] | 2c3f846623bee52be6d209931a34fa7a8045a856 | diff --git a/src/compile/nodes/EachBlock.ts b/src/compile/nodes/EachBlock.ts
--- a/src/compile/nodes/EachBlock.ts
+++ b/src/compile/nodes/EachBlock.ts
@@ -66,7 +66,7 @@ export default class EachBlock extends Node {
this.var = block.getUniqueName(`each`);
this.iterations = block.getUniqueName(`${this.var}_blocks... | diff --git a/test/js/samples/deconflict-builtins/expected-bundle.js b/test/js/samples/deconflict-builtins/expected-bundle.js
--- a/test/js/samples/deconflict-builtins/expected-bundle.js
+++ b/test/js/samples/deconflict-builtins/expected-bundle.js
@@ -161,11 +161,7 @@ function create_main_fragment(component, ctx) {
va... | Deduplicate each_context generation
```diff
function create_main_fragment(component, state) {
var each_anchor;
var each_value = state.Object.entries(state.things);
+
+ function get_each_context(state, each_value, i) {
+ return assign(assign({}, state), {
+ each_value: each_value,
+ key_value... | null | 2018-04-29 18:42:14+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['runtime default-data-function (shared helpers)', 'runtime svg-child-component-declared-namespace-shorthand (inline helpers)', 'ssr each-block-else', 'validate ondestroy-arrow-no-this', 'runtime component-yield-multiple-in-each (shared helpers, hydration)', 'ssr binding-input-checkbox-group-outside-each', 'runtime com... | ['js each-block-changed-check', 'js deconflict-builtins'] | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Refactoring | false | true | false | false | 5 | 0 | 5 | false | false | ["src/compile/nodes/EachBlock.ts->program->class_declaration:EachBlock->method_definition:buildKeyed", "src/compile/nodes/EachBlock.ts->program->class_declaration:EachBlock->method_definition:build", "src/shared/keyed-each.js->program->function_declaration:updateKeyedEach", "src/compile/nodes/EachBlock.ts->program->cla... |
sveltejs/svelte | 1,423 | sveltejs__svelte-1423 | ['1419'] | dc8b0d6be148ec636ebf9e98947b67740876d5d5 | diff --git a/src/compile/nodes/Element.ts b/src/compile/nodes/Element.ts
--- a/src/compile/nodes/Element.ts
+++ b/src/compile/nodes/Element.ts
@@ -988,13 +988,18 @@ const events = [
eventNames: ['input'],
filter: (node: Element, name: string) =>
node.name === 'textarea' ||
- node.name === 'input' && !/radio... | diff --git a/test/js/samples/input-range/expected-bundle.js b/test/js/samples/input-range/expected-bundle.js
new file mode 100644
--- /dev/null
+++ b/test/js/samples/input-range/expected-bundle.js
@@ -0,0 +1,198 @@
+function noop() {}
+
+function assign(tar, src) {
+ for (var k in src) tar[k] = src[k];
+ return tar;
+}... | <input type=range bind:value> duplicates handlers unnecessarily
With [this markup](https://svelte.technology/repl?version=2.4.4&gist=cdf74219bd9a8a06d6af6a9d9cf9d888)...
```html
<input type=range bind:value>
```
...Svelte could generate leaner code:
```diff
function create_main_fragment(component, ctx) {
... | null | 2018-05-06 00:13:25+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['runtime default-data-function (shared helpers)', 'runtime svg-child-component-declared-namespace-shorthand (inline helpers)', 'ssr each-block-else', 'validate ondestroy-arrow-no-this', 'runtime component-yield-multiple-in-each (shared helpers, hydration)', 'ssr binding-input-checkbox-group-outside-each', 'runtime com... | ['js input-range'] | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Refactoring | true | false | false | false | 0 | 0 | 0 | false | false | [] |
sveltejs/svelte | 1,811 | sveltejs__svelte-1811 | ['1807'] | c29dc42e2ede0ff2b23435b9fb8c577ea02306ce | diff --git a/src/compile/render-dom/index.ts b/src/compile/render-dom/index.ts
--- a/src/compile/render-dom/index.ts
+++ b/src/compile/render-dom/index.ts
@@ -146,9 +146,18 @@ export default function dom(
const hasInitHooks = !!(templateProperties.oncreate || templateProperties.onstate || templateProperties.onupdate)... | diff --git a/test/cli/samples/dev/expected/Main.js b/test/cli/samples/dev/expected/Main.js
--- a/test/cli/samples/dev/expected/Main.js
+++ b/test/cli/samples/dev/expected/Main.js
@@ -28,7 +28,10 @@ function create_main_fragment(component, ctx) {
function Main(options) {
this._debugName = '<Main>';
- if (!options |... | In dev mode, provide better error than 'cannot read property _init of null'
If a component references a store `$property`, it will try to subscribe to the store. If there is no store, it will result in a weird error. The error could be much friendlier, at least in dev mode
| null | 2018-10-27 18:34:10+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['cli dir-subdir', 'css combinator-child', 'create should return undefined when source is invalid ', 'cli dir', 'css attribute-selector-only-name', 'css css-vars', 'css empty-rule', 'cli amd', 'cli sourcemap', 'create should return a component constructor', 'cli dir-sourcemap', 'css empty-class', 'css attribute-selecto... | ['cli dev'] | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Feature | false | true | false | false | 2 | 0 | 2 | false | false | ["src/compile/render-ssr/index.ts->program->function_declaration:ssr", "src/compile/render-dom/index.ts->program->function_declaration:dom"] |
sveltejs/svelte | 1,899 | sveltejs__svelte-1899 | ['1897'] | 29052aba7d0b78316d3a52aef1d7ddd54fe6ca84 | diff --git a/src/compile/nodes/shared/Expression.ts b/src/compile/nodes/shared/Expression.ts
--- a/src/compile/nodes/shared/Expression.ts
+++ b/src/compile/nodes/shared/Expression.ts
@@ -261,7 +261,7 @@ export default class Expression {
if (dirty.length) component.has_reactive_assignments = true;
- co... | diff --git a/test/js/samples/action-custom-event-handler/expected.js b/test/js/samples/action-custom-event-handler/expected.js
--- a/test/js/samples/action-custom-event-handler/expected.js
+++ b/test/js/samples/action-custom-event-handler/expected.js
@@ -43,32 +43,32 @@ function foo(node, callback) {
// code goes her... | Better invalidation
This can be improved:
```js
function define($$self, $$props, $$make_dirty) {
let { name } = $$props;
function input_input_handler() {
name = this.value;
$$make_dirty('name');
}
$$self.$$.get = () => ({ name, input_input_handler });
$$self.$$.set = $$props => {
... | null | 2018-12-22 23:34:58+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['runtime if-block-else ', 'runtime immutable-nested ', 'ssr each-block-else', 'runtime whitespace-normal (with hydration)', 'runtime transition-js-each-block-outro (with hydration)', 'runtime attribute-dynamic-quotemarks ', 'ssr class-shortcut-with-class', 'ssr binding-input-checkbox-group-outside-each', 'runtime comp... | ['js window-binding-scroll', 'js inline-style-optimized-multiple', 'js instrumentation-template-if-no-block', 'js inline-style-optimized-url', 'js setup-method', 'js legacy-input-type', 'js css-media-query', 'js input-range', 'js instrumentation-script-x-equals-x', 'js title', 'js dynamic-import', 'js use-elements-as-a... | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Refactoring | false | true | false | false | 15 | 0 | 15 | false | false | ["src/internal/scheduler.js->program->function_declaration:flush", "src/compile/render-dom/index.ts->program->function_declaration:dom", "src/internal/scheduler.js->program->function_declaration:update", "src/compile/render-dom/wrappers/Element/index.ts->program->class_declaration:ElementWrapper->method_definition:addB... |
sveltejs/svelte | 1,962 | sveltejs__svelte-1962 | ['1960', '1960'] | dcad65b118d932a10081ab74b89adf472437b600 | diff --git a/src/parse/state/tag.ts b/src/parse/state/tag.ts
--- a/src/parse/state/tag.ts
+++ b/src/parse/state/tag.ts
@@ -379,7 +379,7 @@ function readAttribute(parser: Parser, uniqueNames: Set<string>) {
parser.allowWhitespace();
const colon_index = name.indexOf(':');
- const type = colon_index !== 1 && get_dir... | diff --git a/test/runtime/samples/prop-not-action/Nested.html b/test/runtime/samples/prop-not-action/Nested.html
new file mode 100644
--- /dev/null
+++ b/test/runtime/samples/prop-not-action/Nested.html
@@ -0,0 +1 @@
+<h1>Hello {user.name}!</h1>
\ No newline at end of file
diff --git a/test/runtime/samples/prop-not-act... | Props starting with "use" are interpreted as action
When using a prop called user (`<Nested user={currentUser}/>`)
it throws `Actions can only be applied to DOM elements, not components`.
Props starting with "use" are interpreted as action
When using a prop called user (`<Nested user={currentUser}/>`)
it throws `Acti... | 2019-01-04 19:04:13+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['runtime prop-without-semicolon ', 'runtime if-block-else ', 'runtime immutable-nested ', 'ssr each-block-else', 'runtime transition-js-each-block-outro (with hydration)', 'runtime whitespace-normal (with hydration)', 'runtime attribute-dynamic-quotemarks ', 'ssr class-shortcut-with-class', 'ssr binding-input-checkbox... | ['runtime prop-not-action ', 'ssr prop-not-action', 'runtime prop-not-action (with hydration)'] | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Bug Fix | false | true | false | false | 1 | 0 | 1 | true | false | ["src/parse/state/tag.ts->program->function_declaration:readAttribute"] | |
sveltejs/svelte | 1,991 | sveltejs__svelte-1991 | ['1952'] | 4d262c4d969a2e6a08e388b523b81af8063aa1d5 | diff --git a/src/compile/Component.ts b/src/compile/Component.ts
--- a/src/compile/Component.ts
+++ b/src/compile/Component.ts
@@ -750,18 +750,18 @@ export default class Component {
}
hoist_instance_declarations() {
- // we can safely hoist `const` declarations that are
+ // we can safely hoist variable declara... | diff --git a/test/js/samples/hoisted-let/expected.js b/test/js/samples/hoisted-let/expected.js
new file mode 100644
--- /dev/null
+++ b/test/js/samples/hoisted-let/expected.js
@@ -0,0 +1,41 @@
+/* generated by Svelte vX.Y.Z */
+import { SvelteComponent as SvelteComponent_1, append, createElement, createText, detachNode... | Track which variables need to be reactive
[REPL](https://v3.svelte.technology/repl?version=3.0.0-alpha16&gist=3a9377863be9b866a1942cdce08a75bf). We're not taking full advantage of the information available to us. This code...
```html
<script>
let name = 'world';
</script>
<h1>Hello {name}!</h1>
```
...sh... | Playing around, I extended `TemplateScope` to start tracking which names are mutated, which allows code that sets up an update to check its deps for known mutation before doing so. The first pass is quite rough, and there are a fair number of test failures. The thing that jumped out most for me though, were the compone... | 2019-01-19 02:42:03+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['runtime prop-without-semicolon ', 'runtime if-block-else ', 'runtime immutable-nested ', 'ssr each-block-else', 'runtime transition-js-each-block-outro (with hydration)', 'runtime whitespace-normal (with hydration)', 'runtime attribute-dynamic-quotemarks ', 'ssr class-shortcut-with-class', 'ssr binding-input-checkbox... | ['js hoisted-let', 'js non-mutable-reference', 'js instrumentation-template-if-no-block'] | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Refactoring | false | true | false | false | 1 | 0 | 1 | true | false | ["src/compile/Component.ts->program->class_declaration:Component->method_definition:hoist_instance_declarations"] |
sveltejs/svelte | 2,092 | sveltejs__svelte-2092 | ['2042'] | fa1322b00b1e1ba815ea18406283abefa270b334 | diff --git a/src/compile/nodes/shared/Node.ts b/src/compile/nodes/shared/Node.ts
--- a/src/compile/nodes/shared/Node.ts
+++ b/src/compile/nodes/shared/Node.ts
@@ -49,7 +49,6 @@ export default class Node {
}
warnIfEmptyBlock() {
- if (!this.component.compileOptions.dev) return;
if (!/Block$/.test(this.type) ||... | diff --git a/test/validator/samples/empty-block-dev/_config.js b/test/validator/samples/empty-block-dev/_config.js
deleted file mode 100644
--- a/test/validator/samples/empty-block-dev/_config.js
+++ /dev/null
@@ -1,3 +0,0 @@
-export default {
- dev: true
-};
\ No newline at end of file
diff --git a/test/validator/samp... | Proposal: `dev: true` only affects runtime warnings and errors
Right now, compiling with `dev: true` causes the compiler to emit a bunch of code to display additional runtime warnings and errors, to assist with debugging - and it also enables a compile-time warning for empty blocks. As far as I can tell, the empty bloc... | null | 2019-02-17 17:36:20+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['runtime prop-without-semicolon ', 'runtime if-block-else ', 'validate prop-slot', 'runtime immutable-nested ', 'ssr each-block-else', 'runtime transition-js-each-block-outro (with hydration)', 'runtime whitespace-normal (with hydration)', 'runtime attribute-dynamic-quotemarks ', 'ssr class-shortcut-with-class', 'ssr ... | ['validate empty-block'] | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Refactoring | false | true | false | false | 1 | 0 | 1 | true | false | ["src/compile/nodes/shared/Node.ts->program->class_declaration:Node->method_definition:warnIfEmptyBlock"] |
sveltejs/svelte | 2,093 | sveltejs__svelte-2093 | ['2042'] | fa1322b00b1e1ba815ea18406283abefa270b334 | diff --git a/src/Stats.ts b/src/Stats.ts
--- a/src/Stats.ts
+++ b/src/Stats.ts
@@ -26,8 +26,6 @@ function collapseTimings(timings) {
}
export default class Stats {
- onwarn: (warning: Warning) => void;
-
startTime: number;
currentTiming: Timing;
currentChildren: Timing[];
@@ -35,15 +33,11 @@ export default cl... | diff --git a/test/css/index.js b/test/css/index.js
--- a/test/css/index.js
+++ b/test/css/index.js
@@ -2,7 +2,7 @@ import * as assert from 'assert';
import * as fs from 'fs';
import { env, normalizeHtml, svelte } from '../helpers.js';
-function tryRequire(file) {
+function try_require(file) {
try {
const mod =... | Proposal: `dev: true` only affects runtime warnings and errors
Right now, compiling with `dev: true` causes the compiler to emit a bunch of code to display additional runtime warnings and errors, to assist with debugging - and it also enables a compile-time warning for empty blocks. As far as I can tell, the empty bloc... | null | 2019-02-17 17:43:56+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['runtime prop-without-semicolon ', 'runtime if-block-else ', 'validate prop-slot', 'runtime immutable-nested ', 'ssr each-block-else', 'runtime transition-js-each-block-outro (with hydration)', 'runtime whitespace-normal (with hydration)', 'runtime attribute-dynamic-quotemarks ', 'ssr class-shortcut-with-class', 'ssr ... | ['validate empty-block'] | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Refactoring | false | false | false | true | 4 | 1 | 5 | false | false | ["src/Stats.ts->program->class_declaration:Stats->method_definition:warn", "src/compile/index.ts->program->function_declaration:compile", "src/Stats.ts->program->class_declaration:Stats->method_definition:constructor", "src/compile/nodes/shared/Node.ts->program->class_declaration:Node->method_definition:warnIfEmptyBloc... |
sveltejs/svelte | 2,187 | sveltejs__svelte-2187 | ['2186'] | f2a48145a86f91f7e3ad9314e5368d0d2d964ee1 | diff --git a/src/compile/Component.ts b/src/compile/Component.ts
--- a/src/compile/Component.ts
+++ b/src/compile/Component.ts
@@ -26,9 +26,6 @@ type ComponentOptions = {
namespace?: string;
tag?: string;
immutable?: boolean;
- props?: string;
- props_object?: string;
- props_node?: Node;
};
// We need to tel... | diff --git a/test/runtime/samples/props-excludes-external/RenderProps.svelte b/test/runtime/samples/props-excludes-external/RenderProps.svelte
deleted file mode 100644
--- a/test/runtime/samples/props-excludes-external/RenderProps.svelte
+++ /dev/null
@@ -1,7 +0,0 @@
-<svelte:options bind:props/>
-
-<script>
- let prop... | Replace `<svelte:options bind:props>` with $$props
Very occasionally you need to access all the props that were passed into the component. At the moment that's done like so:
```html
<script>
let allProps;
$: console.log(allProps);
</script>
<svelte:options bind:props={allProps}/>
<h1>Hello {allProps.na... | null | 2019-03-09 19:56:43+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['runtime prop-without-semicolon ', 'runtime if-block-else ', 'validate prop-slot', 'runtime immutable-nested ', 'ssr each-block-else', 'runtime transition-js-each-block-outro (with hydration)', 'runtime whitespace-normal (with hydration)', 'runtime attribute-dynamic-quotemarks ', 'ssr class-shortcut-with-class', 'ssr ... | ['runtime props (with hydration)', 'vars $$props-logicless, generate: false', 'runtime props ', 'runtime spread-own-props ', 'runtime spread-own-props (with hydration)', 'vars $$props, generate: false', 'ssr props', 'vars $$props-logicless, generate: ssr', 'vars $$props, generate: dom', 'vars $$props, generate: ssr', '... | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Feature | false | true | false | false | 10 | 0 | 10 | false | false | ["src/compile/render-dom/index.ts->program->function_declaration:dom", "src/compile/Component.ts->program->class_declaration:Component->method_definition:constructor", "src/compile/Component.ts->program->class_declaration:Component->method_definition:walk_instance_js_pre_template", "src/compile/Component.ts->program->c... |
sveltejs/svelte | 2,188 | sveltejs__svelte-2188 | ['2180'] | 06040d3513b326570b2c279ac54b7146708f8c53 | diff --git a/src/compile/render-dom/wrappers/EachBlock.ts b/src/compile/render-dom/wrappers/EachBlock.ts
--- a/src/compile/render-dom/wrappers/EachBlock.ts
+++ b/src/compile/render-dom/wrappers/EachBlock.ts
@@ -55,6 +55,8 @@ export default class EachBlockWrapper extends Wrapper {
each_block_value: string;
get_eac... | diff --git a/test/js/samples/each-block-array-literal/expected.js b/test/js/samples/each-block-array-literal/expected.js
new file mode 100644
--- /dev/null
+++ b/test/js/samples/each-block-array-literal/expected.js
@@ -0,0 +1,84 @@
+/* generated by Svelte vX.Y.Z */
+import { SvelteComponent as SvelteComponent_1, append... | Optimise each blocks with array literals
Small thing, but it would be neat to optimise each blocks with array literals, as in [this example](https://v3.svelte.technology/repl?version=3.0.0-beta.11&demo=svg-clock):
```html
{#each [1, 2, 3, 4] as offset}
<line
class='minor'
y1='42'
y2='45'
transform='ro... | This seems like a feature that would require a bunch of restrictions to ensure that the array can never change size. Since restrictions equate directly with more compiler code complexity do you think the tiny speedup in removing a few property accesses justifies the complexity?
I'm not against making the compiler sm... | 2019-03-09 20:34:23+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['runtime prop-without-semicolon ', 'runtime if-block-else ', 'validate prop-slot', 'runtime immutable-nested ', 'ssr each-block-else', 'runtime transition-js-each-block-outro (with hydration)', 'runtime whitespace-normal (with hydration)', 'runtime attribute-dynamic-quotemarks ', 'ssr class-shortcut-with-class', 'ssr ... | ['js each-block-array-literal'] | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Refactoring | false | false | false | true | 4 | 1 | 5 | false | false | ["src/compile/render-dom/wrappers/EachBlock.ts->program->class_declaration:EachBlockWrapper->method_definition:render", "src/compile/render-dom/wrappers/EachBlock.ts->program->class_declaration:EachBlockWrapper->method_definition:renderUnkeyed", "src/compile/render-dom/wrappers/EachBlock.ts->program->class_declaration:... |
sveltejs/svelte | 3,141 | sveltejs__svelte-3141 | ['1705'] | 220515b60572cae18e85ef19e63bd2ca04fd8806 | diff --git a/src/compiler/compile/css/Selector.ts b/src/compiler/compile/css/Selector.ts
--- a/src/compiler/compile/css/Selector.ts
+++ b/src/compiler/compile/css/Selector.ts
@@ -61,7 +61,10 @@ export default class Selector {
let i = block.selectors.length;
while (i--) {
const selector = block.selectors[i]... | diff --git a/test/css/samples/not-selector/expected.css b/test/css/samples/not-selector/expected.css
new file mode 100644
--- /dev/null
+++ b/test/css/samples/not-selector/expected.css
@@ -0,0 +1 @@
+.svelte-xyz:not(.foo){color:red}
\ No newline at end of file
diff --git a/test/css/samples/not-selector/input.svelte b/t... | :not(...) styles are broken
[REPL](https://svelte.technology/repl?version=2.13.1&gist=c80e2cda5f07897ad9eaada7df570cc0). The encapsulator should treat `:not(selector)` as `*:not(selector)`, but it doesn't.
| I don't think it is a svelte bug.
This is the normal behaviour in CSS.
See this codepen : https://codepen.io/thollander/pen/JzJQKO?editors=1100
The color is inherited by default.
https://www.w3schools.com/cssref/pr_text_color.asp
So it takes the color of the body property which validates the rule `:not(p)`
H... | 2019-06-30 21:42:26+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['css omit-scoping-attribute-attribute-selector-equals-case-insensitive', 'css combinator-child', 'css empty-rule-dev', 'css supports-query', 'css omit-scoping-attribute-descendant-global-inner-class', 'css omit-scoping-attribute-whitespace', 'css attribute-selector-only-name', 'css empty-rule', 'css css-vars', 'css gl... | ['css not-selector'] | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Bug Fix | false | true | false | false | 1 | 0 | 1 | true | false | ["src/compiler/compile/css/Selector.ts->program->class_declaration:Selector->method_definition:transform->function_declaration:encapsulate_block"] |
sveltejs/svelte | 3,150 | sveltejs__svelte-3150 | ['2714'] | f341befacb92d821424889dfefbdccedc881bfe5 | diff --git a/src/runtime/internal/Component.ts b/src/runtime/internal/Component.ts
--- a/src/runtime/internal/Component.ts
+++ b/src/runtime/internal/Component.ts
@@ -11,11 +11,11 @@ interface T$$ {
bound: any;
update: () => void;
callbacks: any;
- after_render: any[];
+ after_update: any[];
props: any;
fragm... | diff --git a/test/runtime/samples/lifecycle-render-order-for-children/Item.svelte b/test/runtime/samples/lifecycle-render-order-for-children/Item.svelte
new file mode 100755
--- /dev/null
+++ b/test/runtime/samples/lifecycle-render-order-for-children/Item.svelte
@@ -0,0 +1,29 @@
+<script>
+ import { onMount, beforeUpda... | Provide non-decoded text to `parse` consumers
Currently, `parse` from `svelte/compiler` decodes HTML entities (such as `&` or `˙`). This causes tools like [prettier-plugin-svelte] that use the AST to generate source text to write decoded entities back to the template. It would be nice if either this decoding ha... | null | 2019-07-02 01:52:39+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['runtime prop-without-semicolon ', 'runtime if-block-else ', 'validate prop-slot', 'runtime immutable-nested ', 'ssr each-block-else', 'runtime transition-js-each-block-outro (with hydration)', 'runtime whitespace-normal (with hydration)', 'runtime attribute-dynamic-quotemarks ', 'ssr class-shortcut-with-class', 'ssr ... | ['runtime lifecycle-render-order-for-children ', 'runtime lifecycle-render-order (with hydration)', 'runtime lifecycle-render-order ', 'runtime lifecycle-render-order-for-children (with hydration)'] | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Refactoring | false | true | false | false | 7 | 0 | 7 | false | false | ["src/runtime/internal/Component.ts->program->function_declaration:init", "src/runtime/internal/ssr.ts->program->function_declaration:create_ssr_component->function_declaration:$$render", "src/runtime/internal/Component.ts->program->function_declaration:mount_component", "src/runtime/internal/scheduler.ts->program->fun... |
sveltejs/svelte | 3,158 | sveltejs__svelte-3158 | ['3038'] | 9883a50bf99a017b89f911431378040cf0869f96 | diff --git a/src/compiler/compile/nodes/shared/Expression.ts b/src/compiler/compile/nodes/shared/Expression.ts
--- a/src/compiler/compile/nodes/shared/Expression.ts
+++ b/src/compiler/compile/nodes/shared/Expression.ts
@@ -270,7 +270,7 @@ export default class Expression {
});
} else {
dependencie... | diff --git a/test/runtime/samples/function-expression-inline/_config.js b/test/runtime/samples/function-expression-inline/_config.js
new file mode 100644
--- /dev/null
+++ b/test/runtime/samples/function-expression-inline/_config.js
@@ -0,0 +1,22 @@
+export default {
+ html: `
+ <button>click me</button>
+ <p>1</p>
+... | "Unexpected token" when expression with function involving return statement is assigned to non-local variable
I got `"Unexpected token (Note that you need plugins to import files that are not JavaScript)"` when I did something like this:
```html
<button on:click={event => {
list = list.map(item => {
const n... | Found another requirement for reproducing this error, the return statement must be terminated with a semicolon (wtf?) [REPL](https://svelte.dev/repl/dc50f766a64e40098190e915ed450d3b?version=3.5.3)
This issue is probably related as well, doesn't result in a parse error, but there's also some weirdness with how the $$... | 2019-07-02 20:27:56+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['runtime prop-without-semicolon ', 'runtime if-block-else ', 'validate prop-slot', 'runtime immutable-nested ', 'ssr each-block-else', 'runtime transition-js-each-block-outro (with hydration)', 'runtime whitespace-normal (with hydration)', 'runtime attribute-dynamic-quotemarks ', 'ssr class-shortcut-with-class', 'ssr ... | ['runtime function-expression-inline (with hydration)', 'runtime function-expression-inline '] | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Bug Fix | false | true | false | false | 2 | 0 | 2 | false | false | ["src/compiler/compile/nodes/shared/Expression.ts->program->class_declaration:Expression->method_definition:render->method_definition:enter", "src/compiler/compile/nodes/shared/Expression.ts->program->class_declaration:Expression->method_definition:render->method_definition:leave"] |
sveltejs/svelte | 4,069 | sveltejs__svelte-4069 | ['4018'] | 6a4956b4031fc5ec2bb31a9a4e41c0950fcbe814 | diff --git a/src/compiler/compile/render_dom/index.ts b/src/compiler/compile/render_dom/index.ts
--- a/src/compiler/compile/render_dom/index.ts
+++ b/src/compiler/compile/render_dom/index.ts
@@ -3,7 +3,7 @@ import Component from '../Component';
import Renderer from './Renderer';
import { CompileOptions } from '../../... | diff --git a/test/js/samples/instrumentation-script-main-block/expected.js b/test/js/samples/instrumentation-script-main-block/expected.js
new file mode 100644
--- /dev/null
+++ b/test/js/samples/instrumentation-script-main-block/expected.js
@@ -0,0 +1,75 @@
+/* generated by Svelte vX.Y.Z */
+import {
+ SvelteComponent... | Unnecessary `$$invalidate` calls during component creation
There's no need to instrument assignments with calls to `$$invalidate` inside the main `instance()` function body as all variables are initially set to dirty already.
It wouldn't be a huge improvement, but it's unnecessary work nonetheless.
| A straight ahead tweak on the current ast walk comes upon two complications: labelled statements and store reassignments. They need to be instrumented regardless of being in the main control flow or not.
PR incoming | 2019-12-08 19:11:42+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['runtime prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'validate prop-slot', 'runtime immutable-nested ', 'ssr each-block-else', 'runtime transition-js-each-block-outro (with hydration)', 'runtime whitespace-normal (with hydration)', 'runtime attribute-dynamic-quotemarks ', ... | ['js instrumentation-script-main-block'] | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Refactoring | false | true | false | false | 5 | 0 | 5 | false | false | ["src/compiler/compile/render_dom/index.ts->program->function_declaration:dom", "src/compiler/compile/render_dom/index.ts->program->function_declaration:dom->method_definition:enter", "src/compiler/compile/render_dom/index.ts->program->function_declaration:dom->method_definition:leave", "src/compiler/compile/render_dom... |
sveltejs/svelte | 4,395 | sveltejs__svelte-4395 | ['4393'] | 59a5d4a52c801b3c1b5b5033007ab8fad3fd9257 | diff --git a/CHANGELOG.md b/CHANGELOG.md
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -9,6 +9,7 @@
* Permit reserved keywords as destructuring keys in `{#each}` ([#4372](https://github.com/sveltejs/svelte/issues/4372))
* Disallow reserved keywords in `{expressions}` ([#4372](https://github.com/sveltejs/svelte/issues/4372... | diff --git a/test/runtime/samples/instrumentation-update-expression/_config.js b/test/runtime/samples/instrumentation-update-expression/_config.js
new file mode 100644
--- /dev/null
+++ b/test/runtime/samples/instrumentation-update-expression/_config.js
@@ -0,0 +1,31 @@
+export default {
+ html: `
+ <p>0</p>
+ <butto... | ++count.value produce undefined
**Describe the bug**
Seems if we try to increase some object property with increment operator before the operand Svelte produces undefined value in ctx. Interesting that this would work fine if we use increment operator as postfix or if the value is not an object.
**To Reproduce**
[... | null | 2020-02-09 14:17:43+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['runtime prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'validate prop-slot', 'runtime immutable-nested ', 'ssr each-block-else', 'runtime transition-js-each-block-outro (with hydration)', 'runtime whitespace-normal (with hydration)', 'runtime attribute-dynamic-quotemarks ', ... | ['runtime instrumentation-update-expression ', 'runtime instrumentation-update-expression (with hydration)'] | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Bug Fix | false | true | false | false | 1 | 0 | 1 | true | false | ["src/compiler/compile/render_dom/invalidate.ts->program->function_declaration:invalidate"] |
sveltejs/svelte | 4,634 | sveltejs__svelte-4634 | ['4630'] | 77ec48debaf99e33197729d3c739d888aa7654d4 | diff --git a/src/compiler/compile/render_dom/wrappers/IfBlock.ts b/src/compiler/compile/render_dom/wrappers/IfBlock.ts
--- a/src/compiler/compile/render_dom/wrappers/IfBlock.ts
+++ b/src/compiler/compile/render_dom/wrappers/IfBlock.ts
@@ -520,28 +520,22 @@ export default class IfBlockWrapper extends Wrapper {
if (br... | diff --git a/test/js/samples/if-block-simple/expected.js b/test/js/samples/if-block-simple/expected.js
--- a/test/js/samples/if-block-simple/expected.js
+++ b/test/js/samples/if-block-simple/expected.js
@@ -42,12 +42,12 @@ function create_fragment(ctx) {
},
p(ctx, [dirty]) {
if (/*foo*/ ctx[0]) {
- if (!if... | Component nested in if_block will fail to unmount if it has an element using an outro nested in a truthy if_block
This is a concise report for the bug encountered in #4620, #4064, #3685, #3410 and #3202.
[Absolute minimum REPL]( https://svelte.dev/repl/1f6f0ae29a6747368a2eb25ea2741703?version=3.20.1)
1) New Compo... | null | 2020-04-05 21:27:45+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['runtime prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'validate prop-slot', 'runtime immutable-nested ', 'runtime await-then-destruct-array (with hydration)', 'ssr each-block-else', 'runtime transition-js-each-block-outro (with hydration)', 'runtime whitespace-normal (with ... | ['js if-block-simple', 'runtime transition-js-if-outro-unrelated-component-store-update ', 'js transition-local', 'runtime transition-js-if-outro-unrelated-component-binding-update (with hydration)', 'runtime transition-js-if-outro-unrelated-component-store-update (with hydration)', 'js use-elements-as-anchors', 'js tr... | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Bug Fix | false | true | false | false | 1 | 0 | 1 | true | false | ["src/compiler/compile/render_dom/wrappers/IfBlock.ts->program->class_declaration:IfBlockWrapper->method_definition:render_simple"] |
sveltejs/svelte | 5,442 | sveltejs__svelte-5442 | ['5438'] | 41d1656458b8e2643e3751f27f147b58428d6024 | diff --git a/CHANGELOG.md b/CHANGELOG.md
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,7 @@
## Unreleased
+* Add `|nonpassive` event modifier, explicitly passing `passive: false` ([#2068](https://github.com/sveltejs/svelte/issues/2068))
* Fix keyed `{#each}` not reacting to key changing ([#5444](https://github... | diff --git a/test/js/samples/event-modifiers/expected.js b/test/js/samples/event-modifiers/expected.js
--- a/test/js/samples/event-modifiers/expected.js
+++ b/test/js/samples/event-modifiers/expected.js
@@ -16,41 +16,49 @@ import {
} from "svelte/internal";
function create_fragment(ctx) {
- let div;
- let button0;
... | Passive event listener not added to touchmove
[REPL](https://svelte.dev/repl/f289ef24129f475a906fdd22c0dc97e6?version=3.24.1)
Open Devtools:
```
VM77:45 [Violation] Added non-passive event listener to a scroll-blocking 'touchmove' event. Consider marking event handler as 'passive' to make the page more responsive. S... | null | 2020-09-23 00:58:51+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['runtime prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'validate prop-slot', 'runtime immutable-nested ', 'runtime await-then-destruct-array (with hydration)', 'ssr each-block-else', 'runtime transition-js-each-block-outro (with hydration)', 'runtime whitespace-normal (with ... | ['js event-modifiers', 'validate event-modifiers-invalid-nonpassive', 'validate event-modifiers-invalid'] | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Feature | false | true | false | false | 2 | 0 | 2 | false | false | ["src/compiler/compile/render_dom/wrappers/Element/EventHandler.ts->program->class_declaration:EventHandlerWrapper->method_definition:render", "src/compiler/compile/nodes/Element.ts->program->class_declaration:Element->method_definition:validate_event_handlers"] |
sveltejs/svelte | 5,841 | sveltejs__svelte-5841 | ['5829'] | 63669330f69fecaeaacba5d35faf180c3f5b9a41 | diff --git a/CHANGELOG.md b/CHANGELOG.md
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -7,6 +7,7 @@
* Fix checkbox `bind:group` in keyed `{#each}` where the array can be reordered ([#5779](https://github.com/sveltejs/svelte/issues/5779))
* Fix checkbox `bind:group` in nested `{#each}` contexts ([#5811](https://github.com/... | diff --git a/test/js/samples/each-block-keyed-animated/expected.js b/test/js/samples/each-block-keyed-animated/expected.js
--- a/test/js/samples/each-block-keyed-animated/expected.js
+++ b/test/js/samples/each-block-keyed-animated/expected.js
@@ -94,7 +94,7 @@ function create_fragment(ctx) {
},
p(ctx, [dirty]) {
... | Local transition in #each block is is disabled if parent node has out transition cancelled
Is this about svelte@next? This project is currently in a pre-release stage and breaking changes may occur at any time. Please do not post any kind of bug reports or questions on GitHub about it.
No
**Describe the bug**
A... | null | 2020-12-31 03:23:17+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['runtime prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'validate prop-slot', 'runtime immutable-nested ', 'runtime await-then-destruct-array (with hydration)', 'ssr each-block-else', 'runtime transition-js-each-block-outro (with hydration)', 'runtime whitespace-normal (with ... | ['js each-block-keyed', 'js each-block-keyed-animated', 'runtime transition-js-each-outro-cancelled ', 'runtime transition-js-each-outro-cancelled (with hydration)'] | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Bug Fix | false | true | false | false | 1 | 0 | 1 | true | false | ["src/compiler/compile/render_dom/wrappers/EachBlock.ts->program->class_declaration:EachBlockWrapper->method_definition:render_keyed"] |
sveltejs/svelte | 5,929 | sveltejs__svelte-5929 | ['5883'] | 0f3264e2056dcc0fa2d102d8d238bf15b40d614f | diff --git a/CHANGELOG.md b/CHANGELOG.md
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -3,6 +3,7 @@
## Unreleased
* Throw a parser error for `class:` directives with an empty class name ([#5858](https://github.com/sveltejs/svelte/issues/5858))
+* Fix extraneous store subscription in SSR mode ([#5883](https://github.com/... | diff --git a/test/runtime/samples/reactive-assignment-in-complex-declaration-with-store-3/_config.js b/test/runtime/samples/reactive-assignment-in-complex-declaration-with-store-3/_config.js
new file mode 100644
--- /dev/null
+++ b/test/runtime/samples/reactive-assignment-in-complex-declaration-with-store-3/_config.js
... | Store get from import statement called twice in SSR
**Describe the bug**
While debugging memory leak issue in my playing around svelte-kit repo, I ran into this issue (not related to svelte-kit), the store still log current time after prerender request done.
**To Reproduce**
[Repl](https://svelte.dev/repl/5b9b1dfa... | null | 2021-01-26 01:12:47+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['runtime prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'validate prop-slot', 'runtime immutable-nested ', 'runtime await-then-destruct-array (with hydration)', 'ssr each-block-else', 'runtime transition-js-each-block-outro (with hydration)', 'runtime whitespace-normal (with ... | ['ssr reactive-assignment-in-complex-declaration-with-store-3'] | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Bug Fix | false | true | false | false | 1 | 0 | 1 | true | false | ["src/compiler/compile/render_ssr/index.ts->program->function_declaration:ssr"] |
sveltejs/svelte | 6,223 | sveltejs__svelte-6223 | ['6222'] | 697d4c7f5199ad1fe0d8283bd8fd151401f2f467 | diff --git a/src/compiler/compile/css/Selector.ts b/src/compiler/compile/css/Selector.ts
--- a/src/compiler/compile/css/Selector.ts
+++ b/src/compiler/compile/css/Selector.ts
@@ -51,7 +51,7 @@ export default class Selector {
}
apply(node: Element) {
- const to_encapsulate: any[] = [];
+ const to_encapsulate: Ar... | diff --git a/test/css/samples/global-compound-selector/_config.js b/test/css/samples/global-compound-selector/_config.js
new file mode 100644
--- /dev/null
+++ b/test/css/samples/global-compound-selector/_config.js
@@ -0,0 +1,27 @@
+export default {
+ warnings: [
+ {
+ code: 'css-unused-selector',
+ frame: `
+ ... | Support :global() in compound selector
If i have the following:
```svelte
<script>
function action(node) {
if (some_condition) {
node.classList.add('xxx');
}
}
</script>
<p use:action />
<style>
p.xxx {
color: green;
}
</style>
```
the selector `p.xxx` will get... | null | 2021-04-22 01:23:48+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['runtime prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'runtime immutable-nested ', 'runtime await-then-destruct-array (with hydration)', 'ssr each-block-else', 'runtime transition-js-each-block-outro (with hydration)', 'runtime whitespace-normal (with hydration)', 'runtime ... | ['css global-compound-selector', 'css global'] | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Feature | false | false | false | true | 9 | 1 | 10 | false | false | ["src/compiler/compile/css/Selector.ts->program->function_declaration:apply_selector", "src/compiler/compile/css/Selector.ts->program->class_declaration:Selector->method_definition:transform", "src/compiler/compile/css/Selector.ts->program->class_declaration:Block", "src/compiler/compile/css/Selector.ts->program->class... |
sveltejs/svelte | 6,395 | sveltejs__svelte-6395 | ['4308'] | 17c5402e311d7224aa8c11d979c9b32cb950883f | diff --git a/src/runtime/internal/Component.ts b/src/runtime/internal/Component.ts
--- a/src/runtime/internal/Component.ts
+++ b/src/runtime/internal/Component.ts
@@ -1,7 +1,7 @@
import { add_render_callback, flush, schedule_update, dirty_components } from './scheduler';
import { current_component, set_current_compon... | diff --git a/test/hydration/samples/head-meta-hydrate-duplicate/_after_head.html b/test/hydration/samples/head-meta-hydrate-duplicate/_after_head.html
--- a/test/hydration/samples/head-meta-hydrate-duplicate/_after_head.html
+++ b/test/hydration/samples/head-meta-hydrate-duplicate/_after_head.html
@@ -1,4 +1,4 @@
-<tit... | Better hydration
**Is your feature request related to a problem? Please describe.**
Currently hydration is very expensive, it searches for the correct node type clears it and re-adds the attributes and finally unmounts and remounts the DOM node by calling insertBefore/append
This causes iframes to reload.
In the cur... | If anyone else is blocked by the iframes ssr/hydration problems or really cares about hydration speed, I'm currently maintaining a fork https://github.com/wix-incubator/wix-svelte which you can use directly just point your package.json
"svelte": "ssh://git@github.com:wix-incubator/wix-svelte.git#master" (or hard code ... | 2021-06-09 21:58:32+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['runtime prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'runtime immutable-nested ', 'runtime await-then-destruct-array (with hydration)', 'runtime each-block-random-permute (with hydration from ssr rendered html)', 'ssr each-block-else', 'runtime transition-js-each-block-out... | ['hydration head-meta-hydrate-duplicate'] | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Refactoring | false | true | false | false | 11 | 0 | 11 | false | false | ["src/runtime/internal/Component.ts->program->function_declaration:init", "src/runtime/internal/dom.ts->program->function_declaration:upper_bound", "src/runtime/internal/dom.ts->program->function_declaration:insert", "src/runtime/internal/dom.ts->program->function_declaration:claim_text", "src/runtime/internal/dom.ts->... |
sveltejs/svelte | 6,429 | sveltejs__svelte-6429 | ['5756'] | 17c5402e311d7224aa8c11d979c9b32cb950883f | diff --git a/src/compiler/compile/render_ssr/handlers/Element.ts b/src/compiler/compile/render_ssr/handlers/Element.ts
--- a/src/compiler/compile/render_ssr/handlers/Element.ts
+++ b/src/compiler/compile/render_ssr/handlers/Element.ts
@@ -41,7 +41,7 @@ export default function(node: Element, renderer: Renderer, options:... | diff --git a/test/server-side-rendering/samples/attribute-escape-quotes-spread-2/_expected.html b/test/server-side-rendering/samples/attribute-escape-quotes-spread-2/_expected.html
new file mode 100644
--- /dev/null
+++ b/test/server-side-rendering/samples/attribute-escape-quotes-spread-2/_expected.html
@@ -0,0 +1,5 @@... | Null-valued attributes are rendered initially when restProps are involved
**Describe the bug**
Even though Svelte's take on attributes is that it doesn't add them when their value is `null`, Sapper seems to disrespect this on initial server-side rendering for components that include `$$restProps`. This leads to nasty ... | Transferring this to the Svelte repo, as this is a Svelte bug.
The SSR version of a component with `<div {id} {...foo}/>` contains:
```js
const App = create_ssr_component(($$result, $$props, $$bindings, slots) => {
return `<div${spread([{ id: escape(id) }, foo])}></div>`;
});
```
`escape(null)` is evaluat... | 2021-06-22 08:49:49+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['runtime prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'runtime immutable-nested ', 'runtime await-then-destruct-array (with hydration)', 'runtime each-block-random-permute (with hydration from ssr rendered html)', 'ssr each-block-else', 'runtime transition-js-each-block-out... | ['ssr attribute-spread-with-null'] | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Bug Fix | false | true | false | false | 3 | 0 | 3 | false | false | ["src/runtime/internal/ssr.ts->program->function_declaration:spread", "src/runtime/internal/ssr.ts->program->function_declaration:escape_attribute_value", "src/runtime/internal/ssr.ts->program->function_declaration:escape_object"] |
sveltejs/svelte | 6,458 | sveltejs__svelte-6458 | ['4551'] | b662c7fd41b3b778ea1ae80b0a4d86c239ffcfe7 | diff --git a/src/compiler/compile/render_ssr/handlers/Element.ts b/src/compiler/compile/render_ssr/handlers/Element.ts
--- a/src/compiler/compile/render_ssr/handlers/Element.ts
+++ b/src/compiler/compile/render_ssr/handlers/Element.ts
@@ -119,9 +119,11 @@ export default function(node: Element, renderer: Renderer, optio... | diff --git a/test/runtime/samples/apply-directives-in-order/_config.js b/test/runtime/samples/apply-directives-in-order/_config.js
--- a/test/runtime/samples/apply-directives-in-order/_config.js
+++ b/test/runtime/samples/apply-directives-in-order/_config.js
@@ -9,7 +9,7 @@ export default {
`,
ssrHtml: `
- <inpu... | Input type range bound value 0 is omitted from ssr
**Describe the bug**
The range element with a bound value 0 is omitted from server side rendering. This leads to the range input jumping(from default location) after client side js takes over. This issue seems to stem from 0 being a falsy value in Javascript.
**T... | I guess the issue is located here
https://github.com/sveltejs/svelte/blob/a66437b3c15e735139f9afb2ec25e3e1c612cd82/src/compiler/compile/render_ssr/handlers/Element.ts#L125-L127
https://github.com/sveltejs/svelte/blob/a66437b3c15e735139f9afb2ec25e3e1c612cd82/src/runtime/internal/ssr.ts#L130-L132
Would it be eno... | 2021-06-27 07:54:13+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['runtime prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'vars vars-report-full-script, generate: false', 'runtime immutable-nested ', 'runtime await-then-destruct-array (with hydration)', 'runtime each-block-random-permute (with hydration from ssr rendered html)', 'ssr each-b... | ['ssr binding-select-initial-value', 'ssr component-binding-store', 'ssr store-invalidation-while-update-2', 'ssr bindings-global-dependency', 'ssr binding-select-late-2', 'ssr each-block-destructured-default-binding', 'ssr binding-select-multiple', 'ssr binding-circular', 'ssr store-invalidation-while-update-1', 'ssr ... | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Bug Fix | true | false | false | false | 0 | 0 | 0 | false | false | [] |
sveltejs/svelte | 6,514 | sveltejs__svelte-6514 | ['4767'] | ebaa891e69c184cf44c0fcd54984ec84d13236fa | diff --git a/src/compiler/compile/css/Selector.ts b/src/compiler/compile/css/Selector.ts
--- a/src/compiler/compile/css/Selector.ts
+++ b/src/compiler/compile/css/Selector.ts
@@ -47,8 +47,9 @@ export default class Selector {
this.local_blocks = this.blocks.slice(0, i);
const host_only = this.blocks.length === 1... | diff --git a/test/css/samples/root/_config.js b/test/css/samples/root/_config.js
new file mode 100644
--- /dev/null
+++ b/test/css/samples/root/_config.js
@@ -0,0 +1 @@
+export default {};
diff --git a/test/css/samples/root/expected.css b/test/css/samples/root/expected.css
new file mode 100644
--- /dev/null
+++ b/test/... | `<meta>` tag get svelte- classname when `:root` selector is defined
**Describe the bug**
When I used `:root` selector in a svelte component using `<style>`, `<meta>` in `<svelte:head />` tag will get a svelte generated classname.
While I can just move `:root` selector to other place, I'm not sure if it's expected b... | > If I'm not mistaken the class will be also applied if no styles are present... Can't confirm from my phone at the moment and will check later.
If I removed `:root` class would disappear in `<meta>` though.
You are right... 👍
Thank you
This issue has been automatically marked as stale because it has not had rece... | 2021-07-11 01:19:06+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['runtime prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'vars vars-report-full-script, generate: false', 'runtime immutable-nested ', 'runtime await-then-destruct-array (with hydration)', 'runtime each-block-random-permute (with hydration from ssr rendered html)', 'ssr each-b... | ['css root'] | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Bug Fix | false | false | false | true | 4 | 1 | 5 | false | false | ["src/compiler/compile/css/Selector.ts->program->class_declaration:Selector->method_definition:constructor", "src/compiler/compile/css/Selector.ts->program->class_declaration:Block", "src/compiler/compile/css/Selector.ts->program->class_declaration:Block->method_definition:constructor", "src/compiler/compile/css/Select... |
sveltejs/svelte | 6,525 | sveltejs__svelte-6525 | ['6462'] | 33307a54c86daf45aa49f4cfaeef2ab07ff37ed0 | diff --git a/src/compiler/compile/Component.ts b/src/compiler/compile/Component.ts
--- a/src/compiler/compile/Component.ts
+++ b/src/compiler/compile/Component.ts
@@ -272,6 +272,14 @@ export default class Component {
} else {
let name = node.name.slice(1);
+ if (compile_options.hydratable) {
+... | diff --git a/test/js/samples/hydrated-void-element/expected.js b/test/js/samples/hydrated-void-element/expected.js
--- a/test/js/samples/hydrated-void-element/expected.js
+++ b/test/js/samples/hydrated-void-element/expected.js
@@ -8,7 +8,7 @@ import {
detach,
element,
init,
- insert,
+ insert_hydration,
noop,
... | Svelte "hello world" increased by 4.37kB (~59%) between Svelte 3.37.0 and 3.38.0
### Describe the bug
First off, thank you for maintaining Svelte. It's one of my favorite JavaScript frameworks for its ease-of-use, small bundle size, and runtime performance.
Unfortunately it seems that the baseline bundle size has i... | Yep I think it would probably make sense to have dumb versions of the claim functions that are used when hydration is not enabled at compile time.
I count around 4521 letters in the diff (quite close to 11.79K - 7.42K) with around 1719 characters from comments. So I guess this is the bundle size for debug builds, right... | 2021-07-13 14:39:28+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['runtime prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'vars vars-report-full-script, generate: false', 'runtime immutable-nested ', 'runtime await-then-destruct-array (with hydration)', 'runtime each-block-random-permute (with hydration from ssr rendered html)', 'ssr each-b... | ['js src-attribute-check', 'js hydrated-void-element'] | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Refactoring | false | false | false | true | 14 | 2 | 16 | false | false | ["src/runtime/internal/dom.ts->program->class_declaration:HtmlTag->method_definition:m", "src/runtime/internal/dom.ts->program->function_declaration:append_hydration", "src/runtime/internal/dom.ts->program->function_declaration:insert", "src/runtime/internal/dom.ts->program->class_declaration:HtmlTagHydration", "src/ru... |
sveltejs/svelte | 6,528 | sveltejs__svelte-6528 | ['6447'] | 52b67a0497baa5d3a84dd1d4ed746f9f236de23d | diff --git a/site/content/docs/03-run-time.md b/site/content/docs/03-run-time.md
--- a/site/content/docs/03-run-time.md
+++ b/site/content/docs/03-run-time.md
@@ -198,6 +198,24 @@ Checks whether a given `key` has been set in the context of a parent component.
</script>
```
+#### `getAllContexts`
+
+```js
+contexts:... | diff --git a/test/runtime/samples/context-api-d/Leaf.svelte b/test/runtime/samples/context-api-d/Leaf.svelte
new file mode 100644
--- /dev/null
+++ b/test/runtime/samples/context-api-d/Leaf.svelte
@@ -0,0 +1,9 @@
+<script>
+ import { getAllContexts } from 'svelte';
+
+ const context = getAllContexts();
+</script>
+
+{#... | Allow getContext() to pass on context as a whole
**Is your feature request related to a problem? Please describe.**
I want to pass on context to programatically defined components:
```javascript
new SomeComponent({target, props, context: ??? })
```
**Describe the solution you'd like**
Allow `getContext` to be... | mentioned in discord, but leaving a note here as well: i think this should be `getAllContexts()` or `getContexts()`, since functions that significantly change their behaviour based on the number of arguments they receive are generally an anti-pattern, I think — they don't tend to stand the test of time in my experience | 2021-07-14 01:39:30+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['runtime prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'vars vars-report-full-script, generate: false', 'runtime immutable-nested ', 'runtime await-then-destruct-array (with hydration)', 'runtime each-block-random-permute (with hydration from ssr rendered html)', 'ssr each-b... | ['runtime context-api-d ', 'runtime context-api-d (with hydration)', 'runtime context-api-d (with hydration from ssr rendered html)', 'ssr context-api-d'] | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Feature | false | true | false | false | 1 | 0 | 1 | true | false | ["src/runtime/internal/lifecycle.ts->program->function_declaration:getAllContexts"] |
sveltejs/svelte | 6,556 | sveltejs__svelte-6556 | ['6555'] | b2260bc2e3dbfe4bf5b9c6c1705aa4e3daf6120f | diff --git a/src/compiler/compile/render_dom/wrappers/Element/index.ts b/src/compiler/compile/render_dom/wrappers/Element/index.ts
--- a/src/compiler/compile/render_dom/wrappers/Element/index.ts
+++ b/src/compiler/compile/render_dom/wrappers/Element/index.ts
@@ -388,9 +388,11 @@ export default class ElementWrapper exte... | diff --git a/test/js/samples/hydrated-void-svg-element/_config.js b/test/js/samples/hydrated-void-svg-element/_config.js
new file mode 100644
--- /dev/null
+++ b/test/js/samples/hydrated-void-svg-element/_config.js
@@ -0,0 +1,5 @@
+export default {
+ options: {
+ hydratable: true
+ }
+};
diff --git a/test/js/samples/h... | `svg_element` function is output even if no svg element in a component
### Describe the problem
when `hydratable: true`, `svg_element` function is output even if no svg element in a component.
For example, if you have a simple component like the following:
```html
<main>
<h1>Hello world!</h1>
</main>
```
... | null | 2021-07-22 06:29:51+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['runtime prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'vars vars-report-full-script, generate: false', 'runtime immutable-nested ', 'runtime await-then-destruct-array (with hydration)', 'runtime each-block-random-permute (with hydration from ssr rendered html)', 'ssr each-b... | ['js hydrated-void-svg-element'] | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Refactoring | false | true | false | false | 4 | 0 | 4 | false | false | ["src/runtime/internal/dom.ts->program->function_declaration:claim_element_base", "src/compiler/compile/render_dom/wrappers/Element/index.ts->program->class_declaration:ElementWrapper->method_definition:get_claim_statement", "src/runtime/internal/dom.ts->program->function_declaration:claim_element", "src/runtime/intern... |
sveltejs/svelte | 6,564 | sveltejs__svelte-6564 | ['6270'] | 63f592e7133bbb5730ceb61ca8184854fed52edb | diff --git a/src/compiler/parse/state/mustache.ts b/src/compiler/parse/state/mustache.ts
--- a/src/compiler/parse/state/mustache.ts
+++ b/src/compiler/parse/state/mustache.ts
@@ -290,16 +290,24 @@ export default function mustache(parser: Parser) {
const await_block_shorthand = type === 'AwaitBlock' && parser.eat('... | diff --git a/test/runtime/samples/await-catch-no-expression/_config.js b/test/runtime/samples/await-catch-no-expression/_config.js
new file mode 100644
--- /dev/null
+++ b/test/runtime/samples/await-catch-no-expression/_config.js
@@ -0,0 +1,47 @@
+let fulfil;
+
+let thePromise = new Promise(f => {
+ fulfil = f;
+});
+
... | feature request: `{#await promise then}`
<!--
If you'd like to propose an implementation for a large new feature or change then please create an RFC:
https://github.com/sveltejs/rfcs
-->
**Is your feature request related to a problem? Please describe.**
If you have a promise whose resolve value you don't care ab... | A thought on the semantics of this, I think `{#await promise}` would make more sense than `{#await promise then}`. The `then` here doesn't have any significance in this case and could be omitted.
I'm pretty sure we need the `then`, because without it Svelte would interpret it as when the promise is pending.
I don't thi... | 2021-07-24 03:17:12+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['runtime prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'vars vars-report-full-script, generate: false', 'runtime immutable-nested ', 'runtime await-then-destruct-array (with hydration)', 'runtime each-block-random-permute (with hydration from ssr rendered html)', 'ssr each-b... | ['ssr await-catch-no-expression', 'runtime await-then-no-expression (with hydration from ssr rendered html)', 'ssr await-then-no-expression', 'runtime await-then-no-expression (with hydration)', 'runtime await-catch-no-expression (with hydration)', 'runtime await-then-no-expression ', 'runtime await-catch-no-expression... | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Feature | false | true | false | false | 1 | 0 | 1 | true | false | ["src/compiler/parse/state/mustache.ts->program->function_declaration:mustache"] |
sveltejs/svelte | 6,613 | sveltejs__svelte-6613 | ['6004'] | b554e343e893cd5247a6dc1c373ed8f3b4367bd5 | diff --git a/src/compiler/compile/nodes/Element.ts b/src/compiler/compile/nodes/Element.ts
--- a/src/compiler/compile/nodes/Element.ts
+++ b/src/compiler/compile/nodes/Element.ts
@@ -96,6 +96,8 @@ const react_attributes = new Map([
['htmlFor', 'for']
]);
+const attributes_to_compact_whitespace = ['class', 'style']... | diff --git a/test/js/samples/collapse-element-class-name/expected.js b/test/js/samples/collapse-element-class-name/expected.js
new file mode 100644
--- /dev/null
+++ b/test/js/samples/collapse-element-class-name/expected.js
@@ -0,0 +1,114 @@
+/* generated by Svelte vX.Y.Z */
+import {
+ SvelteComponent,
+ assign,
+ att... | Normalize whitespaces in attribute values during compilation
**Is your feature request related to a problem? Please describe.**
It's not unusual to want to format your code (in this example particularly your CSS classes) in the following style:
', 'runtime each-block-random-permute (with hydration from ssr rendered html)', 'ssr each-b... | ['js collapse-element-class-name', 'ssr spread-attributes-white-space'] | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Feature | false | false | false | true | 2 | 1 | 3 | false | false | ["src/compiler/compile/nodes/Element.ts->program->class_declaration:Element->method_definition:optimise", "src/compiler/compile/nodes/Element.ts->program->class_declaration:Element->method_definition:constructor", "src/compiler/compile/nodes/Element.ts->program->class_declaration:Element"] |
sveltejs/svelte | 6,838 | sveltejs__svelte-6838 | ['6696'] | 0d7c583364ad87697473af19898f255be0584f21 | diff --git a/src/compiler/compile/compiler_errors.ts b/src/compiler/compile/compiler_errors.ts
--- a/src/compiler/compile/compiler_errors.ts
+++ b/src/compiler/compile/compiler_errors.ts
@@ -234,6 +234,10 @@ export default {
code: 'invalid-animation',
message: 'An element that uses the animate directive must be t... | diff --git a/test/validator/samples/animation-not-in-keyed-each/errors.json b/test/validator/samples/animation-not-in-keyed-each/errors.json
--- a/test/validator/samples/animation-not-in-keyed-each/errors.json
+++ b/test/validator/samples/animation-not-in-keyed-each/errors.json
@@ -1,6 +1,6 @@
[{
"code": "invalid-an... | Improved error message for using animate in an each block with missing key
### Describe the problem
Currently, if the `animate` directive is used on an immediate child of an each block, which forgot to add a key, the following error message is shown
> An element that uses the animate directive must be the immedia... | null | 2021-10-12 14:34:45+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && rm -rf node_modules && npm pkg set scripts.lint="echo noop" && npm install
RUN . $NVM_DIR/nvm.sh && nvm alias default 16.20.2 && nvm use default
| ['runtime prop-without-semicolon ', 'ssr sigil-expression-function-body', 'runtime if-block-else ', 'vars vars-report-full-script, generate: false', 'runtime immutable-nested ', 'runtime await-then-destruct-array (with hydration)', 'runtime each-block-random-permute (with hydration from ssr rendered html)', 'ssr each-b... | ['validate animation-not-in-keyed-each'] | null | . /usr/local/nvm/nvm.sh && nvm use 16.20.2 && npm pkg set scripts.lint="echo noop" && npm run test -- --reporter json --exit | Feature | false | true | false | false | 1 | 0 | 1 | true | false | ["src/compiler/compile/nodes/Animation.ts->program->class_declaration:Animation->method_definition:constructor"] |
prettier/prettier | 16,765 | prettier__prettier-16765 | ['15476', '16588'] | d116d9531c6e676662f158b784341d8417f0e107 | diff --git a/changelog_unreleased/html/16765.md b/changelog_unreleased/html/16765.md
new file mode 100644
index 000000000000..f4232830b3ab
--- /dev/null
+++ b/changelog_unreleased/html/16765.md
@@ -0,0 +1,18 @@
+#### Keep doctype in non-html files unchanged (#16765 by @fisker)
+
+In Prettier v3, [we print HTML5 doctype... | diff --git a/tests/format/filename-matters/html-doctype/__snapshots__/format.test.js.snap b/tests/format/filename-matters/html-doctype/__snapshots__/format.test.js.snap
new file mode 100644
index 000000000000..ab6d595f1c03
--- /dev/null
+++ b/tests/format/filename-matters/html-doctype/__snapshots__/format.test.js.snap
... | Prettier breaks XHTML documents by incorrectly lowercasing DOCTYPE
The change in https://github.com/prettier/prettier/pull/7391 caused prettier to break my XHTML documents by lowercasing the DOCTYPE, resulting in XML well-formedness errors for my use case.
DOCTYPE is case-sensitive in XML contexts. I cannot wrap it ... | We only lowercase doctype when it's HTML5.
Can you share an example that we break it?
I have plenty of `.xhtml` documents that prettier started doing this to recently. Here's an example XHTML document that was affected (src redacted):
```xhtml
<!DOCTYPE html>
<script xmlns="http://www.w3.org/1999/xhtml" src="[...... | 2024-10-18 14:52:41+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi
RUN . $NVM_DIR/nvm.sh && nvm alias default 20.16.0 && nvm use default
| [] | ['/testbed/tests/format/filename-matters/html-doctype/format.test.js->format'] | [] | . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && yarn test tests/format/filename-matters/html-doctype/format.test.js tests/format/filename-matters/html-doctype/__snapshots__/format.test.js.snap tests/format/filename-matters/html-doctype/xhtml-doctype.xhtml --json | Feature | false | true | false | false | 3 | 0 | 3 | false | false | ["src/language-html/print/tag.js->program->function_declaration:printOpeningTagStart", "src/language-html/print/tag.js->program->function_declaration:printClosingTagSuffix", "src/language-html/print/tag.js->program->function_declaration:printOpeningTagStartMarker"] |
prettier/prettier | 15,233 | prettier__prettier-15233 | ['15195'] | 06a8e377a3ee2a5de5866d1c8bec27bdffd6aa08 | diff --git a/changelog_unreleased/api/15233.md b/changelog_unreleased/api/15233.md
new file mode 100644
index 000000000000..cd64b782f0d9
--- /dev/null
+++ b/changelog_unreleased/api/15233.md
@@ -0,0 +1,9 @@
+#### Support shared config that forbids `require()` (#15233 by @fisker)
+
+If an external shared config package ... | diff --git a/tests/integration/__tests__/config-resolution.js b/tests/integration/__tests__/config-resolution.js
index 2885bad8b9fa..4e0cb05d05eb 100644
--- a/tests/integration/__tests__/config-resolution.js
+++ b/tests/integration/__tests__/config-resolution.js
@@ -361,3 +361,15 @@ test(".json5 config file(invalid)", ... | Prettier 3.x - Package subpath is not defined
Hi, after updating prettier to `3.0.0`, I am trying to set the main configuration from the shared configuration (npm package) but I'm getting errors via terminal:
```
["INFO" - 3:55:52 PM] Formatting file...
["ERROR" - 3:55:52 PM] Error resolving prettier configuration... | :wave: @ivodolenc, we use the issue tracker exclusively for development purposes. For questions, please use [Stack Overflow](https://stackoverflow.com/questions/ask?tags=prettier).
Hi @kachkaev, may I ask why you closed this? Do I need you to share an example repo?
👋 @ivodolenc! I marked this issue as a question and i... | 2023-08-11 09:40:41+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi
RUN . $NVM_DIR/nvm.sh && nvm alias default 20.16.0 && nvm use default
| ['/testbed/tests/integration/__tests__/config-resolution.js->API resolveConfig with nested file arg and .editorconfig and indent_size = tab', '/testbed/tests/integration/__tests__/config-resolution.js->.json5 config file', '/testbed/tests/integration/__tests__/config-resolution.js->API resolveConfig with nested file ar... | ['/testbed/tests/integration/__tests__/config-resolution.js->support external module with `module` only `exports`'] | [] | . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && yarn test tests/integration/cli/config/external-config/esm-package-forbids-require/index.js tests/integration/__tests__/config-resolution.js tests/integration/cli/config/external-config/esm-package-forbids-require/package.json tests/i... | Bug Fix | false | true | false | false | 1 | 0 | 1 | true | false | ["src/config/load-external-config.js->program->function_declaration:loadExternalConfig"] |
prettier/prettier | 14,317 | prettier__prettier-14317 | ['14035'] | b96dc57cd34210576cac66080b0a32aac2a9d8e3 | diff --git a/changelog_unreleased/api/14317.md b/changelog_unreleased/api/14317.md
new file mode 100644
index 000000000000..9367d8448742
--- /dev/null
+++ b/changelog_unreleased/api/14317.md
@@ -0,0 +1,25 @@
+#### Update `prettier.util` (#14317 by @fisker)
+
+- Added `prettier.util.getNextNonSpaceNonCommentCharacter`
+... | diff --git a/tests/integration/__tests__/util-shared.js b/tests/integration/__tests__/util-shared.js
index af0d90e69f50..a88f8209b8b4 100644
--- a/tests/integration/__tests__/util-shared.js
+++ b/tests/integration/__tests__/util-shared.js
@@ -21,6 +21,7 @@ test("shared util has correct structure", () => {
expect(typ... | Utility functions requests
Is there any reason why `getNextNonSpaceNonCommentCharacterIndex` is in the public API but `getNextNonSpaceNonCommentCharacter` isn't? it's a one liner we could do without in [prettier-plugin-solidity](https://github.com/prettier-solidity/prettier-plugin-solidity).
Also, `hasNodeIgnoreComm... | null | 2023-02-09 07:10:21+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi
RUN . $NVM_DIR/nvm.sh && nvm alias default 20.16.0 && nvm use default
| ['/testbed/tests/integration/__tests__/util-shared.js->sharedUtil.getIndentSize', '/testbed/tests/integration/__tests__/util-shared.js->sharedUtil.makeString', '/testbed/tests/integration/__tests__/util-shared.js->sharedUtil.getMaxContinuousCount', '/testbed/tests/integration/__tests__/util-shared.js->sharedUtil.getAli... | ['/testbed/tests/integration/__tests__/util-shared.js->shared util has correct structure', '/testbed/tests/integration/__tests__/util-shared.js->sharedUtil.getNextNonSpaceNonCommentCharacter and sharedUtil.getNextNonSpaceNonCommentCharacterIndex'] | [] | . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && yarn test tests/integration/__tests__/util-shared.js --json | Feature | false | true | false | false | 3 | 0 | 3 | false | false | ["src/common/util.js->program->function_declaration:getNextNonSpaceNonCommentCharacter", "src/common/util-shared.js->program->function_declaration:getNextNonSpaceNonCommentCharacterIndex", "src/common/util-shared.js->program->function_declaration:legacyGetNextNonSpaceNonCommentCharacterIndex"] |
prettier/prettier | 14,108 | prettier__prettier-14108 | ['8581'] | 2f72344944384d28c6d00523febf03f294108e2c | diff --git a/changelog_unreleased/api/14108.md b/changelog_unreleased/api/14108.md
new file mode 100644
index 000000000000..4e19695a73ec
--- /dev/null
+++ b/changelog_unreleased/api/14108.md
@@ -0,0 +1,3 @@
+#### [BREAKING] `getFileInfo()` resolves config by default (#14108 by @fisker)
+
+`options.resolveConfig` defaul... | diff --git a/tests/integration/__tests__/file-info.js b/tests/integration/__tests__/file-info.js
index 6b517d216f04..8d08f7058546 100644
--- a/tests/integration/__tests__/file-info.js
+++ b/tests/integration/__tests__/file-info.js
@@ -159,11 +159,11 @@ describe("API getFileInfo resolveConfig", () => {
test("{resolve... | `getFileInfo()` should try to resolve config by default
[`getFileInfo()`](https://prettier.io/docs/en/api.html#prettiergetfileinfofilepath--options) returns `ignored` and `inferredParser`, it accepts a `resolveConfig` option, it's default to `false`, I think it's more reasonable to set default to `true`, or even remove... | Agreed. I set this to true always in the VS Code extension. https://github.com/prettier/prettier-vscode/blob/main/src/PrettierEditService.ts#L262
Should we consider this bugfix or breaking change?
The current default value is in the [docs](https://prettier.io/docs/en/api.html#prettiergetfileinfofilepath--options):
>... | 2023-01-04 09:28:07+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi
RUN . $NVM_DIR/nvm.sh && nvm alias default 20.16.0 && nvm use default
| ['/testbed/tests/integration/__tests__/file-info.js->API getFileInfo with plugins loaded using pluginSearchDir', '/testbed/tests/integration/__tests__/file-info.js->(status)', '/testbed/tests/integration/__tests__/file-info.js->extracts file-info for a JS file with no extension but a standard shebang', '/testbed/tests/... | ['/testbed/tests/integration/__tests__/file-info.js->{resolveConfig: undefined}'] | [] | . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && yarn test tests/integration/__tests__/file-info.js --json | Feature | false | true | false | false | 1 | 0 | 1 | true | false | ["src/common/get-file-info.js->program->function_declaration:getParser"] |
prettier/prettier | 13,268 | prettier__prettier-13268 | ['10156'] | 503045c050ab7e31e3e361fbd8debd6059dc5e61 | diff --git a/changelog_unreleased/api/11830.md b/changelog_unreleased/api/11830.md
index 40e361aed582..a79b80c1cf3d 100644
--- a/changelog_unreleased/api/11830.md
+++ b/changelog_unreleased/api/11830.md
@@ -1,3 +1,3 @@
-#### [Breaking] Drop support for Node.js 10 and 12 (#11830 by @fisker, #13118 by @sosukesuzuki)
+###... | diff --git a/tests/integration/__tests__/parser-api.js b/tests/integration/__tests__/parser-api.js
new file mode 100644
index 000000000000..dbf17c8f7aac
--- /dev/null
+++ b/tests/integration/__tests__/parser-api.js
@@ -0,0 +1,51 @@
+import prettier from "../../config/prettier-entry.js";
+
+const createParsePlugin = (na... | Remove 2nd argument pass to `Plugin.parse` function
https://github.com/prettier/prettier/blob/9786ce2fb628ac4ad3ed5088fd8f7c66a93d9c17/src/language-js/parser-babel.js#L110
The 2nd parameter, seems not very useful, but I'm not sure if plugins uses it, but plugin can always load other plugin by themself.
I think w... | Any thought on this?
If we still want keep it, maybe we should change it to a Proxy?
https://github.com/prettier/prettier/blob/e096ea7552c2aaec1883c7fdde4bd9f5283301bd/src/main/parser.js#L61-L74
@thorn0 @sosukesuzuki In case you missed.
Why make it a proxy?
Cheaper? We don't need map all keys.
I think we can remov... | 2022-08-10 12:32:03+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi
RUN . $NVM_DIR/nvm.sh && nvm alias default 20.16.0 && nvm use default
| ['/testbed/tests/unit/resolve-parser.js->resolveParser should not trigger the plugin.parsers getters'] | ['/testbed/tests/integration/__tests__/parser-api.js->parsers should allow omit optional arguments'] | [] | . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && yarn test tests/integration/__tests__/parser-api.js tests/unit/resolve-parser.js --json | Refactoring | false | true | false | false | 20 | 0 | 20 | false | false | ["src/language-html/parser-html.js->program->function_declaration:createParser", "src/language-css/parser-postcss.js->program->function_declaration:parseNestedCSS", "src/language-graphql/parser-graphql.js->program->function_declaration:parse", "src/language-js/parse/espree.js->program->function_declaration:parse", "src... |
prettier/prettier | 11,920 | prettier__prettier-11920 | ['11918'] | a42d6f934e856533b77fb577f9cb9fd83641f336 | diff --git a/changelog_unreleased/scss/11920.md b/changelog_unreleased/scss/11920.md
new file mode 100644
index 000000000000..e7d220ae42a3
--- /dev/null
+++ b/changelog_unreleased/scss/11920.md
@@ -0,0 +1,36 @@
+#### Fix comments inside map (#11920 by @fisker)
+
+<!-- prettier-ignore -->
+```scss
+// Input
+.ag-theme-b... | diff --git a/tests/format/scss/at-rule/__snapshots__/jsfmt.spec.js.snap b/tests/format/scss/at-rule/__snapshots__/jsfmt.spec.js.snap
new file mode 100644
index 000000000000..6de356b0d5ce
--- /dev/null
+++ b/tests/format/scss/at-rule/__snapshots__/jsfmt.spec.js.snap
@@ -0,0 +1,30 @@
+// Jest Snapshot v1, https://goo.gl/... | [SCSS] comments in Map-value mixin arguments break the code
**Prettier 2.5.0**
[Playground link](https://prettier.io/playground/#N4Igxg9gdgLgprEAuEA6AhgcwLQwBZwC2c2ARugDZ7qEAEwAOlLS7QAICWUYFArgCZxaWXAWJlK1QgAomrebVnMFKgGYQATnEwaIvKP2yQKmpLQAkYXgGcYEQtnVadeg0YgmNAGjkqF-Dmt0Ugo4QydtXX1DY1NaKF4KCi9aAHpU2gAVAHkAEWzaa3shSE... | #8566 Seems the one breaks it. | 2021-12-03 12:55:11+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi
RUN . $NVM_DIR/nvm.sh && nvm alias default 20.16.0 && nvm use default
| [] | ['/testbed/tests/format/scss/at-rule/jsfmt.spec.js->at-rule-with-comments.scss format'] | [] | . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && yarn test tests/format/scss/at-rule/jsfmt.spec.js tests/format/scss/at-rule/at-rule-with-comments.scss tests/format/scss/at-rule/__snapshots__/jsfmt.spec.js.snap tests/format/scss/scss/arbitrary-arguments-comment.scss tests/format/scs... | Bug Fix | false | true | false | false | 2 | 0 | 2 | false | false | ["src/language-css/clean.js->program->function_declaration:clean", "src/language-css/parser-postcss.js->program->function_declaration:parseNestedCSS"] |
prettier/prettier | 11,637 | prettier__prettier-11637 | ['11635'] | 5909f5b3f191a0a32f759e1f4378477d3b90e28e | diff --git a/changelog_unreleased/scss/11637.md b/changelog_unreleased/scss/11637.md
new file mode 100644
index 000000000000..424a5534787b
--- /dev/null
+++ b/changelog_unreleased/scss/11637.md
@@ -0,0 +1,21 @@
+#### Improve `with (...)` formatting (#11637 by @sosukesuzuki)
+
+<!-- prettier-ignore -->
+```scss
+// Inpu... | diff --git a/tests/format/scss/configuration/__snapshots__/jsfmt.spec.js.snap b/tests/format/scss/configuration/__snapshots__/jsfmt.spec.js.snap
new file mode 100644
index 000000000000..2acdbfd02d9d
--- /dev/null
+++ b/tests/format/scss/configuration/__snapshots__/jsfmt.spec.js.snap
@@ -0,0 +1,94 @@
+// Jest Snapshot v... | Weird wrapping for SCSS @use rules
<!--
BEFORE SUBMITTING AN ISSUE:
1. Search for your issue on GitHub: https://github.com/prettier/prettier/issues
A large number of opened issues are duplicates of existing issues.
If someone has already opened an issue for what you are experiencing,
you do not ne... | hm, both looks good...
I think the indent should not be there @alexander-akait
But it is also inconsistent with the SCSS map wrapping which does not wrap the opening parentheses to the next line | 2021-10-08 14:58:13+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi
RUN . $NVM_DIR/nvm.sh && nvm alias default 20.16.0 && nvm use default
| [] | ['/testbed/tests/format/scss/configuration/jsfmt.spec.js->use.scss - {"trailingComma":"none"} format', '/testbed/tests/format/scss/configuration/jsfmt.spec.js->use.scss format'] | [] | . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && yarn test tests/format/scss/configuration/jsfmt.spec.js tests/format/scss/configuration/__snapshots__/jsfmt.spec.js.snap tests/format/scss/quotes/__snapshots__/jsfmt.spec.js.snap tests/format/scss/configuration/use.scss --json | Bug Fix | false | true | false | false | 2 | 0 | 2 | false | false | ["src/language-css/printer-postcss.js->program->function_declaration:genericPrint", "src/language-css/utils.js->program->function_declaration:isConfigurationNode"] |
prettier/prettier | 10,910 | prettier__prettier-10910 | ['10406'] | a3466f771fbcc1838ff93dfd32d21d2a34061b9b | diff --git a/src/language-js/clean.js b/src/language-js/clean.js
index 903988eb6f72..cd67b0e35a22 100644
--- a/src/language-js/clean.js
+++ b/src/language-js/clean.js
@@ -46,6 +46,9 @@ function clean(ast, newObj, parent) {
if (ast.type === "DecimalLiteral") {
newObj.value = Number(newObj.value);
}
+ if (ast... | diff --git a/tests/config/format-test.js b/tests/config/format-test.js
index 492b150a4617..06b5204c2b21 100644
--- a/tests/config/format-test.js
+++ b/tests/config/format-test.js
@@ -186,6 +186,10 @@ function runSpec(fixtures, parsers, options) {
allParsers.push("meriyah");
}
}
+
+ if (parsers.i... | Proposal: Add `__babel-estree` parser
The [`@babel/eslint-parser`](https://github.com/babel/babel/tree/main/eslint/babel-eslint-parser) generate a different shape of AST.
I propose add this private parser to valid that we can also print this AST, so maybe we can really skip parsing in `eslint-plugin-pretter` someday... | null | 2021-05-18 07:56:52+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi
RUN . $NVM_DIR/nvm.sh && nvm alias default 20.16.0 && nvm use default
| ['/testbed/tests/format/js/tuple/jsfmt.spec.js->invalid-tuple-holes.js [meriyah] format', '/testbed/tests/format/typescript/typeparams/consistent/jsfmt.spec.js->flow-only.ts [flow] format', '/testbed/tests/format/flow/comments/jsfmt.spec.js->union.js format', '/testbed/tests/format/flow/comments/jsfmt.spec.js->arrow.js... | ['/testbed/tests/format/js/tuple/jsfmt.spec.js->invalid-tuple-holes.js [__babel_estree] format', '/testbed/tests/format/js/call/invalid/jsfmt.spec.js->null-arguments-item.js [__babel_estree] format'] | [] | . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && yarn test tests/format/js/tuple/__snapshots__/jsfmt.spec.js.snap tests/format/typescript/typeparams/consistent/jsfmt.spec.js tests/format/js/call/invalid/jsfmt.spec.js tests/format/js/tuple/jsfmt.spec.js tests/format/flow/comments/__s... | Feature | false | true | false | false | 12 | 0 | 12 | false | false | ["src/language-js/clean.js->program->function_declaration:clean", "src/language-js/index.js->program->method_definition:__babel_estree", "src/language-js/utils.js->program->function_declaration:getCallArguments", "src/language-js/print/literal.js->program->function_declaration:printLiteral", "src/language-js/comments.j... |
prettier/prettier | 10,901 | prettier__prettier-10901 | ['10857'] | a3466f771fbcc1838ff93dfd32d21d2a34061b9b | diff --git a/changelog_unreleased/typescript/10901.md b/changelog_unreleased/typescript/10901.md
new file mode 100644
index 000000000000..4ab300e845e9
--- /dev/null
+++ b/changelog_unreleased/typescript/10901.md
@@ -0,0 +1,33 @@
+#### Break the LHS of type alias that has complex type parameters (#10901 by @sosukesusuzk... | diff --git a/tests/format/flow/type-alias/__snapshots__/jsfmt.spec.js.snap b/tests/format/flow/type-alias/__snapshots__/jsfmt.spec.js.snap
new file mode 100644
index 000000000000..34530f271b4f
--- /dev/null
+++ b/tests/format/flow/type-alias/__snapshots__/jsfmt.spec.js.snap
@@ -0,0 +1,76 @@
+// Jest Snapshot v1, https:... | Ugly formatting for complex type parameters
**Prettier 2.3.0**
[Playground link](https://prettier.io/playground/#N4Igxg9gdgLgprEAuEMCeAHOACAYgSzgBsATAGQEM0IBXGAdXxgAsAeAHSm2wBVs4AHvCgkAztlEwATvigBzADSduAZX5CEY7DSgBrKBADuXALzZg2Q-hIskE6bLnYAvpwB82M8GXZ0WOzwA3D6QJHB2kjLywVwS+ABe4dgqMc4xIAogEBgw+NCiyKAUUlJGAArFCAUoFESGVA... | null | 2021-05-16 15:13:38+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi
RUN . $NVM_DIR/nvm.sh && nvm alias default 20.16.0 && nvm use default
| ['/testbed/tests/format/flow/type-alias/jsfmt.spec.js->issue-100857.js [babel-flow] format'] | ['/testbed/tests/format/flow/type-alias/jsfmt.spec.js->issue-100857.js format'] | [] | . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && yarn test tests/format/typescript/type-alias/issue-100857.ts tests/format/flow/type-alias/issue-100857.js tests/format/flow/type-alias/__snapshots__/jsfmt.spec.js.snap tests/format/flow/type-alias/jsfmt.spec.js tests/format/typescript... | Bug Fix | false | true | false | false | 4 | 0 | 4 | false | false | ["src/language-js/print/assignment.js->program->function_declaration:isTypeAlias", "src/language-js/print/assignment.js->program->function_declaration:isComplexTypeAliasParams", "src/language-js/print/assignment.js->program->function_declaration:chooseLayout", "src/language-js/print/assignment.js->program->function_dec... |
prettier/prettier | 10,109 | prettier__prettier-10109 | ['3662'] | 63a771db55bcf5d81478e1cd593964118cb26f69 | diff --git a/changelog_unreleased/typescript/10109.md b/changelog_unreleased/typescript/10109.md
new file mode 100644
index 000000000000..1a54cb3b3ee0
--- /dev/null
+++ b/changelog_unreleased/typescript/10109.md
@@ -0,0 +1,43 @@
+#### Print trailing commas for TS type parameters (#10109 by @sosukesuzuki)
+
+Initially, ... | diff --git a/tests/typescript/trailing-comma/__snapshots__/jsfmt.spec.js.snap b/tests/typescript/trailing-comma/__snapshots__/jsfmt.spec.js.snap
index 2728bc25f3df..3fe0b32a0ee9 100644
--- a/tests/typescript/trailing-comma/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/typescript/trailing-comma/__snapshots__/jsfmt.spec.j... | Trailing commas for type parameters in TypeScript
**Prettier 1.9.2**
~~I would paste a playground link but no TypeScript support ;)~~ I'm silly: [Playground link](https://prettier.io/playground/#N4Igxg9gdgLgprEAuEMCeAHOACAKnAWwwBsBDeAIQEsoATGgc2wF4AdKbT7AH2wEEMJOPiJlKNelAbsuPbBVJRFpESXJxqdRjK68AwqQBOhiDFVi4AOQi047AN... | Prettier rolls in it's own copy of the TypeScript parser, and we don't detect the version of TypeScript at all. Does trailing commas in the case even add any value? It's not like you ever have a large list of type parameters where diffing is a problem?
It's not a problem, just a convenience. I would prefer having them ... | 2021-01-23 04:38:24+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi
RUN . $NVM_DIR/nvm.sh && nvm alias default 20.16.0 && nvm use default
| ['/testbed/tests/typescript/trailing-comma/jsfmt.spec.js->arrow-functions.tsx - {"trailingComma":"none"} format', '/testbed/tests/typescript/trailing-comma/jsfmt.spec.js->arrow-functions.tsx - {"trailingComma":"all"} format', '/testbed/tests/typescript/trailing-comma/jsfmt.spec.js->arrow-functions.tsx - {"trailingComma... | ['/testbed/tests/typescript/trailing-comma/jsfmt.spec.js->trailing.ts - {"trailingComma":"all"} format', '/testbed/tests/typescript/trailing-comma/jsfmt.spec.js->type-parameters.ts - {"trailingComma":"all"} format'] | [] | . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && yarn test tests/typescript/trailing-comma/arrow-functions.tsx tests/typescript/trailing-comma/type-parameters.ts tests/typescript/trailing-comma/jsfmt.spec.js tests/typescript/trailing-comma/__snapshots__/jsfmt.spec.js.snap --json | Feature | false | true | false | false | 2 | 0 | 2 | false | false | ["src/language-js/print/type-parameters.js->program->function_declaration:printTypeParameters", "src/language-js/print/type-parameters.js->program->function_declaration:printTypeParameter"] |
prettier/prettier | 10,065 | prettier__prettier-10065 | ['10047'] | c5300fa0ca071e6a9b3038efdb9d1ed26671ecba | diff --git a/changelog_unreleased/javascript/9787.md b/changelog_unreleased/javascript/9787.md
index 8a8c45ee4537..e24fb76a2fe9 100644
--- a/changelog_unreleased/javascript/9787.md
+++ b/changelog_unreleased/javascript/9787.md
@@ -1,4 +1,4 @@
-#### Print null items in arguments (#9787 by @sosukesuzuki)
+#### Disable Ba... | diff --git a/tests/js/call/invalid/__snapshots__/jsfmt.spec.js.snap b/tests/js/call/invalid/__snapshots__/jsfmt.spec.js.snap
new file mode 100644
index 000000000000..23947f3ac266
--- /dev/null
+++ b/tests/js/call/invalid/__snapshots__/jsfmt.spec.js.snap
@@ -0,0 +1,28 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+ex... | incorrect handling of function calls with missing arguments
<!--
BEFORE SUBMITTING AN ISSUE:
1. Search for your issue on GitHub: https://github.com/prettier/prettier/issues
A large number of opened issues are duplicates of existing issues.
If someone has already opened an issue for what you are experie... | Supporting these cases of error recovery seems to be useless maintenance burden. Let's just rethrow Babel's errors in these cases and call it a day.
My apologies for the confusion, I reported multiple cases that I think we should take a look at. I have now updated the description to be hopefully more clear.
Case 1a ... | 2021-01-16 14:22:35+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi
RUN . $NVM_DIR/nvm.sh && nvm alias default 20.16.0 && nvm use default
| ['/testbed/tests/js/call/invalid/jsfmt.spec.js->null-arguments-item.js [meriyah] format', '/testbed/tests/js/call/invalid/jsfmt.spec.js->null-arguments-item.js [espree] format'] | ['/testbed/tests/js/call/invalid/jsfmt.spec.js->null-arguments-item.js [babel] format'] | [] | . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && yarn test tests/js/call/invalid/null-arguments-item.js /dev/null tests/js/call/invalid/jsfmt.spec.js --json | Bug Fix | false | true | false | false | 1 | 0 | 1 | true | false | ["src/language-js/utils.js->program->function_declaration:isFunctionCompositionArgs"] |
prettier/prettier | 8,675 | prettier__prettier-8675 | ['8674'] | 44dedd94b5e41ec6fb703e8e124e0aa96b6f6f56 | diff --git a/changelog_unreleased/scss/pr-8675.md b/changelog_unreleased/scss/pr-8675.md
new file mode 100644
index 000000000000..971493fa4ae6
--- /dev/null
+++ b/changelog_unreleased/scss/pr-8675.md
@@ -0,0 +1,31 @@
+#### Comments at the end of the file were lost if the final semicolon was omitted ([#8675](https://git... | diff --git a/tests/css/no-semicolon/__snapshots__/jsfmt.spec.js.snap b/tests/css/no-semicolon/__snapshots__/jsfmt.spec.js.snap
new file mode 100644
index 000000000000..66ed9d0386de
--- /dev/null
+++ b/tests/css/no-semicolon/__snapshots__/jsfmt.spec.js.snap
@@ -0,0 +1,17 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
... | SCSS: unexpected format
**Prettier 2.0.5**
[Playground link](https://prettier.io/playground/#N4Igxg9gdgLgprEAuEABAlgWwA4QE4wAEArngDpSGEA2AFAPT0Bm0MAzgHQDmEEX1cAIbZ0nSJnpg2bAPxNBmdNQCeAXgDy2BAGoAyoKhskAFgAMpgDRnT6GIOrowASgDcICyAjYY6aG2Sggnh4EADuAApBCP4o9qGCyv4eAEZ4gmAA1nAwutjp6FBcyDB4xHAeABYwmNQA6hW2cGx5YHC60bboAG62ysj... | Found a valid SCSS case
**Prettier 2.0.5**
[Playground link](https://prettier.io/playground/#N4Igxg9gdgLgprEAuEABAtgSwB6agAgDMIIAKASn2AB0D8BDK2-F-SAGwgCcl8BiQgE5BAbmb4AvrSlRaqPGHYBXACZwiJCvgD0AKjYR06BDF3aQAGhAQADjEzQAzslD0uXCAHcACm4TOUenZPegBPZysAIy56MABrOBgAZRtYvABzZBguJTgrAAsYdHYAdXzMeEdUsDgk-wrMADcK0ORwRwiQPEc4L... | 2020-06-30 11:47:45+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi
RUN . $NVM_DIR/nvm.sh && nvm alias default 20.16.0 && nvm use default
| ['/testbed/tests/less/no-semicolon/jsfmt.spec.js->url.less format', '/testbed/tests/css/no-semicolon/jsfmt.spec.js->url.css format'] | ['/testbed/tests/scss/no-semicolon/jsfmt.spec.js->include-2.scss format', '/testbed/tests/scss/no-semicolon/jsfmt.spec.js->include.scss format', '/testbed/tests/scss/no-semicolon/jsfmt.spec.js->url.scss format'] | [] | . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && yarn test tests/scss/no-semicolon/include-2.scss tests/less/no-semicolon/jsfmt.spec.js tests/scss/no-semicolon/include.scss tests/css/no-semicolon/__snapshots__/jsfmt.spec.js.snap tests/css/no-semicolon/url.css tests/scss/no-semicolon... | Bug Fix | false | true | false | false | 2 | 0 | 2 | false | false | ["src/language-css/printer-postcss.js->program->function_declaration:genericPrint", "src/language-css/clean.js->program->function_declaration:clean"] |
prettier/prettier | 8,465 | prettier__prettier-8465 | ['6298'] | 11d0f4203e1bfbe4d75aa028dbb19f9ed05a5e1d | diff --git a/changelog_unreleased/vue/pr-8023.md b/changelog_unreleased/vue/pr-8023.md
index 894a9312454f..0d3500ab5e89 100644
--- a/changelog_unreleased/vue/pr-8023.md
+++ b/changelog_unreleased/vue/pr-8023.md
@@ -1,27 +1,36 @@
-#### Support custom blocks ([#8023](https://github.com/prettier/prettier/pull/8023) by [@s... | diff --git a/tests/vue/custom_block/__snapshots__/jsfmt.spec.js.snap b/tests/vue/custom_block/__snapshots__/jsfmt.spec.js.snap
index 0c0471e930cc..80e2b4bb4d50 100644
--- a/tests/vue/custom_block/__snapshots__/jsfmt.spec.js.snap
+++ b/tests/vue/custom_block/__snapshots__/jsfmt.spec.js.snap
@@ -128,16 +128,16 @@ query {... | Pug plugin doesn't work for the .vue files
<!--
BEFORE SUBMITTING AN ISSUE:
1. Search for your issue on GitHub: https://github.com/prettier/prettier/issues
A large number of opened issues are duplicates of existing issues.
If someone has already opened an issue for what you are experiencing,
you d... | We think that it is not a problem of my plugin since the embedded pug in markdown works well.
Looks problem what vue printer should looks in plugins and run them for content inside (if plugin exists), i think it is feature
👋, @prettier/core team! I may have found a hint for people wanting to use `@prettier/plugin-pug`... | 2020-06-01 04:47:34+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi
RUN . $NVM_DIR/nvm.sh && nvm alias default 20.16.0 && nvm use default
| ['/testbed/tests/vue/with-plugins/jsfmt.spec.js->template-lang.vue - {"embeddedLanguageFormatting":"off"} format', '/testbed/tests/vue/with-plugins/jsfmt.spec.js->inline.vue - {"embeddedLanguageFormatting":"off"} format', '/testbed/tests/vue/with-plugins/jsfmt.spec.js->script-lang.vue format', '/testbed/tests/vue/with-... | ['/testbed/tests/vue/with-plugins/jsfmt.spec.js->template-lang.vue format', '/testbed/tests/vue/with-plugins/jsfmt.spec.js->whitspace.vue format', '/testbed/tests/vue/with-plugins/jsfmt.spec.js->inline.vue format', '/testbed/tests/vue/with-plugins/jsfmt.spec.js->custom-block-lang.vue format'] | [] | . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && yarn test tests/vue/with-plugins/script-lang.vue tests_config/utils/stringify-options-for-title.js tests/vue/with-plugins/style-lang.vue tests/vue/with-plugins/template-lang.vue tests_config/prettier-plugins/prettier-plugin-uppercase-... | Feature | false | true | false | false | 9 | 0 | 9 | false | false | ["src/language-html/printer-html.js->program->function_declaration:embed", "src/language-html/printer-html.js->program->function_declaration:genericPrint", "src/language-html/printer-html.js->program->function_declaration:printChildren->function_declaration:printChild", "src/language-html/utils.js->program->function_de... |
prettier/prettier | 8,381 | prettier__prettier-8381 | ['8380'] | 8718bb4be44f6fd1aed8fcf91717f38931643dd7 | diff --git a/changelog_unreleased/html/pr-8381.md b/changelog_unreleased/html/pr-8381.md
new file mode 100644
index 000000000000..edca15ddab18
--- /dev/null
+++ b/changelog_unreleased/html/pr-8381.md
@@ -0,0 +1,31 @@
+#### Support front matter with dynamic language ([#8381](https://github.com/prettier/prettier/pull/838... | diff --git a/tests/css/front-matter/__snapshots__/jsfmt.spec.js.snap b/tests/css/front-matter/__snapshots__/jsfmt.spec.js.snap
new file mode 100644
index 000000000000..2b4909fe2c93
--- /dev/null
+++ b/tests/css/front-matter/__snapshots__/jsfmt.spec.js.snap
@@ -0,0 +1,28 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
... | Initial front matter signal (---) with extra text appended breaks formatting
<!--
BEFORE SUBMITTING AN ISSUE:
1. Search for your issue on GitHub: https://github.com/prettier/prettier/issues
A large number of opened issues are duplicates of existing issues.
If someone has already opened an issue for wha... | null | 2020-05-22 04:47:37+00:00 | JavaScript | FROM polybench_javascript_base
WORKDIR /testbed
COPY . .
RUN . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && rm -rf node_modules && if [ -f yarn.lock ]; then yarn install; else npm install --force; fi
RUN . $NVM_DIR/nvm.sh && nvm alias default 20.16.0 && nvm use default
| ['/testbed/tests/css/front-matter/jsfmt.spec.js->custom-parser.css verify (less)', '/testbed/tests/css/front-matter/jsfmt.spec.js->custom-parser.css verify (scss)'] | ['/testbed/tests/css/front-matter/jsfmt.spec.js->custom-parser.css format', '/testbed/tests/html/front-matter/jsfmt.spec.js->custom-parser.html format', '/testbed/tests/markdown/front-matter/jsfmt.spec.js->custom-parser.md format'] | [] | . /usr/local/nvm/nvm.sh && nvm use 20.16.0 && npm pkg set scripts.lint="echo noop" && yarn test tests/markdown/front-matter/custom-parser.md tests/css/front-matter/jsfmt.spec.js tests/html/front-matter/__snapshots__/jsfmt.spec.js.snap tests/html/front-matter/custom-parser.html tests/css/front-matter/custom-parser.css t... | Feature | false | true | false | false | 13 | 0 | 13 | false | false | ["src/language-html/printer-html.js->program->function_declaration:embed", "src/language-css/printer-postcss.js->program->function_declaration:printNodeSequence", "src/language-css/clean.js->program->function_declaration:clean", "src/language-html/printer-html.js->program->function_declaration:genericPrint", "src/langu... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.