Skip to content

Commit

Permalink
chore: remove redundant names from package json resources (#20239)(CP…
Browse files Browse the repository at this point in the history
…: 23.5) (#20274)

Co-authored-by: Anton Platonov <anton@vaadin.com>
  • Loading branch information
mshabarov and platosha authored Oct 18, 2024
1 parent 875e768 commit d1ecf56
Show file tree
Hide file tree
Showing 45 changed files with 144 additions and 117 deletions.
4 changes: 2 additions & 2 deletions flow-client/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion flow-client/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@vaadin/flow-deps",
"name": "@vaadin/flow-client",
"description": "Flow client package",
"version": "0.0.1",
"main": "src/main/resources/META-INF/frontend/Flow",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
{
"name": "flow-default-dependencies",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "Artur Signell",
"license": "Apache-2.0",
"private": true,
"description": "A list of default Flow dependencies",
"dependencies": {
"@polymer/polymer": "3.5.1",
"@vaadin/common-frontend": "0.0.18",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"name": "flow-vite-dependencies",
"version": "1.0.0",
"description": "",
"private": true,
"description": "A list of Vite Flow dependencies",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
{
"name": "flow-webpack-dependencies",
"version": "1.0.0",
"description": "",
"private": true,
"description": "A list of Webpack Flow dependencies",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "Artur Signell",
"license": "Apache-2.0",
"dependencies": {
},
"dependencies": {},
"devDependencies": {
"esbuild-loader": "2.19.0",
"html-webpack-plugin": "4.5.1",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "no-name",
"private": true,
"license": "UNLICENSED",
"dependencies": {
"@polymer/iron-list": "3.0.0",
Expand Down
2 changes: 1 addition & 1 deletion flow-server/src/test/resources/versions/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "no-name",
"private": true,
"license": "UNLICENSED",
"vaadin": {
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion flow-server/src/test/resources/versions/user_package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "no-name",
"private": true,
"license": "UNLICENSED",
"vaadin": {
"dependencies": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* See <https://vaadin.com/commercial-license-and-service-terms> for the full
* license.
*/
import '@testscope/all';
import '@vaadin/testscope-all';

import { Button } from '@testscope/button';
import { Button } from '@vaadin/testscope-button';
window.BundleButtonClass = Button;
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* See <https://vaadin.com/commercial-license-and-service-terms> for the full
* license.
*/
import '@testscope/all';
import '@vaadin/testscope-all';

import { Map } from '@testscope/map';
import { Map } from '@vaadin/testscope-map';
window.BundleMapClass = Map;
20 changes: 10 additions & 10 deletions flow-tests/test-frontend/vite-basics/package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"name": "no-name",
"private": true,
"license": "UNLICENSED",
"scripts": {
"postinstall": "node -e \"fs.writeFileSync('target/classes/main.postinstall', 'hello')\""
},
"dependencies": {
"@polymer/polymer": "3.5.1",
"@testscope/all": "../vite-test-assets/packages/@testscope/all",
"@testscope/button": "../vite-test-assets/packages/@testscope/button",
"@testscope/map": "../vite-test-assets/packages/@testscope/map",
"@vaadin/testscope-all": "../vite-test-assets/packages/@vaadin/testscope-all",
"@vaadin/testscope-button": "../vite-test-assets/packages/@vaadin/testscope-button",
"@vaadin/testscope-map": "../vite-test-assets/packages/@vaadin/testscope-map",
"@vaadin/bundles": "../vite-test-assets/packages/@vaadin/bundles",
"@vaadin/common-frontend": "0.0.18",
"@vaadin/polymer-legacy-adapter": "23.3.0-alpha2",
Expand All @@ -19,8 +19,8 @@
"construct-style-sheets-polyfill": "3.1.0",
"copy-to-clipboard": "^3.3.1",
"lit": "2.6.1",
"package-outside-npm": "file:package-outside-npm",
"package2-outside-npm": "./package2-outside-npm"
"@vaadin/test-package-outside-npm": "file:../vite-test-assets/packages/@vaadin/test-package-outside-npm",
"@vaadin/test-package2-outside-npm": "../vite-test-assets/packages/@vaadin/test-package2-outside-npm"
},
"devDependencies": {
"@rollup/plugin-replace": "3.1.0",
Expand All @@ -39,12 +39,12 @@
"workbox-precaching": "6.5.4"
},
"overrides": {
"@testscope/all": "$@testscope/all",
"@testscope/button": "$@testscope/button",
"@vaadin/testscope-all": "$@vaadin/testscope-all",
"@vaadin/testscope-button": "$@vaadin/testscope-button",
"@vaadin/bundles": "$@vaadin/bundles",
"copy-to-clipboard": "$copy-to-clipboard",
"package-outside-npm": "$package-outside-npm",
"package2-outside-npm": "$package2-outside-npm",
"@vaadin/test-package-outside-npm": "$@vaadin/test-package-outside-npm",
"@vaadin/test-package2-outside-npm": "$@vaadin/test-package2-outside-npm",
"glob": "$glob",
"mkdirp": "$mkdirp",
"rollup-plugin-brotli": "$rollup-plugin-brotli",
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import '@vaadin/testscope-all';

import { Button } from '@vaadin/testscope-button';
window.BundleButtonClass = Button;
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import '@vaadin/testscope-all';

import { Map } from '@vaadin/testscope-map';
window.BundleMapClass = Map;
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@

@Route("")
@JsModule("./jsonloader.js")
@JsModule("package-outside-npm/index.js")
@JsModule("package2-outside-npm/index.js")
@JsModule("@vaadin/test-package-outside-npm/index.js")
@JsModule("@vaadin/test-package2-outside-npm/index.js")
@JsModule("./testscopebuttonloader.js")
@JsModule("./testscopemaploader.js")
@JsModule("./importdir.js")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ public void optimizeDepsExcludesBundles() {

@Test
public void optimizeDepsExcludeBundleContents() {
Assert.assertTrue(isExcluded("@testscope/all"));
Assert.assertTrue(isExcluded("@testscope/button"));
Assert.assertTrue(isExcluded("@testscope/map"));
Assert.assertTrue(isExcluded("@vaadin/testscope-all"));
Assert.assertTrue(isExcluded("@vaadin/testscope-button"));
Assert.assertTrue(isExcluded("@vaadin/testscope-map"));
}

private boolean isExcluded(String dependency) {
Expand Down
8 changes: 4 additions & 4 deletions flow-tests/test-frontend/vite-context-path/package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"name": "no-name",
"private": true,
"license": "UNLICENSED",
"dependencies": {
"@polymer/polymer": "3.5.1",
"@testscope/all": "../vite-test-assets/packages/@testscope/all",
"@testscope/button": "../vite-test-assets/packages/@testscope/button",
"@testscope/map": "../vite-test-assets/packages/@testscope/map",
"@vaadin/testscope-all": "../vite-test-assets/packages/@vaadin/testscope-all",
"@vaadin/testscope-button": "../vite-test-assets/packages/@vaadin/testscope-button",
"@vaadin/testscope-map": "../vite-test-assets/packages/@vaadin/testscope-map",
"@vaadin/bundles": "../vite-test-assets/packages/@vaadin/bundles-old",
"@vaadin/common-frontend": "0.0.18",
"@vaadin/polymer-legacy-adapter": "23.3.0-alpha2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import com.vaadin.flow.router.Route;

@Route("")
@JsModule("@testscope/all")
@JsModule("@vaadin/testscope-all")
public class MainView extends Div {
public MainView() {
add(new H2("Hello world!"), new HtmlComponent("testscope-button"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ public void bundlesIsNotUsedWhenHasVersionMismatch() {

@Test
public void optimizeDepsNotExcludeBundleContents() {
Assert.assertFalse(isExcluded("@testscope/all"));
Assert.assertFalse(isExcluded("@testscope/button"));
Assert.assertFalse(isExcluded("@vaadin/testscope-all"));
Assert.assertFalse(isExcluded("@vaadin/testscope-button"));
}

private boolean isExcluded(String dependency) {
Expand Down
8 changes: 4 additions & 4 deletions flow-tests/test-frontend/vite-production/package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"name": "no-name",
"private": true,
"license": "UNLICENSED",
"dependencies": {
"@polymer/polymer": "3.5.1",
"@testscope/all": "../vite-test-assets/packages/@testscope/all",
"@testscope/button": "../vite-test-assets/packages/@testscope/button",
"@testscope/map": "../vite-test-assets/packages/@testscope/map",
"@vaadin/testscope-all": "../vite-test-assets/packages/@vaadin/testscope-all",
"@vaadin/testscope-button": "../vite-test-assets/packages/@vaadin/testscope-button",
"@vaadin/testscope-map": "../vite-test-assets/packages/@vaadin/testscope-map",
"@vaadin/bundles": "../vite-test-assets/packages/@vaadin/bundles",
"@vaadin/common-frontend": "0.0.18",
"@vaadin/polymer-legacy-adapter": "23.3.0-alpha2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
import com.vaadin.flow.router.Route;

@Route("")
@JsModule("@testscope/button")
@JsModule("@testscope/map")
@JsModule("@vaadin/testscope-button")
@JsModule("@vaadin/testscope-map")
@JsModule("./lit-invalid-imports.ts")
@CssImport("./image.css")
public class MainView extends Div {
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@test/bundles",
"name": "@vaadin/bundles-old",
"version": "0.1.0",
"description": "",
"type": "module",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"packages": {
"@testscope/all": {
"@vaadin/testscope-all": {
"version": "0.1.0",
"exposes": {
"./all.js": {
Expand All @@ -9,19 +9,19 @@
".": {
"exports": [
{
"source": "@testscope/all/all.js"
"source": "@vaadin/testscope-all/all.js"
}
]
}
}
},
"@testscope/button": {
"@vaadin/testscope-button": {
"version": "1.0.0-alpha1",
"exposes": {
"./testscope-button.js": {
"exports": [
{
"source": "@testscope/button/src/testscope-button.js"
"source": "@vaadin/testscope-button/src/testscope-button.js"
}
]
},
Expand All @@ -33,19 +33,19 @@
".": {
"exports": [
{
"source": "@testscope/button/testscope-button.js"
"source": "@vaadin/testscope-button/testscope-button.js"
}
]
}
}
},
"@testscope/map": {
"@vaadin/testscope-map": {
"version": "1.0.0-alpha1",
"exposes": {
"./testscope-map.js": {
"exports": [
{
"source": "@testscope/map/src/testscope-map.js"
"source": "@vaadin/testscope-map/src/testscope-map.js"
}
]
},
Expand All @@ -62,7 +62,7 @@
".": {
"exports": [
{
"source": "@testscope/map/testscope-map.js"
"source": "@vaadin/testscope-map/testscope-map.js"
}
]
}
Expand Down
Loading

0 comments on commit d1ecf56

Please sign in to comment.