Skip to content

Commit

Permalink
minor #2595 Normalize package.json files, to prepare publication on N…
Browse files Browse the repository at this point in the history
…PM (Kocal)

This PR was squashed before being merged into the 2.x branch.

Discussion
----------

Normalize package.json files, to prepare publication on NPM

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| Issues        | Fix #... <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead -->
| License       | MIT

<!--
Replace this notice by a description of your feature/bugfix.
This will help reviewers and should be a good start for the documentation.

Additionally (see https://symfony.com/releases):
 - Always add tests and ensure they pass.
 - For new features, provide some code snippets to help understand usage.
 - Features and deprecations must be submitted against branch main.
 - Changelog entry should follow https://symfony.com/doc/current/contributing/code/conventions.html#writing-a-changelog-entry
 - Never break backward compatibility (see https://symfony.com/bc).
-->

This is a first iteration for #2575: rework our `package.json` files in order to make them more "friendly" and work on npm.

Next steps:
1. Add some verifications, to ensure PHP and JS versions of a same package are identical (and so 100% compatible)
2. See how we can deploy JS packages when creating a new UX releases. I'm thinking about a full automated process using the CI with a workflow listening on tag creation, which will be responsible to upgrade the `version` from `package.json` files, commit, push, and publish to npm)
3. Check if we need to manually create the packages on npm before trying to publishing them

Commits
-------

87bc2b8 Set Map/assets/packages.json private
68a0e8a Remove tree from repository URL in each package.json
bea8d4e Add README.md file for each UX packages assets
7162520 Add LICENSE file for each UX packages assets
4de9061 Normalize package.json files, to prepare publication on NPM
  • Loading branch information
Kocal committed Feb 28, 2025
2 parents 5c144e5 + 87bc2b8 commit ea891c8
Show file tree
Hide file tree
Showing 53 changed files with 735 additions and 25 deletions.
19 changes: 19 additions & 0 deletions src/Autocomplete/assets/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Copyright (c) 2020-present Fabien Potencier

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished
to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
12 changes: 12 additions & 0 deletions src/Autocomplete/assets/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# @symfony/ux-autocomplete

Javascript-powered auto-completion functionality for your Symfony forms!

**This package can't be used on its own, and requires the PHP package [symfony/ux-autocomplete](https://github.com/symfony/ux/tree/2.x/src/Autocomplete).**

## Resources

- [Documentation](https://symfony.com/bundles/ux-autocomplete/current/index.html)
- [Report issues](https://github.com/symfony/ux/issues) and
[send Pull Requests](https://github.com/symfony/ux/pulls)
in the [main Symfony UX repository](https://github.com/symfony/ux)
15 changes: 12 additions & 3 deletions src/Autocomplete/assets/package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,19 @@
{
"name": "@symfony/ux-autocomplete",
"description": "JavaScript-powered autocompletion functionality for forms.",
"description": "JavaScript Autocomplete functionality for Symfony",
"license": "MIT",
"version": "2.23.0",
"keywords": [
"symfony-ux"
],
"homepage": "https://ux.symfony.com/autocomplete",
"repository": "https://github.com/symfony/ux-autocomplete",
"type": "module",
"files": [
"dist"
],
"main": "dist/controller.js",
"types": "dist/controller.d.ts",
"version": "1.0.0",
"license": "MIT",
"scripts": {
"build": "node ../../../bin/build_package.js .",
"watch": "node ../../../bin/build_package.js . --watch",
Expand Down
19 changes: 19 additions & 0 deletions src/Chartjs/assets/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Copyright (c) 2020-present Fabien Potencier

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished
to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
12 changes: 12 additions & 0 deletions src/Chartjs/assets/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# @symfony/ux-chartjs

Chart.js integration for Symfony.

**This package can't be used on its own, and requires the PHP package [symfony/ux-chartjs](https://github.com/symfony/ux/tree/2.x/src/Chartjs).**

## Resources

- [Documentation](https://symfony.com/bundles/ux-autocomplete/current/index.html)
- [Report issues](https://github.com/symfony/ux/issues) and
[send Pull Requests](https://github.com/symfony/ux/pulls)
in the [main Symfony UX repository](https://github.com/symfony/ux)
10 changes: 9 additions & 1 deletion src/Chartjs/assets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,16 @@
"name": "@symfony/ux-chartjs",
"description": "Chart.js integration for Symfony",
"license": "MIT",
"version": "1.1.0",
"version": "2.23.0",
"keywords": [
"symfony-ux"
],
"homepage": "https://ux.symfony.com/chartjs",
"repository": "https://github.com/symfony/ux-chartjs",
"type": "module",
"files": [
"dist"
],
"main": "dist/controller.js",
"types": "dist/controller.d.ts",
"scripts": {
Expand Down
19 changes: 19 additions & 0 deletions src/Cropperjs/assets/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Copyright (c) 2020-present Fabien Potencier

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished
to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
12 changes: 12 additions & 0 deletions src/Cropperjs/assets/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# @symfony/ux-cropperjs

Cropper.js integration for Symfony.

**This package can't be used on its own, and requires the PHP package [symfony/ux-cropperjs](https://github.com/symfony/ux/tree/2.x/src/Cropperjs).**

## Resources

- [Documentation](https://symfony.com/bundles/ux-autocomplete/current/index.html)
- [Report issues](https://github.com/symfony/ux/issues) and
[send Pull Requests](https://github.com/symfony/ux/pulls)
in the [main Symfony UX repository](https://github.com/symfony/ux)
11 changes: 10 additions & 1 deletion src/Cropperjs/assets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,16 @@
"name": "@symfony/ux-cropperjs",
"description": "Cropper.js integration for Symfony",
"license": "MIT",
"version": "1.1.0",
"version": "2.23.0",
"keywords": [
"symfony-ux"
],
"homepage": "https://ux.symfony.com/cropperjs",
"repository": "https://github.com/symfony/ux-cropperjs",
"type": "module",
"files": [
"dist"
],
"main": "dist/controller.js",
"types": "dist/controller.d.ts",
"config": {
Expand Down
19 changes: 19 additions & 0 deletions src/Dropzone/assets/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Copyright (c) 2020-present Fabien Potencier

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished
to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
12 changes: 12 additions & 0 deletions src/Dropzone/assets/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# @symfony/ux-dropzone

File input dropzones for Symfony Forms.

**This package can't be used on its own, and requires the PHP package [symfony/ux-dropzone](https://github.com/symfony/ux/tree/2.x/src/Dropzone).**

## Resources

- [Documentation](https://symfony.com/bundles/ux-autocomplete/current/index.html)
- [Report issues](https://github.com/symfony/ux/issues) and
[send Pull Requests](https://github.com/symfony/ux/pulls)
in the [main Symfony UX repository](https://github.com/symfony/ux)
11 changes: 10 additions & 1 deletion src/Dropzone/assets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,16 @@
"name": "@symfony/ux-dropzone",
"description": "File input dropzones for Symfony Forms",
"license": "MIT",
"version": "1.1.0",
"version": "2.23.0",
"keywords": [
"symfony-ux"
],
"homepage": "https://ux.symfony.com/dropzone",
"repository": "https://github.com/symfony/ux-dropzone",
"type": "module",
"files": [
"dist"
],
"main": "dist/controller.js",
"types": "dist/controller.d.ts",
"config": {
Expand Down
19 changes: 19 additions & 0 deletions src/LazyImage/assets/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Copyright (c) 2020-present Fabien Potencier

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished
to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
12 changes: 12 additions & 0 deletions src/LazyImage/assets/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# @symfony/ux-lazy-image

Lazy image loader and utilities for Symfony.

**This package can't be used on its own, and requires the PHP package [symfony/ux-lazy-image](https://github.com/symfony/ux/tree/2.x/src/LazyImage).**

## Resources

- [Documentation](https://symfony.com/bundles/ux-autocomplete/current/index.html)
- [Report issues](https://github.com/symfony/ux/issues) and
[send Pull Requests](https://github.com/symfony/ux/pulls)
in the [main Symfony UX repository](https://github.com/symfony/ux)
11 changes: 10 additions & 1 deletion src/LazyImage/assets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,16 @@
"name": "@symfony/ux-lazy-image",
"description": "Lazy image loader and utilities for Symfony",
"license": "MIT",
"version": "1.1.0",
"version": "2.23.0",
"keywords": [
"symfony-ux"
],
"homepage": "https://ux.symfony.com/lazy-image",
"repository": "https://github.com/symfony/ux-lazy-image",
"type": "module",
"files": [
"dist"
],
"main": "dist/controller.js",
"types": "dist/controller.d.ts",
"scripts": {
Expand Down
21 changes: 21 additions & 0 deletions src/LiveComponent/assets/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2021-present Fabien Potencier

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished
to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
12 changes: 12 additions & 0 deletions src/LiveComponent/assets/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# @symfony/ux-live-component

Live Component: bring server-side re-rendering & model binding to any element.

**This package can't be used on its own, and requires the PHP package [symfony/ux-live-component](https://github.com/symfony/ux/tree/2.x/src/LiveComponent).**

## Resources

- [Documentation](https://symfony.com/bundles/ux-autocomplete/current/index.html)
- [Report issues](https://github.com/symfony/ux/issues) and
[send Pull Requests](https://github.com/symfony/ux/pulls)
in the [main Symfony UX repository](https://github.com/symfony/ux)
15 changes: 13 additions & 2 deletions src/LiveComponent/assets/package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,24 @@
{
"name": "@symfony/ux-live-component",
"description": "Live Component: bring server-side re-rendering & model binding to any element.",
"license": "MIT",
"version": "2.23.0",
"keywords": [
"symfony-ux",
"twig",
"components"
],
"homepage": "https://ux.symfony.com/live-component",
"repository": "https://github.com/symfony/ux-live-component",
"type": "module",
"files": [
"dist"
],
"main": "dist/live_controller.js",
"types": "dist/live_controller.d.ts",
"version": "1.0.0",
"config": {
"css_source": "styles/live.css"
},
"license": "MIT",
"scripts": {
"build": "node ../../../bin/build_package.js .",
"watch": "node ../../../bin/build_package.js . --watch",
Expand Down
19 changes: 19 additions & 0 deletions src/Map/assets/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Copyright (c) 2024-present Fabien Potencier

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished
to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
12 changes: 12 additions & 0 deletions src/Map/assets/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# @symfony/ux-map

Easily embed interactive maps in your Symfony application.

**This package can't be used on its own, and requires the PHP package [symfony/ux-map](https://github.com/symfony/ux/tree/2.x/src/Map).**

## Resources

- [Documentation](https://symfony.com/bundles/ux-autocomplete/current/index.html)
- [Report issues](https://github.com/symfony/ux/issues) and
[send Pull Requests](https://github.com/symfony/ux/pulls)
in the [main Symfony UX repository](https://github.com/symfony/ux)
16 changes: 14 additions & 2 deletions src/Map/assets/package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,21 @@
{
"name": "@symfony/ux-map",
"description": "Integrates interactive maps in your Symfony applications",
"description": "Easily embed interactive maps in your Symfony application.",
"private": true,
"license": "MIT",
"version": "1.0.0",
"version": "2.23.0",
"keywords": [
"symfony-ux",
"map",
"markers",
"maps"
],
"homepage": "https://ux.symfony.com/map",
"repository": "https://github.com/symfony/ux-map",
"type": "module",
"files": [
"dist"
],
"main": "dist/abstract_map_controller.js",
"types": "dist/abstract_map_controller.d.ts",
"scripts": {
Expand Down
12 changes: 11 additions & 1 deletion src/Map/src/Bridge/Google/assets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,18 @@
"name": "@symfony/ux-google-map",
"description": "GoogleMaps bridge for Symfony UX Map, integrate interactive maps in your Symfony applications",
"license": "MIT",
"version": "1.0.0",
"version": "2.23.0",
"keywords": [
"symfony-ux",
"google-maps",
"map"
],
"homepage": "https://ux.symfony.com/map",
"repository": "https://github.com/symfony/ux-google-map",
"type": "module",
"files": [
"dist"
],
"main": "dist/map_controller.js",
"types": "dist/map_controller.d.ts",
"scripts": {
Expand Down
Loading

0 comments on commit ea891c8

Please sign in to comment.