Skip to content

Commit

Permalink
fix: upgrade to lit 2.0.0-rc.2 (#11365)
Browse files Browse the repository at this point in the history
(Not really a fix but marked as such to be visible in the release notes.)
  • Loading branch information
Artur- committed Jun 30, 2021
1 parent 3123cfd commit e68f2fe
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ static Map<String, String> getDefaultDependencies() {

defaults.put("@polymer/polymer", POLYMER_VERSION);

defaults.put("lit", "2.0.0-rc.1");
defaults.put("lit", "2.0.0-rc.2");

// Constructable style sheets is only implemented for chrome,
// polyfill needed for FireFox et.al. at the moment
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ public class TaskRunPnpmInstallTest extends TaskRunNpmInstallTest {
public void setUp() throws IOException {
super.setUp();

// create an empty package.json so as pnpm can be run without error
// create an empty package.json so as pnpm can be run without
// error
FileUtils.write(new File(getNodeUpdater().npmFolder, PACKAGE_JSON),
"{}", StandardCharsets.UTF_8);
}
Expand All @@ -56,7 +57,8 @@ public void runPnpmInstall_overlayVersionIsPinnedViaPlatform_installedOverlayVer
File packageJson = new File(getNodeUpdater().npmFolder, PACKAGE_JSON);
packageJson.createNewFile();

// Write package json file: dialog doesn't pin its Overlay version which
// Write package json file: dialog doesn't pin its Overlay
// version which
// is transitive dependency.
FileUtils.write(packageJson,
"{\"dependencies\": {"
Expand All @@ -71,7 +73,8 @@ public void runPnpmInstall_overlayVersionIsPinnedViaPlatform_installedOverlayVer
File overlayPackageJson = new File(getNodeUpdater().nodeModulesFolder,
"@vaadin/vaadin-overlay/package.json");

// The resulting version should be the one specified via platform
// The resulting version should be the one specified via
// platform
// versions file
JsonObject overlayPackage = Json.parse(FileUtils
.readFileToString(overlayPackageJson, StandardCharsets.UTF_8));
Expand All @@ -86,7 +89,8 @@ public void runNpmInstall_toolIsChanged_nodeModulesIsRemoved()
File nodeModules = getNodeUpdater().nodeModulesFolder;
FileUtils.forceMkdir(nodeModules);

// create a fake file in the node modules dir to check that it's removed
// create a fake file in the node modules dir to check that it's
// removed
File fakeFile = new File(nodeModules, ".fake.file");
fakeFile.createNewFile();

Expand All @@ -103,7 +107,8 @@ public void runNpmInstall_toolIsNotChanged_nodeModulesIsNotRemoved()
File packageJson = new File(getNodeUpdater().npmFolder, PACKAGE_JSON);
packageJson.createNewFile();

// create some package.json file so pnpm does some installation into
// create some package.json file so pnpm does some installation
// into
// node_modules folder
FileUtils.write(packageJson,
"{\"dependencies\": {" + "\"pnpm\": \"5.15.1\"}}",
Expand All @@ -112,7 +117,8 @@ public void runNpmInstall_toolIsNotChanged_nodeModulesIsNotRemoved()
getNodeUpdater().modified = true;
createTask().execute();

// create a fake file in the node modules dir to check that it's removed
// create a fake file in the node modules dir to check that it's
// removed
File fakeFile = new File(getNodeUpdater().nodeModulesFolder,
".fake.file");
fakeFile.createNewFile();
Expand Down Expand Up @@ -461,7 +467,7 @@ public void generateVersionsJson_versionsGeneratedFromPackageJson_containsBothDe
"{"
+ "\"vaadin\": {"
+ "\"dependencies\": {"
+ "\"lit\": \"2.0.0-rc.1\","
+ "\"lit\": \"2.0.0-rc.2\","
+ "\"@vaadin/router\": \"1.7.4\","
+ "\"@polymer/polymer\": \"3.2.0\","
+ "},"
Expand All @@ -471,7 +477,7 @@ public void generateVersionsJson_versionsGeneratedFromPackageJson_containsBothDe
+ "}"
+ "},"
+ "\"dependencies\": {"
+ "\"lit\": \"2.0.0-rc.1\","
+ "\"lit\": \"2.0.0-rc.2\","
+ "\"@vaadin/router\": \"1.7.4\","
+ "\"@polymer/polymer\": \"3.2.0\","
+ "},"
Expand All @@ -492,7 +498,7 @@ public void generateVersionsJson_versionsGeneratedFromPackageJson_containsBothDe
final JsonObject versionsJson = Json.parse(FileUtils.readFileToString(
generatedVersionsFile, StandardCharsets.UTF_8));
Assert.assertEquals(
"{" + "\"lit\":\"2.0.0-rc.1\","
"{" + "\"lit\":\"2.0.0-rc.2\","
+ "\"@vaadin/router\":\"1.7.4\","
+ "\"@polymer/polymer\":\"3.2.0\","
+ "\"css-loader\":\"4.2.1\","
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@

@Tag("simple-lit-template-no-shadow-root")
@JsModule("lit-templates/simple-lit-template-no-shadow-root.js")
@NpmPackage(value = "lit", version = "2.0.0-rc.1")
@Route(value = "com.vaadin.flow.uitest.ui.littemplate.SimpleLitTemplateNoShadowRootView", layout = ViewTestLayout.class)
public class SimpleLitTemplateNoShadowRootView extends LitTemplate {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@

@Tag("simple-lit-template-shadow-root")
@JsModule("lit-templates/simple-lit-template-shadow-root.js")
@NpmPackage(value = "lit", version = "2.0.0-rc.1")
@Route(value = "com.vaadin.flow.uitest.ui.littemplate.SimpleLitTemplateShadowRootView", layout = ViewTestLayout.class)
public class SimpleLitTemplateShadowRootView extends LitTemplate {

Expand Down

0 comments on commit e68f2fe

Please sign in to comment.