Skip to content

Commit

Permalink
test: fix tests by manually adding vaadin-core-versions.json instead …
Browse files Browse the repository at this point in the history
…of reusing from platform
  • Loading branch information
manolo committed Jan 31, 2024
1 parent a1483aa commit f38be61
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 8 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ packages/java/hilla-react/*.json
packages/java/hilla/src/main/java/com/vaadin/hilla/theme/
packages/java/hilla-react/src/main/java/com/vaadin/hilla/theme/

packages/**/resources/vaadin-core-versions.json

# npm pack
packages/ts/*/*.tgz

Expand Down
13 changes: 11 additions & 2 deletions scripts/prepare/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,20 @@ export const remote = {

export const destination = {
lit: {
versions: new URL('packages/java/hilla/hilla-versions.json', root),
versions: [
new URL('packages/java/hilla/hilla-versions.json', root),
new URL('packages/java/tests/spring/security/src/main/resources/vaadin-core-versions.json', root),
new URL('packages/java/tests/spring/security-contextpath/src/main/resources/vaadin-core-versions.json', root),
new URL('packages/java/tests/spring/security-jwt/src/main/resources/vaadin-core-versions.json', root),
new URL('packages/java/tests/spring/security-urlmapping/src/main/resources/vaadin-core-versions.json', root),
],
themeDir: new URL('packages/java/hilla/src/main/java/com/vaadin/hilla/theme/', root),
},
react: {
versions: new URL('packages/java/hilla-react/hilla-react-versions.json', root),
versions: [
new URL('packages/java/hilla-react/hilla-react-versions.json', root),
new URL('packages/java/tests/spring/react-grid-test/src/main/resources/vaadin-core-versions.json', root),
],
themeDir: new URL('packages/java/hilla-react/src/main/java/com/vaadin/hilla/theme/', root),
},
};
11 changes: 5 additions & 6 deletions scripts/prepare/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,11 @@ generate(version, versions);
console.log('Moving the generated files to the final place.');

await Promise.all([
copyFile(new URL('hilla-versions.json', local.results), destination.lit.versions).then(() =>
console.log(`Moved ${destination.lit.versions.toString()}`),
),
copyFile(new URL('hilla-react-versions.json', local.results), destination.react.versions).then(() =>
console.log(`Moved ${destination.react.versions.toString()}`),
),
destination.lit.versions.forEach(
file => copyFile(new URL('hilla-versions.json', local.results), file)
.then(() => console.log(`Copied ${file.toString()}`))),
destination.react.versions.forEach(file => copyFile(new URL('hilla-react-versions.json', local.results), file)
.then(() => console.log(`Copied ${file.toString()}`))),
]);

const themeAnnotationsPattern = /.*(JsModule|NpmPackage).*\n/gmu;
Expand Down

0 comments on commit f38be61

Please sign in to comment.