Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions bin/rollup.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ function getRollupConfiguration({ packageRoot, inputFiles }) {
typescript({
filterRoot: '.',
tsconfig: path.join(__dirname, '..', 'tsconfig.json'),
noEmitOnError: true,
include: [
'src/**/*.ts',
// TODO: Remove for the next major release
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
"src/*/src/Bridge/*/assets"
],
"scripts": {
"build": "yarn workspaces foreach -Apt run build",
"test": "yarn workspaces foreach -Apt run test",
"build": "yarn workspaces foreach -Ap --topological-dev run build",
"test": "yarn workspaces foreach -Ap --topological-dev run test",
"check": "biome check",
"ci": "biome ci"
},
Expand Down
3 changes: 3 additions & 0 deletions src/Map/src/Bridge/Google/assets/dist/map_controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,9 @@ class map_controller extends default_1 {
libraries = ['core', ...libraries.filter((library) => library !== 'core')];
const librariesImplementations = await Promise.all(libraries.map((library) => loader.importLibrary(library)));
librariesImplementations.map((libraryImplementation, index) => {
if (typeof libraryImplementation !== 'object' || libraryImplementation === null) {
return;
}
const library = libraries[index];
if (['marker', 'places', 'geometry', 'journeySharing', 'drawing', 'visualization'].includes(library)) {
_google.maps[library] = libraryImplementation;
Expand Down
1 change: 1 addition & 0 deletions src/Map/src/Bridge/Google/assets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
"devDependencies": {
"@googlemaps/js-api-loader": "^1.16.6",
"@hotwired/stimulus": "^3.0.0",
"@symfony/ux-map": "workspace:*",
Copy link
Member Author

@Kocal Kocal Feb 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It has no impact on dist/ files, either for Webpack Encore or AssetMapper. Here we are telling Yarn that package @symfony/ux-map is a "parent" package of @symfony/ux-google-map, in order to fix the topological order (see https://yarnpkg.com/cli/workspaces/foreach)

"@types/google.maps": "^3.55.9"
}
}
7 changes: 6 additions & 1 deletion src/Map/src/Bridge/Google/assets/src/map_controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,16 @@ export default class extends AbstractMapController<
libraries.map((library) => loader.importLibrary(library))
);
librariesImplementations.map((libraryImplementation, index) => {
if (typeof libraryImplementation !== 'object' || libraryImplementation === null) {
return;
}

const library = libraries[index];

// The following libraries are in a sub-namespace
if (['marker', 'places', 'geometry', 'journeySharing', 'drawing', 'visualization'].includes(library)) {
_google.maps[library] = libraryImplementation;
// @ts-ignore
_google.maps[library] = libraryImplementation as any;
} else {
_google.maps = { ..._google.maps, ...libraryImplementation };
}
Expand Down
1 change: 1 addition & 0 deletions src/Map/src/Bridge/Leaflet/assets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
},
"devDependencies": {
"@hotwired/stimulus": "^3.0.0",
"@symfony/ux-map": "workspace:*",
"@types/leaflet": "^1.9.12",
"leaflet": "^1.9.4"
}
Expand Down
2 changes: 1 addition & 1 deletion src/Translator/assets/dist/formatters/formatter.d.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export declare function format(id: string, parameters: Record<string, string | number>, locale: string): string;
export declare function format(id: string, parameters: Record<string, string | number | Date>, locale: string): string;
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export declare function formatIntl(id: string, parameters: Record<string, string | number>, locale: string): string;
export declare function formatIntl(id: string, parameters: Record<string, string | number | Date>, locale: string): string;
2 changes: 1 addition & 1 deletion src/Translator/assets/dist/utils.d.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export declare function strtr(string: string, replacePairs: Record<string, string | number>): string;
export declare function strtr(string: string, replacePairs: Record<string, string | number | Date>): string;
2 changes: 1 addition & 1 deletion src/Translator/assets/src/formatters/formatter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ import { strtr } from '../utils';
* @param parameters An array of parameters for the message
* @param locale The locale
*/
export function format(id: string, parameters: Record<string, string | number>, locale: string): string {
export function format(id: string, parameters: Record<string, string | number | Date>, locale: string): string {
if (null === id || '' === id) {
return '';
}
Expand Down
4 changes: 2 additions & 2 deletions src/Translator/assets/src/formatters/intl-formatter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { IntlMessageFormat } from 'intl-messageformat';
* @param parameters An array of parameters for the message
* @param locale The locale
*/
export function formatIntl(id: string, parameters: Record<string, string | number>, locale: string): string {
export function formatIntl(id: string, parameters: Record<string, string | number | Date>, locale: string): string {
if (id === '') {
return '';
}
Expand All @@ -23,5 +23,5 @@ export function formatIntl(id: string, parameters: Record<string, string | numbe
}
});

return intlMessage.format(parameters);
return intlMessage.format(parameters) as string;
}
2 changes: 1 addition & 1 deletion src/Translator/assets/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @param string The string to replace in
* @param replacePairs The pairs of characters to replace
*/
export function strtr(string: string, replacePairs: Record<string, string | number>): string {
export function strtr(string: string, replacePairs: Record<string, string | number | Date>): string {
const regex: Array<string> = Object.entries(replacePairs).map(([from]) => {
return from.replace(/([-[\]{}()*+?.\\^$|#,])/g, '\\$1');
});
Expand Down
3 changes: 2 additions & 1 deletion src/Turbo/assets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
},
"devDependencies": {
"@hotwired/stimulus": "^3.0.0",
"@hotwired/turbo": "^7.1.0 || ^8.0"
"@hotwired/turbo": "^7.1.0 || ^8.0",
"@types/hotwired__turbo": "^8.0.4"
}
}
12 changes: 11 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2888,6 +2888,7 @@ __metadata:
dependencies:
"@googlemaps/js-api-loader": "npm:^1.16.6"
"@hotwired/stimulus": "npm:^3.0.0"
"@symfony/ux-map": "workspace:*"
"@types/google.maps": "npm:^3.55.9"
peerDependencies:
"@googlemaps/js-api-loader": ^1.16.6
Expand All @@ -2913,6 +2914,7 @@ __metadata:
resolution: "@symfony/ux-leaflet-map@workspace:src/Map/src/Bridge/Leaflet/assets"
dependencies:
"@hotwired/stimulus": "npm:^3.0.0"
"@symfony/ux-map": "workspace:*"
"@types/leaflet": "npm:^1.9.12"
leaflet: "npm:^1.9.4"
peerDependencies:
Expand All @@ -2939,7 +2941,7 @@ __metadata:
languageName: unknown
linkType: soft

"@symfony/ux-map@workspace:src/Map/assets":
"@symfony/ux-map@workspace:*, @symfony/ux-map@workspace:src/Map/assets":
version: 0.0.0-use.local
resolution: "@symfony/ux-map@workspace:src/Map/assets"
dependencies:
Expand Down Expand Up @@ -3040,6 +3042,7 @@ __metadata:
dependencies:
"@hotwired/stimulus": "npm:^3.0.0"
"@hotwired/turbo": "npm:^7.1.0 || ^8.0"
"@types/hotwired__turbo": "npm:^8.0.4"
peerDependencies:
"@hotwired/stimulus": ^3.0.0
"@hotwired/turbo": ^7.1.1 || ^8.0
Expand Down Expand Up @@ -3278,6 +3281,13 @@ __metadata:
languageName: node
linkType: hard

"@types/hotwired__turbo@npm:^8.0.4":
version: 8.0.4
resolution: "@types/hotwired__turbo@npm:8.0.4"
checksum: 10c0/87fb69ea0dab21fd2a6e3e6d18cdaf679e3d7c8ea1f6f2b59d05c24a96cf3faf80a4c0ce5f57161afea9b61f2cc542f9e33cbdc6475fc4003d79516a94cedb5c
languageName: node
linkType: hard

"@types/istanbul-lib-coverage@npm:*, @types/istanbul-lib-coverage@npm:^2.0.0, @types/istanbul-lib-coverage@npm:^2.0.1":
version: 2.0.4
resolution: "@types/istanbul-lib-coverage@npm:2.0.4"
Expand Down
Loading