Commit 8f1ba3c05c0 for woocommerce
commit 8f1ba3c05c0875d7d98662090438e20cc40289c1
Author: Ján Mikláš <neosinner@gmail.com>
Date: Tue Nov 17 16:49:17 2026 +0100
Add shared WooCommerce extension tooling (#71040)
* Add shared Woo extension tooling
* Add extension tooling changelog entry
diff --git a/packages/js/extension-tooling/LICENSE b/packages/js/extension-tooling/LICENSE
new file mode 100644
index 00000000000..f288702d2fa
--- /dev/null
+++ b/packages/js/extension-tooling/LICENSE
@@ -0,0 +1,674 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+ The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works. By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users. We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors. You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+ To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights. Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received. You must make sure that they, too, receive
+or can get the source code. And you must show them these terms so they
+know their rights.
+
+ Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+ For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software. For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+ Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so. This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software. The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable. Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products. If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+ Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary. To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ TERMS AND CONDITIONS
+
+ 0. Definitions.
+
+ "This License" refers to version 3 of the GNU General Public License.
+
+ "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+ "The Program" refers to any copyrightable work licensed under this
+License. Each licensee is addressed as "you". "Licensees" and
+"recipients" may be individuals or organizations.
+
+ To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy. The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+ A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+ To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy. Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+ To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies. Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+ An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License. If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+ 1. Source Code.
+
+ The "source code" for a work means the preferred form of the work
+for making modifications to it. "Object code" means any non-source
+form of a work.
+
+ A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+ The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form. A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+ The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities. However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work. For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+ The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+ The Corresponding Source for a work in source code form is that
+same work.
+
+ 2. Basic Permissions.
+
+ All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met. This License explicitly affirms your unlimited
+permission to run the unmodified Program. The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work. This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+ You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force. You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright. Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+ Conveying under any other circumstances is permitted solely under
+the conditions stated below. Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+ No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+ When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+ 4. Conveying Verbatim Copies.
+
+ You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+ You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+ 5. Conveying Modified Source Versions.
+
+ You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+ a) The work must carry prominent notices stating that you modified
+ it, and giving a relevant date.
+
+ b) The work must carry prominent notices stating that it is
+ released under this License and any conditions added under section
+ 7. This requirement modifies the requirement in section 4 to
+ "keep intact all notices".
+
+ c) You must license the entire work, as a whole, under this
+ License to anyone who comes into possession of a copy. This
+ License will therefore apply, along with any applicable section 7
+ additional terms, to the whole of the work, and all its parts,
+ regardless of how they are packaged. This License gives no
+ permission to license the work in any other way, but it does not
+ invalidate such permission if you have separately received it.
+
+ d) If the work has interactive user interfaces, each must display
+ Appropriate Legal Notices; however, if the Program has interactive
+ interfaces that do not display Appropriate Legal Notices, your
+ work need not make them do so.
+
+ A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit. Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+ 6. Conveying Non-Source Forms.
+
+ You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+ a) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by the
+ Corresponding Source fixed on a durable physical medium
+ customarily used for software interchange.
+
+ b) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by a
+ written offer, valid for at least three years and valid for as
+ long as you offer spare parts or customer support for that product
+ model, to give anyone who possesses the object code either (1) a
+ copy of the Corresponding Source for all the software in the
+ product that is covered by this License, on a durable physical
+ medium customarily used for software interchange, for a price no
+ more than your reasonable cost of physically performing this
+ conveying of source, or (2) access to copy the
+ Corresponding Source from a network server at no charge.
+
+ c) Convey individual copies of the object code with a copy of the
+ written offer to provide the Corresponding Source. This
+ alternative is allowed only occasionally and noncommercially, and
+ only if you received the object code with such an offer, in accord
+ with subsection 6b.
+
+ d) Convey the object code by offering access from a designated
+ place (gratis or for a charge), and offer equivalent access to the
+ Corresponding Source in the same way through the same place at no
+ further charge. You need not require recipients to copy the
+ Corresponding Source along with the object code. If the place to
+ copy the object code is a network server, the Corresponding Source
+ may be on a different server (operated by you or a third party)
+ that supports equivalent copying facilities, provided you maintain
+ clear directions next to the object code saying where to find the
+ Corresponding Source. Regardless of what server hosts the
+ Corresponding Source, you remain obligated to ensure that it is
+ available for as long as needed to satisfy these requirements.
+
+ e) Convey the object code using peer-to-peer transmission, provided
+ you inform other peers where the object code and Corresponding
+ Source of the work are being offered to the general public at no
+ charge under subsection 6d.
+
+ A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+ A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling. In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage. For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product. A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+ "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source. The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+ If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information. But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+ The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed. Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+ Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+ 7. Additional Terms.
+
+ "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law. If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+ When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it. (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.) You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+ Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+ a) Disclaiming warranty or limiting liability differently from the
+ terms of sections 15 and 16 of this License; or
+
+ b) Requiring preservation of specified reasonable legal notices or
+ author attributions in that material or in the Appropriate Legal
+ Notices displayed by works containing it; or
+
+ c) Prohibiting misrepresentation of the origin of that material, or
+ requiring that modified versions of such material be marked in
+ reasonable ways as different from the original version; or
+
+ d) Limiting the use for publicity purposes of names of licensors or
+ authors of the material; or
+
+ e) Declining to grant rights under trademark law for use of some
+ trade names, trademarks, or service marks; or
+
+ f) Requiring indemnification of licensors and authors of that
+ material by anyone who conveys the material (or modified versions of
+ it) with contractual assumptions of liability to the recipient, for
+ any liability that these contractual assumptions directly impose on
+ those licensors and authors.
+
+ All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10. If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term. If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+ If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+ Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+ 8. Termination.
+
+ You may not propagate or modify a covered work except as expressly
+provided under this License. Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+ However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+ Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+ Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License. If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+ 9. Acceptance Not Required for Having Copies.
+
+ You are not required to accept this License in order to receive or
+run a copy of the Program. Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance. However,
+nothing other than this License grants you permission to propagate or
+modify any covered work. These actions infringe copyright if you do
+not accept this License. Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+ 10. Automatic Licensing of Downstream Recipients.
+
+ Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License. You are not responsible
+for enforcing compliance by third parties with this License.
+
+ An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations. If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+ You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License. For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+ 11. Patents.
+
+ A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based. The
+work thus licensed is called the contributor's "contributor version".
+
+ A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version. For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+ Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+ In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement). To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+ If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients. "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+ If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+ A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License. You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+ Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+ 12. No Surrender of Others' Freedom.
+
+ If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all. For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+ 13. Use with the GNU Affero General Public License.
+
+ Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work. The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+ 14. Revised Versions of this License.
+
+ The Free Software Foundation may publish revised and/or new versions of
+the GNU General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Program specifies that a certain numbered version of the GNU General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation. If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+ If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+ Later license versions may give you additional or different
+permissions. However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+ 15. Disclaimer of Warranty.
+
+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. Limitation of Liability.
+
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+ 17. Interpretation of Sections 15 and 16.
+
+ If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <https://www.gnu.org/licenses/>.
+
+Also add information on how to contact you by electronic and paper mail.
+
+ If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:
+
+ <program> Copyright (C) <year> <name of author>
+ This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, your program's commands
+might be different; for a GUI interface, you would use an "about box".
+
+ You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL, see
+<https://www.gnu.org/licenses/>.
+
+ The GNU General Public License does not permit incorporating your program
+into proprietary programs. If your program is a subroutine library, you
+may consider it more useful to permit linking proprietary applications with
+the library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License. But first, please read
+<https://www.gnu.org/licenses/why-not-lgpl.html>.
diff --git a/packages/js/extension-tooling/README.md b/packages/js/extension-tooling/README.md
new file mode 100644
index 00000000000..458bb8db9d5
--- /dev/null
+++ b/packages/js/extension-tooling/README.md
@@ -0,0 +1,51 @@
+# WooCommerce extension tooling
+
+Install `@woocommerce/extension-tooling` as a development dependency in the extension.
+
+## Webpack
+
+Import the helpers from the extension's webpack configuration. Keep the entry paths, output paths and match patterns in that configuration.
+
+```js
+const includeScripts = require( '@woocommerce/extension-tooling/webpack-text-includes' );
+const minifyBundleCopies = require( '@woocommerce/extension-tooling/webpack-dist-minify' );
+```
+
+- `includeScripts( [ [ source, destination ] ] )` expands classic scripts that use `include( 'relative/file.js' );`. It emits the regular asset and a `.min.js` copy for the caller's webpack minimizer. Limit the minimizer to `.min.js` files, for example `new TerserPlugin( { test: /\.min\.js$/ } )`, to keep the regular asset readable. Each `include()` must be on its own line; the build fails on any other `include()` line.
+- `minifyBundleCopies( [ 'frontend/*.js' ] )` emits minified copies of matching bundles after dependency metadata is generated. It skips a bundle that already has a `.min.js` asset, such as an `includeScripts` destination.
+
+## Translation checks
+
+Call the helper from a file run by `node --test`. Pass the extension root and its text domain. The helper uses `vendor/bin/phpcs` and `tools/i18n.xml` in that root. Set `<arg name="ignore-annotations"/>` in the ruleset so annotation comments cannot bypass the translation checks.
+
+The helper checks that the ruleset rejects wrong text domains, using generated fixtures. It does not scan the extension's own files. Run `vendor/bin/phpcs --standard=tools/i18n.xml` on the extension source to check those.
+
+```js
+const path = require( 'node:path' );
+const checkI18n = require( '@woocommerce/extension-tooling/check-i18n' );
+
+checkI18n( {
+ root: path.resolve( __dirname, '..' ),
+ domain: 'your-extension',
+} );
+```
+
+## Test and development environments
+
+In the extension's `package.json`, use `woo-extension-env-start` for `env:test:start` and `woo-extension-env-dev-reset` for `env:dev:reset`. The extension supplies its existing `wp-env:test` and `env:dev:seed` scripts.
+
+Add this mapping alongside the extension's existing `wp-content/bin` mapping in `.wp-env.json`.
+
+```json
+{
+ "mappings": {
+ "./wp-content/woo-extension-tooling": "./node_modules/@woocommerce/extension-tooling/bin"
+ }
+}
+```
+
+Use `wp-env run cli bash wp-content/woo-extension-tooling/seed-dev.sh wp-content/bin/seed_dev_plugin.sh` for `env:dev:seed`. Pass the fixture hook's path inside the container. Include WooCommerce Gateway Dummy in the development site's plugin list to use the seeded dummy payment method.
+
+## License
+
+GPL-3.0-or-later. The helpers originated in WooCommerce Composite Products.
diff --git a/packages/js/extension-tooling/bin/env-dev-reset.sh b/packages/js/extension-tooling/bin/env-dev-reset.sh
new file mode 100755
index 00000000000..c4f29cfc293
--- /dev/null
+++ b/packages/js/extension-tooling/bin/env-dev-reset.sh
@@ -0,0 +1,22 @@
+#!/usr/bin/env bash
+
+# Wipes the development site (.wp-env.json) and seeds it again. Run it as `pnpm run env:dev:reset`.
+#
+# `wp-env reset` re-applies the configured port, so in a shell without WP_ENV_PORT exported it
+# would move a worktree's site back to the default port. Keep the port the site is running on.
+set -euo pipefail
+
+if [[ ! -f package.json ]]; then
+ echo 'No package.json here. Run this from the plugin root.' >&2
+ exit 1
+fi
+
+if [ -z "${WP_ENV_PORT:-}" ]; then
+ port=$(wp-env status --json 2>/dev/null | node -p 'JSON.parse(require("fs").readFileSync(0, "utf8")).ports?.development || ""' 2>/dev/null || true)
+ if [ -n "$port" ]; then
+ export WP_ENV_PORT="$port"
+ fi
+fi
+
+wp-env reset
+pnpm run env:dev:seed
diff --git a/packages/js/extension-tooling/bin/env-start.sh b/packages/js/extension-tooling/bin/env-start.sh
new file mode 100755
index 00000000000..da7bfe375a6
--- /dev/null
+++ b/packages/js/extension-tooling/bin/env-start.sh
@@ -0,0 +1,25 @@
+#!/usr/bin/env bash
+
+# Starts the wp-env tests site (.wp-env.test.json). The development site is `pnpm run env:dev:start`.
+# Extra arguments go to `wp-env start`.
+#
+# The tests site bind-mounts the git-ignored tests/_output/debug.log; Docker turns a missing
+# mount source into a directory, so create the file first.
+set -euo pipefail
+
+if [[ ! -f package.json ]]; then
+ echo 'No package.json here. Run this from the plugin root.' >&2
+ exit 1
+fi
+
+mkdir -p tests/_output
+rmdir tests/_output/debug.log 2>/dev/null || true
+touch tests/_output/debug.log
+
+# Installs that mounted a directory keep one at the mount point, and a file can't mount onto it.
+install_path=$(pnpm --silent run wp-env:test status --json 2>/dev/null | sed -n 's/.*"installPath": *"\([^"]*\)".*/\1/p' || true)
+if [ -n "$install_path" ]; then
+ rmdir "${install_path}/WordPress/wp-content/debug.log" 2>/dev/null || true
+fi
+
+pnpm run wp-env:test start "$@"
diff --git a/packages/js/extension-tooling/bin/seed-dev.sh b/packages/js/extension-tooling/bin/seed-dev.sh
new file mode 100644
index 00000000000..c028c53d6bc
--- /dev/null
+++ b/packages/js/extension-tooling/bin/seed-dev.sh
@@ -0,0 +1,90 @@
+#!/usr/bin/env bash
+#
+# Seeds the wp-env development site (localhost:$WP_ENV_PORT) with a browsable store: store
+# address, admin and customer addresses, payment, shipping, tax and WooCommerce's sample
+# products, then runs the supplied hook for the plugin's data.
+#
+# Runs inside the `cli` container via `pnpm run env:dev:seed`; `pnpm run env:dev:reset` wipes
+# the site and seeds again.
+#
+set -euo pipefail
+trap 'echo "Seeding failed; run pnpm run env:dev:reset to start over." >&2' ERR
+
+if [ "$(wp option get wp_env_dev_seeded 2>/dev/null || true)" = "yes" ]; then
+ echo "Development site is already seeded. Run 'pnpm run env:dev:reset' to start over."
+ exit 0
+fi
+
+if [[ $# -ne 1 || ! -r "$1" || ! -f "$1" ]]; then
+ echo 'Usage: seed-dev.sh <path to the plugin seed script in the container>' >&2
+ exit 1
+fi
+
+echo "Configuring the store..."
+# wp-env installs the themes in .wp-env.json but activates none.
+if wp theme is-installed storefront; then
+ wp theme activate storefront --quiet
+ wp option update storefront_nux_dismissed 1
+fi
+rm -rf .htaccess wp-content/debug.log # Older installs mounted these, leaving root-owned stubs.
+wp rewrite structure '/%postname%/'
+# WP-CLI cannot detect mod_rewrite in the container, so write WordPress's default rules itself.
+cat > .htaccess <<'HTACCESS'
+# BEGIN WordPress
+<IfModule mod_rewrite.c>
+RewriteEngine On
+RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
+RewriteBase /
+RewriteRule ^index\.php$ - [L]
+RewriteCond %{REQUEST_FILENAME} !-f
+RewriteCond %{REQUEST_FILENAME} !-d
+RewriteRule . /index.php [L]
+</IfModule>
+# END WordPress
+HTACCESS
+wp option update woocommerce_onboarding_profile --format=json '{"skipped":true}'
+wp option update woocommerce_coming_soon 'no'
+wp option update woocommerce_store_address '60 29th Street #343'
+wp option update woocommerce_store_city 'San Francisco'
+wp option update woocommerce_store_postcode '94110'
+wp option update woocommerce_default_country 'US:CA'
+wp option update woocommerce_default_customer_address 'geolocation'
+wp option update woocommerce_currency 'USD'
+wp option update woocommerce_currency_pos 'left'
+
+echo "Adding addresses and a customer..."
+address='"company":"Automattic","country":"US","address_1":"60 29th Street #343","city":"San Francisco","state":"CA","postcode":"94110","phone":"123456789"'
+wp wc customer update 1 --user=1 \
+ --billing="{\"first_name\":\"John\",\"last_name\":\"Doe\",${address},\"email\":\"admin@example.com\"}" \
+ --shipping="{\"first_name\":\"John\",\"last_name\":\"Doe\",${address}}"
+wp wc customer create --user=1 --email='customer@example.com' --username='customer' --password='password' \
+ --first_name='Jane' --last_name='Smith' \
+ --billing="{\"first_name\":\"Jane\",\"last_name\":\"Smith\",${address},\"email\":\"customer@example.com\"}" \
+ --shipping="{\"first_name\":\"Jane\",\"last_name\":\"Smith\",${address}}" --porcelain >/dev/null
+
+echo "Enabling payment, shipping and tax..."
+wp option update --format=json woocommerce_dummy_settings '{"enabled":"yes","title":"Dummy Payment","description":"The goods are yours. No money needed.","result":"success"}'
+zone=$(wp wc shipping_zone create --user=1 --name='United States (US)' --porcelain)
+wp db query "INSERT INTO $(wp db prefix)woocommerce_shipping_zone_locations (zone_id, location_code, location_type) VALUES (${zone}, 'US', 'country')"
+wp wc shipping_zone_method create "${zone}" --user=1 --method_id=flat_rate --enabled=true --settings='{"title":"Flat Rate","cost":"10"}' --porcelain >/dev/null
+wp wc shipping_zone_method create 0 --user=1 --method_id=flat_rate --enabled=true --settings='{"title":"Flat Rate","cost":"20"}' --porcelain >/dev/null
+wp option update woocommerce_calc_taxes 'yes'
+wp wc tax create --user=1 --rate=10 --class=standard --porcelain >/dev/null
+
+echo "Importing WooCommerce sample products..."
+wp plugin install wordpress-importer --activate --quiet
+# wp-env names the WooCommerce folder after its zip (e.g. woocommerce.latest-stable), so look it up by its main file.
+wc_dir="$(wp plugin path)/$(dirname "$(wp plugin list --field=file | grep '/woocommerce\.php$')")"
+wp import "${wc_dir}/sample-data/sample_products.xml" --authors=create --quiet
+
+# Plugin-specific products and fixtures.
+bash -- "$1"
+
+wp option update wp_env_dev_seeded 'yes'
+
+cat <<EOF
+
+Development site ready: $(wp option get home)
+ Admin: admin / password
+ Customer: customer / password
+EOF
diff --git a/packages/js/extension-tooling/changelog/wooprd-4103-extension-tooling b/packages/js/extension-tooling/changelog/wooprd-4103-extension-tooling
new file mode 100644
index 00000000000..2b508301bf1
--- /dev/null
+++ b/packages/js/extension-tooling/changelog/wooprd-4103-extension-tooling
@@ -0,0 +1,4 @@
+Significance: minor
+Type: add
+
+Add shared webpack, translation-check and wp-env helpers for WooCommerce extensions.
diff --git a/packages/js/extension-tooling/composer.json b/packages/js/extension-tooling/composer.json
new file mode 100644
index 00000000000..208f83e171f
--- /dev/null
+++ b/packages/js/extension-tooling/composer.json
@@ -0,0 +1,32 @@
+{
+ "name": "woocommerce/extension-tooling",
+ "description": "Development tooling for WooCommerce extensions",
+ "type": "library",
+ "license": "GPL-3.0-or-later",
+ "minimum-stability": "dev",
+ "require-dev": {
+ "automattic/jetpack-changelogger": "3.3.0"
+ },
+ "config": {
+ "platform": {
+ "php": "7.4"
+ }
+ },
+ "extra": {
+ "changelogger": {
+ "formatter": {
+ "filename": "../../../tools/changelogger/class-package-formatter.php"
+ },
+ "types": {
+ "fix": "Fixes an existing bug",
+ "add": "Adds functionality",
+ "update": "Update existing functionality",
+ "dev": "Development related task",
+ "tweak": "A minor adjustment to the codebase",
+ "performance": "Address performance issues",
+ "enhancement": "Improve existing functionality"
+ },
+ "changelog": "CHANGELOG.md"
+ }
+ }
+}
diff --git a/packages/js/extension-tooling/composer.lock b/packages/js/extension-tooling/composer.lock
new file mode 100644
index 00000000000..b2a63e1f68d
--- /dev/null
+++ b/packages/js/extension-tooling/composer.lock
@@ -0,0 +1,1084 @@
+{
+ "_readme": [
+ "This file locks the dependencies of your project to a known state",
+ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
+ "This file is @generated automatically"
+ ],
+ "content-hash": "ad7727f7111873b63abd706298ea0262",
+ "packages": [],
+ "packages-dev": [
+ {
+ "name": "automattic/jetpack-changelogger",
+ "version": "v3.3.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/Automattic/jetpack-changelogger.git",
+ "reference": "8f63c829b8d1b0d7b1d5de93510d78523ed18959"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/Automattic/jetpack-changelogger/zipball/8f63c829b8d1b0d7b1d5de93510d78523ed18959",
+ "reference": "8f63c829b8d1b0d7b1d5de93510d78523ed18959",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.6",
+ "symfony/console": "^3.4 || ^5.2 || ^6.0",
+ "symfony/process": "^3.4 || ^5.2 || ^6.0",
+ "wikimedia/at-ease": "^1.2 || ^2.0"
+ },
+ "require-dev": {
+ "wikimedia/testing-access-wrapper": "^1.0 || ^2.0",
+ "yoast/phpunit-polyfills": "1.0.4"
+ },
+ "bin": [
+ "bin/changelogger"
+ ],
+ "type": "project",
+ "extra": {
+ "autotagger": true,
+ "mirror-repo": "Automattic/jetpack-changelogger",
+ "branch-alias": {
+ "dev-trunk": "3.3.x-dev"
+ },
+ "changelogger": {
+ "link-template": "https://github.com/Automattic/jetpack-changelogger/compare/${old}...${new}"
+ },
+ "version-constants": {
+ "::VERSION": "src/Application.php"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Automattic\\Jetpack\\Changelog\\": "lib",
+ "Automattic\\Jetpack\\Changelogger\\": "src"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "GPL-2.0-or-later"
+ ],
+ "description": "Jetpack Changelogger tool. Allows for managing changelogs by dropping change files into a changelog directory with each PR.",
+ "support": {
+ "source": "https://github.com/Automattic/jetpack-changelogger/tree/v3.3.0"
+ },
+ "time": "2022-12-26T13:49:01+00:00"
+ },
+ {
+ "name": "psr/container",
+ "version": "1.x-dev",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/php-fig/container.git",
+ "reference": "513e0666f7216c7459170d56df27dfcefe1689ea"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/php-fig/container/zipball/513e0666f7216c7459170d56df27dfcefe1689ea",
+ "reference": "513e0666f7216c7459170d56df27dfcefe1689ea",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.4.0"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "Psr\\Container\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "PHP-FIG",
+ "homepage": "https://www.php-fig.org/"
+ }
+ ],
+ "description": "Common Container Interface (PHP FIG PSR-11)",
+ "homepage": "https://github.com/php-fig/container",
+ "keywords": [
+ "PSR-11",
+ "container",
+ "container-interface",
+ "container-interop",
+ "psr"
+ ],
+ "support": {
+ "issues": "https://github.com/php-fig/container/issues",
+ "source": "https://github.com/php-fig/container/tree/1.1.2"
+ },
+ "time": "2021-11-05T16:50:12+00:00"
+ },
+ {
+ "name": "symfony/console",
+ "version": "5.4.x-dev",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/console.git",
+ "reference": "c4ba980ca61a9eb18ee6bcc73f28e475852bb1ed"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/console/zipball/c4ba980ca61a9eb18ee6bcc73f28e475852bb1ed",
+ "reference": "c4ba980ca61a9eb18ee6bcc73f28e475852bb1ed",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.2.5",
+ "symfony/deprecation-contracts": "^2.1|^3",
+ "symfony/polyfill-mbstring": "~1.0",
+ "symfony/polyfill-php73": "^1.9",
+ "symfony/polyfill-php80": "^1.16",
+ "symfony/service-contracts": "^1.1|^2|^3",
+ "symfony/string": "^5.1|^6.0"
+ },
+ "conflict": {
+ "psr/log": ">=3",
+ "symfony/dependency-injection": "<4.4",
+ "symfony/dotenv": "<5.1",
+ "symfony/event-dispatcher": "<4.4",
+ "symfony/lock": "<4.4",
+ "symfony/process": "<4.4"
+ },
+ "provide": {
+ "psr/log-implementation": "1.0|2.0"
+ },
+ "require-dev": {
+ "psr/log": "^1|^2",
+ "symfony/config": "^4.4|^5.0|^6.0",
+ "symfony/dependency-injection": "^4.4|^5.0|^6.0",
+ "symfony/event-dispatcher": "^4.4|^5.0|^6.0",
+ "symfony/lock": "^4.4|^5.0|^6.0",
+ "symfony/process": "^4.4|^5.0|^6.0",
+ "symfony/var-dumper": "^4.4|^5.0|^6.0"
+ },
+ "suggest": {
+ "psr/log": "For using the console logger",
+ "symfony/event-dispatcher": "",
+ "symfony/lock": "",
+ "symfony/process": ""
+ },
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "Symfony\\Component\\Console\\": ""
+ },
+ "exclude-from-classmap": [
+ "/Tests/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Fabien Potencier",
+ "email": "fabien@symfony.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Eases the creation of beautiful and testable command line interfaces",
+ "homepage": "https://symfony.com",
+ "keywords": [
+ "cli",
+ "command-line",
+ "console",
+ "terminal"
+ ],
+ "support": {
+ "source": "https://github.com/symfony/console/tree/5.4"
+ },
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2024-11-06T11:30:55+00:00"
+ },
+ {
+ "name": "symfony/deprecation-contracts",
+ "version": "2.5.x-dev",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/deprecation-contracts.git",
+ "reference": "605389f2a7e5625f273b53960dc46aeaf9c62918"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/605389f2a7e5625f273b53960dc46aeaf9c62918",
+ "reference": "605389f2a7e5625f273b53960dc46aeaf9c62918",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.1"
+ },
+ "type": "library",
+ "extra": {
+ "thanks": {
+ "url": "https://github.com/symfony/contracts",
+ "name": "symfony/contracts"
+ },
+ "branch-alias": {
+ "dev-main": "2.5-dev"
+ }
+ },
+ "autoload": {
+ "files": [
+ "function.php"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Nicolas Grekas",
+ "email": "p@tchwork.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "A generic function and convention to trigger deprecation notices",
+ "homepage": "https://symfony.com",
+ "support": {
+ "source": "https://github.com/symfony/deprecation-contracts/tree/2.5"
+ },
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2024-09-25T14:11:13+00:00"
+ },
+ {
+ "name": "symfony/polyfill-ctype",
+ "version": "1.x-dev",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/polyfill-ctype.git",
+ "reference": "a3cc8b044a6ea513310cbd48ef7333b384945638"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/a3cc8b044a6ea513310cbd48ef7333b384945638",
+ "reference": "a3cc8b044a6ea513310cbd48ef7333b384945638",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.2"
+ },
+ "provide": {
+ "ext-ctype": "*"
+ },
+ "suggest": {
+ "ext-ctype": "For best performance"
+ },
+ "default-branch": true,
+ "type": "library",
+ "extra": {
+ "thanks": {
+ "url": "https://github.com/symfony/polyfill",
+ "name": "symfony/polyfill"
+ }
+ },
+ "autoload": {
+ "files": [
+ "bootstrap.php"
+ ],
+ "psr-4": {
+ "Symfony\\Polyfill\\Ctype\\": ""
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Gert de Pagter",
+ "email": "BackEndTea@gmail.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Symfony polyfill for ctype functions",
+ "homepage": "https://symfony.com",
+ "keywords": [
+ "compatibility",
+ "ctype",
+ "polyfill",
+ "portable"
+ ],
+ "support": {
+ "source": "https://github.com/symfony/polyfill-ctype/tree/v1.33.0"
+ },
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://github.com/nicolas-grekas",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2024-09-09T11:45:10+00:00"
+ },
+ {
+ "name": "symfony/polyfill-intl-grapheme",
+ "version": "1.x-dev",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/polyfill-intl-grapheme.git",
+ "reference": "380872130d3a5dd3ace2f4010d95125fde5d5c70"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/380872130d3a5dd3ace2f4010d95125fde5d5c70",
+ "reference": "380872130d3a5dd3ace2f4010d95125fde5d5c70",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.2"
+ },
+ "suggest": {
+ "ext-intl": "For best performance"
+ },
+ "default-branch": true,
+ "type": "library",
+ "extra": {
+ "thanks": {
+ "url": "https://github.com/symfony/polyfill",
+ "name": "symfony/polyfill"
+ }
+ },
+ "autoload": {
+ "files": [
+ "bootstrap.php"
+ ],
+ "psr-4": {
+ "Symfony\\Polyfill\\Intl\\Grapheme\\": ""
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Nicolas Grekas",
+ "email": "p@tchwork.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Symfony polyfill for intl's grapheme_* functions",
+ "homepage": "https://symfony.com",
+ "keywords": [
+ "compatibility",
+ "grapheme",
+ "intl",
+ "polyfill",
+ "portable",
+ "shim"
+ ],
+ "support": {
+ "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.33.0"
+ },
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://github.com/nicolas-grekas",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2025-06-27T09:58:17+00:00"
+ },
+ {
+ "name": "symfony/polyfill-intl-normalizer",
+ "version": "1.x-dev",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/polyfill-intl-normalizer.git",
+ "reference": "3833d7255cc303546435cb650316bff708a1c75c"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/3833d7255cc303546435cb650316bff708a1c75c",
+ "reference": "3833d7255cc303546435cb650316bff708a1c75c",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.2"
+ },
+ "suggest": {
+ "ext-intl": "For best performance"
+ },
+ "default-branch": true,
+ "type": "library",
+ "extra": {
+ "thanks": {
+ "url": "https://github.com/symfony/polyfill",
+ "name": "symfony/polyfill"
+ }
+ },
+ "autoload": {
+ "files": [
+ "bootstrap.php"
+ ],
+ "psr-4": {
+ "Symfony\\Polyfill\\Intl\\Normalizer\\": ""
+ },
+ "classmap": [
+ "Resources/stubs"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Nicolas Grekas",
+ "email": "p@tchwork.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Symfony polyfill for intl's Normalizer class and related functions",
+ "homepage": "https://symfony.com",
+ "keywords": [
+ "compatibility",
+ "intl",
+ "normalizer",
+ "polyfill",
+ "portable",
+ "shim"
+ ],
+ "support": {
+ "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.33.0"
+ },
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://github.com/nicolas-grekas",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2024-09-09T11:45:10+00:00"
+ },
+ {
+ "name": "symfony/polyfill-mbstring",
+ "version": "1.x-dev",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/polyfill-mbstring.git",
+ "reference": "6d857f4d76bd4b343eac26d6b539585d2bc56493"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/6d857f4d76bd4b343eac26d6b539585d2bc56493",
+ "reference": "6d857f4d76bd4b343eac26d6b539585d2bc56493",
+ "shasum": ""
+ },
+ "require": {
+ "ext-iconv": "*",
+ "php": ">=7.2"
+ },
+ "provide": {
+ "ext-mbstring": "*"
+ },
+ "suggest": {
+ "ext-mbstring": "For best performance"
+ },
+ "default-branch": true,
+ "type": "library",
+ "extra": {
+ "thanks": {
+ "url": "https://github.com/symfony/polyfill",
+ "name": "symfony/polyfill"
+ }
+ },
+ "autoload": {
+ "files": [
+ "bootstrap.php"
+ ],
+ "psr-4": {
+ "Symfony\\Polyfill\\Mbstring\\": ""
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Nicolas Grekas",
+ "email": "p@tchwork.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Symfony polyfill for the Mbstring extension",
+ "homepage": "https://symfony.com",
+ "keywords": [
+ "compatibility",
+ "mbstring",
+ "polyfill",
+ "portable",
+ "shim"
+ ],
+ "support": {
+ "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.33.0"
+ },
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://github.com/nicolas-grekas",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2024-12-23T08:48:59+00:00"
+ },
+ {
+ "name": "symfony/polyfill-php73",
+ "version": "1.x-dev",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/polyfill-php73.git",
+ "reference": "0f68c03565dcaaf25a890667542e8bd75fe7e5bb"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/0f68c03565dcaaf25a890667542e8bd75fe7e5bb",
+ "reference": "0f68c03565dcaaf25a890667542e8bd75fe7e5bb",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.2"
+ },
+ "default-branch": true,
+ "type": "library",
+ "extra": {
+ "thanks": {
+ "url": "https://github.com/symfony/polyfill",
+ "name": "symfony/polyfill"
+ }
+ },
+ "autoload": {
+ "files": [
+ "bootstrap.php"
+ ],
+ "psr-4": {
+ "Symfony\\Polyfill\\Php73\\": ""
+ },
+ "classmap": [
+ "Resources/stubs"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Nicolas Grekas",
+ "email": "p@tchwork.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions",
+ "homepage": "https://symfony.com",
+ "keywords": [
+ "compatibility",
+ "polyfill",
+ "portable",
+ "shim"
+ ],
+ "support": {
+ "source": "https://github.com/symfony/polyfill-php73/tree/v1.33.0"
+ },
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://github.com/nicolas-grekas",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2024-09-09T11:45:10+00:00"
+ },
+ {
+ "name": "symfony/polyfill-php80",
+ "version": "1.x-dev",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/polyfill-php80.git",
+ "reference": "0cc9dd0f17f61d8131e7df6b84bd344899fe2608"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/0cc9dd0f17f61d8131e7df6b84bd344899fe2608",
+ "reference": "0cc9dd0f17f61d8131e7df6b84bd344899fe2608",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.2"
+ },
+ "default-branch": true,
+ "type": "library",
+ "extra": {
+ "thanks": {
+ "url": "https://github.com/symfony/polyfill",
+ "name": "symfony/polyfill"
+ }
+ },
+ "autoload": {
+ "files": [
+ "bootstrap.php"
+ ],
+ "psr-4": {
+ "Symfony\\Polyfill\\Php80\\": ""
+ },
+ "classmap": [
+ "Resources/stubs"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Ion Bazan",
+ "email": "ion.bazan@gmail.com"
+ },
+ {
+ "name": "Nicolas Grekas",
+ "email": "p@tchwork.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions",
+ "homepage": "https://symfony.com",
+ "keywords": [
+ "compatibility",
+ "polyfill",
+ "portable",
+ "shim"
+ ],
+ "support": {
+ "source": "https://github.com/symfony/polyfill-php80/tree/v1.33.0"
+ },
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://github.com/nicolas-grekas",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2025-01-02T08:10:11+00:00"
+ },
+ {
+ "name": "symfony/process",
+ "version": "5.4.x-dev",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/process.git",
+ "reference": "5d1662fb32ebc94f17ddb8d635454a776066733d"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/process/zipball/5d1662fb32ebc94f17ddb8d635454a776066733d",
+ "reference": "5d1662fb32ebc94f17ddb8d635454a776066733d",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.2.5",
+ "symfony/polyfill-php80": "^1.16"
+ },
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "Symfony\\Component\\Process\\": ""
+ },
+ "exclude-from-classmap": [
+ "/Tests/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Fabien Potencier",
+ "email": "fabien@symfony.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Executes commands in sub-processes",
+ "homepage": "https://symfony.com",
+ "support": {
+ "source": "https://github.com/symfony/process/tree/5.4"
+ },
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2024-11-06T11:36:42+00:00"
+ },
+ {
+ "name": "symfony/service-contracts",
+ "version": "2.5.x-dev",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/service-contracts.git",
+ "reference": "f37b419f7aea2e9abf10abd261832cace12e3300"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/service-contracts/zipball/f37b419f7aea2e9abf10abd261832cace12e3300",
+ "reference": "f37b419f7aea2e9abf10abd261832cace12e3300",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.2.5",
+ "psr/container": "^1.1",
+ "symfony/deprecation-contracts": "^2.1|^3"
+ },
+ "conflict": {
+ "ext-psr": "<1.1|>=2"
+ },
+ "suggest": {
+ "symfony/service-implementation": ""
+ },
+ "type": "library",
+ "extra": {
+ "thanks": {
+ "url": "https://github.com/symfony/contracts",
+ "name": "symfony/contracts"
+ },
+ "branch-alias": {
+ "dev-main": "2.5-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Symfony\\Contracts\\Service\\": ""
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Nicolas Grekas",
+ "email": "p@tchwork.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Generic abstractions related to writing services",
+ "homepage": "https://symfony.com",
+ "keywords": [
+ "abstractions",
+ "contracts",
+ "decoupling",
+ "interfaces",
+ "interoperability",
+ "standards"
+ ],
+ "support": {
+ "source": "https://github.com/symfony/service-contracts/tree/2.5"
+ },
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2024-09-25T14:11:13+00:00"
+ },
+ {
+ "name": "symfony/string",
+ "version": "5.4.x-dev",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/string.git",
+ "reference": "136ca7d72f72b599f2631aca474a4f8e26719799"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/string/zipball/136ca7d72f72b599f2631aca474a4f8e26719799",
+ "reference": "136ca7d72f72b599f2631aca474a4f8e26719799",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.2.5",
+ "symfony/polyfill-ctype": "~1.8",
+ "symfony/polyfill-intl-grapheme": "~1.0",
+ "symfony/polyfill-intl-normalizer": "~1.0",
+ "symfony/polyfill-mbstring": "~1.0",
+ "symfony/polyfill-php80": "~1.15"
+ },
+ "conflict": {
+ "symfony/translation-contracts": ">=3.0"
+ },
+ "require-dev": {
+ "symfony/error-handler": "^4.4|^5.0|^6.0",
+ "symfony/http-client": "^4.4|^5.0|^6.0",
+ "symfony/translation-contracts": "^1.1|^2",
+ "symfony/var-exporter": "^4.4|^5.0|^6.0"
+ },
+ "type": "library",
+ "autoload": {
+ "files": [
+ "Resources/functions.php"
+ ],
+ "psr-4": {
+ "Symfony\\Component\\String\\": ""
+ },
+ "exclude-from-classmap": [
+ "/Tests/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Nicolas Grekas",
+ "email": "p@tchwork.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Provides an object-oriented API to strings and deals with bytes, UTF-8 code points and grapheme clusters in a unified way",
+ "homepage": "https://symfony.com",
+ "keywords": [
+ "grapheme",
+ "i18n",
+ "string",
+ "unicode",
+ "utf-8",
+ "utf8"
+ ],
+ "support": {
+ "source": "https://github.com/symfony/string/tree/5.4"
+ },
+ "funding": [
+ {
+ "url": "https://symfony.com/sponsor",
+ "type": "custom"
+ },
+ {
+ "url": "https://github.com/fabpot",
+ "type": "github"
+ },
+ {
+ "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
+ "type": "tidelift"
+ }
+ ],
+ "time": "2024-11-10T20:33:58+00:00"
+ },
+ {
+ "name": "wikimedia/at-ease",
+ "version": "v2.1.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/wikimedia/at-ease.git",
+ "reference": "e8ebaa7bb7c8a8395481a05f6dc4deaceab11c33"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/wikimedia/at-ease/zipball/e8ebaa7bb7c8a8395481a05f6dc4deaceab11c33",
+ "reference": "e8ebaa7bb7c8a8395481a05f6dc4deaceab11c33",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=7.2.9"
+ },
+ "require-dev": {
+ "mediawiki/mediawiki-codesniffer": "35.0.0",
+ "mediawiki/minus-x": "1.1.1",
+ "ockcyp/covers-validator": "1.3.3",
+ "php-parallel-lint/php-console-highlighter": "0.5.0",
+ "php-parallel-lint/php-parallel-lint": "1.2.0",
+ "phpunit/phpunit": "^8.5"
+ },
+ "type": "library",
+ "autoload": {
+ "files": [
+ "src/Wikimedia/Functions.php"
+ ],
+ "psr-4": {
+ "Wikimedia\\AtEase\\": "src/Wikimedia/AtEase/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "GPL-2.0-or-later"
+ ],
+ "authors": [
+ {
+ "name": "Tim Starling",
+ "email": "tstarling@wikimedia.org"
+ },
+ {
+ "name": "MediaWiki developers",
+ "email": "wikitech-l@lists.wikimedia.org"
+ }
+ ],
+ "description": "Safe replacement to @ for suppressing warnings.",
+ "homepage": "https://www.mediawiki.org/wiki/at-ease",
+ "support": {
+ "source": "https://github.com/wikimedia/at-ease/tree/v2.1.0"
+ },
+ "time": "2021-02-27T15:53:37+00:00"
+ }
+ ],
+ "aliases": [],
+ "minimum-stability": "dev",
+ "stability-flags": {},
+ "prefer-stable": false,
+ "prefer-lowest": false,
+ "platform": {},
+ "platform-dev": {},
+ "platform-overrides": {
+ "php": "7.4"
+ },
+ "plugin-api-version": "2.9.0"
+}
diff --git a/packages/js/extension-tooling/eslint.config.mjs b/packages/js/extension-tooling/eslint.config.mjs
new file mode 100644
index 00000000000..21626d6e5f7
--- /dev/null
+++ b/packages/js/extension-tooling/eslint.config.mjs
@@ -0,0 +1,15 @@
+/**
+ * Internal dependencies
+ */
+import woocommerce from '@woocommerce/eslint-config';
+
+export default [
+ ...woocommerce,
+ {
+ files: [ 'src/**/*.js', 'test/**/*.js' ],
+ // Extension webpack configs and Node tests use CommonJS.
+ rules: {
+ '@typescript-eslint/no-require-imports': 'off',
+ },
+ },
+];
diff --git a/packages/js/extension-tooling/package.json b/packages/js/extension-tooling/package.json
new file mode 100644
index 00000000000..8ed3cfea2ac
--- /dev/null
+++ b/packages/js/extension-tooling/package.json
@@ -0,0 +1,68 @@
+{
+ "name": "@woocommerce/extension-tooling",
+ "version": "1.0.0",
+ "description": "Shared build and development tools for WooCommerce extensions.",
+ "author": "Automattic",
+ "license": "GPL-3.0-or-later",
+ "engines": {
+ "node": "^24.15.0"
+ },
+ "homepage": "https://github.com/woocommerce/woocommerce/tree/trunk/packages/js/extension-tooling/README.md",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/woocommerce/woocommerce.git",
+ "directory": "packages/js/extension-tooling"
+ },
+ "exports": {
+ "./webpack-dist-minify": "./src/webpack-dist-minify.js",
+ "./webpack-text-includes": "./src/webpack-text-includes.js",
+ "./check-i18n": "./src/check-i18n.js"
+ },
+ "bin": {
+ "woo-extension-env-start": "./bin/env-start.sh",
+ "woo-extension-env-dev-reset": "./bin/env-dev-reset.sh"
+ },
+ "files": [
+ "bin",
+ "src"
+ ],
+ "publishConfig": {
+ "access": "public"
+ },
+ "scripts": {
+ "changelog": "XDEBUG_MODE=off composer install --quiet && composer exec -- changelogger",
+ "lint": "eslint src test",
+ "test": "node --test"
+ },
+ "dependencies": {
+ "uglify-js": "3.19.3"
+ },
+ "devDependencies": {
+ "@woocommerce/eslint-config": "workspace:*",
+ "eslint": "catalog:tooling",
+ "webpack": "catalog:tooling"
+ },
+ "config": {
+ "ci": {
+ "lint": {
+ "command": "lint",
+ "changes": "{src,test}/**/*.js"
+ },
+ "tests": [
+ {
+ "name": "JavaScript",
+ "command": "test",
+ "changes": [
+ "package.json",
+ "bin/env-start.sh",
+ "{src,test}/**/*.js"
+ ],
+ "events": [
+ "pull_request",
+ "push"
+ ]
+ }
+ ]
+ }
+ }
+}
diff --git a/packages/js/extension-tooling/src/check-i18n.js b/packages/js/extension-tooling/src/check-i18n.js
new file mode 100644
index 00000000000..01ad434884f
--- /dev/null
+++ b/packages/js/extension-tooling/src/check-i18n.js
@@ -0,0 +1,73 @@
+const assert = require( 'node:assert/strict' );
+const fs = require( 'node:fs' );
+const os = require( 'node:os' );
+const path = require( 'node:path' );
+const { spawnSync } = require( 'node:child_process' );
+const { test: nodeTest } = require( 'node:test' );
+
+module.exports = function checkI18n( { root, domain } ) {
+ const wrongDomain =
+ domain === 'wrong-domain' ? 'other-domain' : 'wrong-domain';
+ for ( const [ name, source, passes ] of [
+ [
+ 'plugin domain',
+ "__( 'Hello', " + JSON.stringify( domain ) + ' );',
+ true,
+ ],
+ [
+ 'WooCommerce domain',
+ "_n( 'Item', 'Items', count( [ 1, 2 ] ), 'woocommerce' );",
+ true,
+ ],
+ [ 'comments', "// __( 'Not a function call' );", true ],
+ [ 'missing domain', "__( 'Hello' );", false ],
+ [ 'wrong domain', `__( 'Hello', '${ wrongDomain }' );`, false ],
+ [
+ 'ignored wrong domain',
+ `// phpcs:ignore WordPress.WP.I18n.TextDomainMismatch\n__( 'Hello', '${ wrongDomain }' );`,
+ false,
+ ],
+ [
+ 'disabled domain check',
+ "// phpcs:disable WordPress.WP.I18n\n__( 'Hello', $domain );",
+ false,
+ ],
+ [ 'variable domain', "__( 'Hello', $domain );", false ],
+ [ 'interpolated domain', '__( \'Hello\', "woo-$domain" );', false ],
+ ] ) {
+ nodeTest( 'checks translation text domains: ' + name, ( context ) => {
+ const directory = fs.mkdtempSync(
+ path.join( os.tmpdir(), 'woo-i18n-' )
+ );
+ context.after( () =>
+ fs.rmSync( directory, { recursive: true, force: true } )
+ );
+ const parent = path.join( directory, 'tests', 'checkout' );
+ fs.mkdirSync( parent, { recursive: true } );
+ const filename = path.join( parent, 'fixture.php' );
+ fs.writeFileSync( filename, '<?php\n' + source + '\n' );
+ // Exercise the consumer's ruleset, including its annotation policy.
+ const result = spawnSync(
+ 'php',
+ [
+ 'vendor/bin/phpcs',
+ '--standard=tools/i18n.xml',
+ '--report=full',
+ '-s',
+ filename,
+ ],
+ { cwd: root, encoding: 'utf8' }
+ );
+ assert.ifError( result.error );
+ assert.equal( result.signal, null );
+ const output = result.stdout + result.stderr;
+ assert.equal( result.status === 0, passes, output );
+
+ // The full report prints the source code in parentheses.
+ const hasDomainDiagnostic = /\(WordPress\.WP\.I18n\.\w+\)/.test(
+ result.stdout
+ );
+ assert.equal( hasDomainDiagnostic, ! passes, output );
+ } );
+ }
+};
diff --git a/packages/js/extension-tooling/src/webpack-dist-minify.js b/packages/js/extension-tooling/src/webpack-dist-minify.js
new file mode 100644
index 00000000000..c2696f8874b
--- /dev/null
+++ b/packages/js/extension-tooling/src/webpack-dist-minify.js
@@ -0,0 +1,60 @@
+const { posix } = require( 'node:path' );
+const uglify = require( 'uglify-js' );
+
+module.exports = function minifyBundleCopies( copies ) {
+ const name = 'MinifyBundleCopies';
+
+ return {
+ apply( compiler ) {
+ const { Compilation, WebpackError, sources } = compiler.webpack;
+
+ compiler.hooks.thisCompilation.tap( name, ( compilation ) => {
+ // Keep dependency metadata based on the original bundles.
+ compilation.hooks.processAssets.tap(
+ { name, stage: Compilation.PROCESS_ASSETS_STAGE_REPORT },
+ () => {
+ for ( const asset of compilation.getAssets() ) {
+ if (
+ asset.name.endsWith( '.min.js' ) ||
+ ! copies.some( ( pattern ) =>
+ posix.matchesGlob( asset.name, pattern )
+ )
+ ) {
+ continue;
+ }
+ const destination = asset.name.replace(
+ /\.js$/,
+ '.min.js'
+ );
+ // includeScripts emits its own .min.js copy; a second one would conflict.
+ if ( compilation.getAsset( destination ) ) {
+ continue;
+ }
+ const result = uglify.minify(
+ asset.source
+ .source()
+ .toString()
+ .replace( /^\uFEFF/, '' )
+ );
+ if ( result.error ) {
+ compilation.errors.push(
+ new WebpackError(
+ `${ asset.name }: ${ result.error.message }`
+ )
+ );
+ continue;
+ }
+ compilation.emitAsset(
+ destination,
+ new sources.RawSource( result.code ),
+ {
+ minimized: true,
+ }
+ );
+ }
+ }
+ );
+ } );
+ },
+ };
+};
diff --git a/packages/js/extension-tooling/src/webpack-text-includes.js b/packages/js/extension-tooling/src/webpack-text-includes.js
new file mode 100644
index 00000000000..37ed8020715
--- /dev/null
+++ b/packages/js/extension-tooling/src/webpack-text-includes.js
@@ -0,0 +1,87 @@
+const fs = require( 'node:fs' );
+const path = require( 'node:path' );
+
+function expandIncludes( compilation, filename, included, indentation = '' ) {
+ if ( included.has( filename ) ) {
+ return '';
+ }
+ included.add( filename );
+ let source;
+ try {
+ source = fs.readFileSync( filename, 'utf8' ).replace( /^\uFEFF/, '' );
+ } catch ( error ) {
+ if ( error.code === 'ENOENT' ) {
+ compilation.missingDependencies.add( filename );
+ }
+ throw error;
+ }
+ compilation.fileDependencies.add( filename );
+ const newline = source.match( /\r?\n/ )?.[ 0 ] || '\n';
+ return source
+ .split( newline )
+ .map( ( line, index ) => {
+ const match = line.match(
+ /^(\s*)include\s*\(\s*(['"])([^'"]+)\2\s*\);?\s*$/
+ );
+ if ( ! match ) {
+ // An unexpanded include would fail in the browser, so fail the build instead.
+ if ( /^\s*include\s*\(/.test( line ) ) {
+ throw new Error(
+ `${ filename }:${
+ index + 1
+ }: unsupported include() line. Use include( 'path.js' ); on its own line.`
+ );
+ }
+ return line ? indentation + line : line;
+ }
+ return expandIncludes(
+ compilation,
+ path.join( path.dirname( filename ), match[ 3 ] ),
+ included,
+ indentation + match[ 1 ]
+ );
+ } )
+ .join( newline );
+}
+
+module.exports = function includeScripts( entries ) {
+ const name = 'IncludeScripts';
+
+ return {
+ apply( compiler ) {
+ const { Compilation, sources } = compiler.webpack;
+
+ compiler.hooks.thisCompilation.tap( name, ( compilation ) => {
+ compilation.hooks.processAssets.tap(
+ {
+ name,
+ stage: Compilation.PROCESS_ASSETS_STAGE_ADDITIONAL,
+ },
+ () => {
+ for ( const [ source, destination ] of entries ) {
+ try {
+ const script = new sources.RawSource(
+ expandIncludes(
+ compilation,
+ path.resolve(
+ compiler.context,
+ source
+ ),
+ new Set()
+ )
+ );
+ compilation.emitAsset( destination, script );
+ compilation.emitAsset(
+ destination.replace( /\.js$/, '.min.js' ),
+ script
+ );
+ } catch ( error ) {
+ compilation.errors.push( error );
+ }
+ }
+ }
+ );
+ } );
+ },
+ };
+};
diff --git a/packages/js/extension-tooling/test/env-start.test.js b/packages/js/extension-tooling/test/env-start.test.js
new file mode 100644
index 00000000000..1b935b3bf15
--- /dev/null
+++ b/packages/js/extension-tooling/test/env-start.test.js
@@ -0,0 +1,44 @@
+const assert = require( 'node:assert/strict' );
+const fs = require( 'node:fs' );
+const os = require( 'node:os' );
+const path = require( 'node:path' );
+const { spawnSync } = require( 'node:child_process' );
+const { test } = require( 'node:test' );
+
+test( 'Starts wp-env when the test output directory is missing', ( context ) => {
+ const directory = fs.mkdtempSync(
+ path.join( os.tmpdir(), 'woo-extension-env-' )
+ );
+ context.after( () =>
+ fs.rmSync( directory, { recursive: true, force: true } )
+ );
+
+ fs.writeFileSync( path.join( directory, 'package.json' ), '{}' );
+ fs.writeFileSync(
+ path.join( directory, 'pnpm' ),
+ '#!/bin/sh\nprintf "%s\\n" "$*"\n',
+ { mode: 0o755 }
+ );
+
+ const result = spawnSync(
+ 'bash',
+ [ path.resolve( __dirname, '../bin/env-start.sh' ), '--update' ],
+ {
+ cwd: directory,
+ env: {
+ ...process.env,
+ PATH: directory + path.delimiter + process.env.PATH,
+ },
+ encoding: 'utf8',
+ }
+ );
+
+ assert.ifError( result.error );
+ assert.equal( result.status, 0, result.stderr );
+ assert.equal( result.stdout.trim(), 'run wp-env:test start --update' );
+ assert.ok(
+ fs
+ .statSync( path.join( directory, 'tests/_output/debug.log' ) )
+ .isFile()
+ );
+} );
diff --git a/packages/js/extension-tooling/test/webpack.test.js b/packages/js/extension-tooling/test/webpack.test.js
new file mode 100644
index 00000000000..4ff10e0de36
--- /dev/null
+++ b/packages/js/extension-tooling/test/webpack.test.js
@@ -0,0 +1,133 @@
+const assert = require( 'node:assert/strict' );
+const fs = require( 'node:fs/promises' );
+const os = require( 'node:os' );
+const path = require( 'node:path' );
+const { test } = require( 'node:test' );
+const webpack = require( 'webpack' );
+const includeScripts = require( '../src/webpack-text-includes' );
+const minifyBundleCopies = require( '../src/webpack-dist-minify' );
+
+test( 'Expands classic includes and emits a minified bundle copy', async ( context ) => {
+ const directory = await fs.mkdtemp(
+ path.join( os.tmpdir(), 'woo-extension-webpack-' )
+ );
+ context.after( () => fs.rm( directory, { recursive: true, force: true } ) );
+
+ await fs.writeFile(
+ path.join( directory, 'classic.js' ),
+ "include( 'part.js' );\ninclude( 'part.js' );\n"
+ );
+ await fs.writeFile( path.join( directory, 'part.js' ), 'const part = 1;' );
+ await fs.writeFile(
+ path.join( directory, 'entry.js' ),
+ "console.log( 'Hello world' );\n"
+ );
+
+ await new Promise( ( resolve, reject ) => {
+ webpack(
+ {
+ context: directory,
+ entry: './entry.js',
+ mode: 'none',
+ output: { path: directory, filename: 'bundle.js' },
+ plugins: [
+ includeScripts( [ [ 'classic.js', 'assembled.js' ] ] ),
+ minifyBundleCopies( [ 'bundle.js' ] ),
+ ],
+ },
+ ( error, stats ) => {
+ if ( error ) {
+ reject( error );
+ } else if ( stats.hasErrors() ) {
+ reject( new Error( stats.toString( 'errors-only' ) ) );
+ } else {
+ resolve();
+ }
+ }
+ );
+ } );
+
+ const assembled = await fs.readFile(
+ path.join( directory, 'assembled.js' ),
+ 'utf8'
+ );
+ assert.equal( assembled, 'const part = 1;\n\n' );
+
+ const bundle = await fs.readFile(
+ path.join( directory, 'bundle.js' ),
+ 'utf8'
+ );
+ const minified = await fs.readFile(
+ path.join( directory, 'bundle.min.js' ),
+ 'utf8'
+ );
+ assert.ok( minified.length < bundle.length );
+ assert.match( minified, /Hello world/ );
+} );
+
+async function buildIncludes( context, classic, plugins = [] ) {
+ const directory = await fs.mkdtemp(
+ path.join( os.tmpdir(), 'woo-extension-webpack-' )
+ );
+ context.after( () => fs.rm( directory, { recursive: true, force: true } ) );
+ await fs.writeFile( path.join( directory, 'classic.js' ), classic );
+ await fs.writeFile( path.join( directory, 'part.js' ), 'const part = 1;' );
+ await fs.writeFile( path.join( directory, 'entry.js' ), '' );
+
+ const stats = await new Promise( ( resolve, reject ) => {
+ webpack(
+ {
+ context: directory,
+ entry: './entry.js',
+ mode: 'none',
+ output: { path: directory, filename: 'bundle.js' },
+ plugins: [
+ includeScripts( [ [ 'classic.js', 'assembled.js' ] ] ),
+ ...plugins,
+ ],
+ },
+ ( error, result ) => ( error ? reject( error ) : resolve( result ) )
+ );
+ } );
+ return { directory, stats };
+}
+
+test( 'Expands includes written with other spacing and quotes', async ( context ) => {
+ const { directory, stats } = await buildIncludes(
+ context,
+ "include('part.js');\n\tinclude( \"part.js\" )\ninclude ('part.js');\n"
+ );
+
+ assert.equal( stats.hasErrors(), false, stats.toString( 'errors-only' ) );
+ assert.equal(
+ await fs.readFile( path.join( directory, 'assembled.js' ), 'utf8' ),
+ 'const part = 1;\n\n\n'
+ );
+} );
+
+test( 'Leaves the include copy when a bundle pattern also matches it', async ( context ) => {
+ const { directory, stats } = await buildIncludes(
+ context,
+ "include( 'part.js' );\n",
+ [ minifyBundleCopies( [ '*.js' ] ) ]
+ );
+
+ assert.equal( stats.hasErrors(), false, stats.toString( 'errors-only' ) );
+ assert.equal(
+ await fs.readFile( path.join( directory, 'assembled.min.js' ), 'utf8' ),
+ 'const part = 1;\n'
+ );
+ assert.ok( ( await fs.readdir( directory ) ).includes( 'bundle.min.js' ) );
+} );
+
+test( 'Fails the build on an include line it cannot expand', async ( context ) => {
+ const { stats } = await buildIncludes(
+ context,
+ "include( 'part.js' ); // Shared part.\n"
+ );
+
+ assert.match(
+ stats.toString( 'errors-only' ),
+ /classic\.js:1: unsupported include\(\) line/
+ );
+} );
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index cb74f04ab9b..1bad2a33724 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -1796,6 +1796,22 @@ importers:
packages/js/extend-cart-checkout-block: {}
+ packages/js/extension-tooling:
+ dependencies:
+ uglify-js:
+ specifier: 3.19.3
+ version: 3.19.3
+ devDependencies:
+ '@woocommerce/eslint-config':
+ specifier: workspace:*
+ version: link:../../../tools/eslint-config
+ eslint:
+ specifier: catalog:tooling
+ version: 10.7.0(jiti@2.6.1)
+ webpack:
+ specifier: catalog:tooling
+ version: 5.112.2(@swc/core@1.15.24)(esbuild@0.27.7)(postcss@8.5.26)(uglify-js@3.19.3)
+
packages/js/internal-build:
dependencies:
'@automattic/color-studio':
@@ -40593,6 +40609,19 @@ snapshots:
esbuild: 0.28.2
postcss: 8.5.26
+ minimizer-webpack-plugin@5.13.1(@swc/core@1.15.24)(esbuild@0.27.7)(postcss@8.5.26)(uglify-js@3.19.3)(webpack@5.112.2(@swc/core@1.15.24)(esbuild@0.27.7)(postcss@8.5.26)(uglify-js@3.19.3)):
+ dependencies:
+ '@jridgewell/trace-mapping': 0.3.31
+ jest-worker: 27.5.1
+ schema-utils: 4.8.1(webpack@5.112.2(@swc/core@1.15.24)(esbuild@0.27.7)(postcss@8.5.26)(uglify-js@3.19.3))
+ terser: 5.51.2
+ webpack: 5.112.2(@swc/core@1.15.24)(esbuild@0.27.7)(postcss@8.5.26)(uglify-js@3.19.3)
+ optionalDependencies:
+ '@swc/core': 1.15.24
+ esbuild: 0.27.7
+ postcss: 8.5.26
+ uglify-js: 3.19.3
+
minimizer-webpack-plugin@5.13.1(@swc/core@1.15.24)(esbuild@0.27.7)(postcss@8.5.26)(webpack@5.112.2(@swc/core@1.15.24)(esbuild@0.27.7)(postcss@8.5.26)):
dependencies:
'@jridgewell/trace-mapping': 0.3.31
@@ -42987,6 +43016,15 @@ snapshots:
ajv-formats: 2.1.1(ajv@8.20.0)
ajv-keywords: 5.1.0(ajv@8.20.0)
+ schema-utils@4.8.1(webpack@5.112.2(@swc/core@1.15.24)(esbuild@0.27.7)(postcss@8.5.26)(uglify-js@3.19.3)):
+ dependencies:
+ '@types/json-schema': 7.0.15
+ ajv: 8.20.0
+ ajv-formats: 3.0.1(ajv@8.20.0)
+ ajv-keywords: 5.1.0(ajv@8.20.0)
+ optionalDependencies:
+ webpack: 5.112.2(@swc/core@1.15.24)(esbuild@0.27.7)(postcss@8.5.26)(uglify-js@3.19.3)
+
schema-utils@4.8.1(webpack@5.112.2(@swc/core@1.15.24)(esbuild@0.27.7)(postcss@8.5.26)):
dependencies:
'@types/json-schema': 7.0.15
@@ -45016,6 +45054,43 @@ snapshots:
- svgo
- uglify-js
+ webpack@5.112.2(@swc/core@1.15.24)(esbuild@0.27.7)(postcss@8.5.26)(uglify-js@3.19.3):
+ dependencies:
+ '@types/estree': 1.0.8
+ '@types/json-schema': 7.0.15
+ '@webassemblyjs/ast': 1.14.1
+ '@webassemblyjs/wasm-edit': 1.14.1
+ '@webassemblyjs/wasm-parser': 1.14.1
+ browserslist: 4.29.5
+ chrome-trace-event: 1.0.4
+ enhanced-resolve: 5.26.0
+ es-module-lexer: 2.3.2
+ events: 3.3.0
+ graceful-fs: 4.2.11
+ mime-db: 1.54.0
+ minimizer-webpack-plugin: 5.13.1(@swc/core@1.15.24)(esbuild@0.27.7)(postcss@8.5.26)(uglify-js@3.19.3)(webpack@5.112.2(@swc/core@1.15.24)(esbuild@0.27.7)(postcss@8.5.26)(uglify-js@3.19.3))
+ schema-utils: 4.8.1(webpack@5.112.2(@swc/core@1.15.24)(esbuild@0.27.7)(postcss@8.5.26)(uglify-js@3.19.3))
+ tapable: 2.3.3
+ watchpack: 2.6.3
+ webpack-sources: 3.6.0
+ transitivePeerDependencies:
+ - '@minify-html/node'
+ - '@napi-rs/image'
+ - '@swc/core'
+ - '@swc/css'
+ - '@swc/html'
+ - clean-css
+ - cssnano
+ - csso
+ - esbuild
+ - html-minifier-terser
+ - imagemin
+ - lightningcss
+ - postcss
+ - sharp
+ - svgo
+ - uglify-js
+
webpack@5.112.2(@swc/core@1.15.24)(esbuild@0.27.7)(postcss@8.5.26)(webpack-cli@5.1.4):
dependencies:
'@types/estree': 1.0.8