vite 3.0.0-alpha.9 → 3.0.0-beta.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE.md CHANGED
@@ -25,7 +25,7 @@ SOFTWARE.
25
25
 
26
26
  # Licenses of bundled dependencies
27
27
  The published Vite artifact additionally contains code with the following licenses:
28
- Apache-2.0, BSD-2-Clause, CC0-1.0, ISC, MIT, (BSD-3-Clause OR GPL-2.0)
28
+ Apache-2.0, BSD-2-Clause, CC0-1.0, ISC, MIT
29
29
 
30
30
  # Bundled dependencies:
31
31
  ## @ampproject/remapping
@@ -535,6 +535,28 @@ License: MIT
535
535
  By: Rich Harris
536
536
  Repository: rollup/plugins
537
537
 
538
+ > The MIT License (MIT)
539
+ >
540
+ > Copyright (c) 2019 RollupJS Plugin Contributors (https://github.com/rollup/plugins/graphs/contributors)
541
+ >
542
+ > Permission is hereby granted, free of charge, to any person obtaining a copy
543
+ > of this software and associated documentation files (the "Software"), to deal
544
+ > in the Software without restriction, including without limitation the rights
545
+ > to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
546
+ > copies of the Software, and to permit persons to whom the Software is
547
+ > furnished to do so, subject to the following conditions:
548
+ >
549
+ > The above copyright notice and this permission notice shall be included in
550
+ > all copies or substantial portions of the Software.
551
+ >
552
+ > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
553
+ > IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
554
+ > FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
555
+ > AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
556
+ > LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
557
+ > OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
558
+ > THE SOFTWARE.
559
+
538
560
  ---------------------------------------
539
561
 
540
562
  ## @vue/compiler-core
@@ -660,7 +682,7 @@ Repository: chalk/ansi-regex
660
682
 
661
683
  > MIT License
662
684
  >
663
- > Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
685
+ > Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
664
686
  >
665
687
  > 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:
666
688
  >
@@ -953,7 +975,7 @@ Repository: http://github.com/bripkens/connect-history-api-fallback.git
953
975
 
954
976
  > The MIT License
955
977
  >
956
- > Copyright (c) 2012 Ben Ripkens http://bripkens.de
978
+ > Copyright (c) 2022 Ben Blackmore and contributors
957
979
  >
958
980
  > Permission is hereby granted, free of charge, to any person obtaining a copy
959
981
  > of this software and associated documentation files (the "Software"), to deal
@@ -1941,6 +1963,35 @@ Repository: git+https://github.com/json5/json5.git
1941
1963
 
1942
1964
  ---------------------------------------
1943
1965
 
1966
+ ## jsonc-parser
1967
+ License: MIT
1968
+ By: Microsoft Corporation
1969
+ Repository: https://github.com/microsoft/node-jsonc-parser
1970
+
1971
+ > The MIT License (MIT)
1972
+ >
1973
+ > Copyright (c) Microsoft
1974
+ >
1975
+ > Permission is hereby granted, free of charge, to any person obtaining a copy
1976
+ > of this software and associated documentation files (the "Software"), to deal
1977
+ > in the Software without restriction, including without limitation the rights
1978
+ > to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
1979
+ > copies of the Software, and to permit persons to whom the Software is
1980
+ > furnished to do so, subject to the following conditions:
1981
+ >
1982
+ > The above copyright notice and this permission notice shall be included in all
1983
+ > copies or substantial portions of the Software.
1984
+ >
1985
+ > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1986
+ > IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1987
+ > FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1988
+ > AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1989
+ > LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1990
+ > OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1991
+ > SOFTWARE.
1992
+
1993
+ ---------------------------------------
1994
+
1944
1995
  ## launch-editor
1945
1996
  License: MIT
1946
1997
  By: Evan You
@@ -2140,6 +2191,34 @@ Repository: git://github.com/isaacs/minimatch.git
2140
2191
 
2141
2192
  ---------------------------------------
2142
2193
 
2194
+ ## mlly
2195
+ License: MIT
2196
+ Repository: unjs/mlly
2197
+
2198
+ > MIT License
2199
+ >
2200
+ > Copyright (c) 2022 UnJS
2201
+ >
2202
+ > Permission is hereby granted, free of charge, to any person obtaining a copy
2203
+ > of this software and associated documentation files (the "Software"), to deal
2204
+ > in the Software without restriction, including without limitation the rights
2205
+ > to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
2206
+ > copies of the Software, and to permit persons to whom the Software is
2207
+ > furnished to do so, subject to the following conditions:
2208
+ >
2209
+ > The above copyright notice and this permission notice shall be included in all
2210
+ > copies or substantial portions of the Software.
2211
+ >
2212
+ > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
2213
+ > IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
2214
+ > FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
2215
+ > AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
2216
+ > LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
2217
+ > OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2218
+ > SOFTWARE.
2219
+
2220
+ ---------------------------------------
2221
+
2143
2222
  ## mrmime
2144
2223
  License: MIT
2145
2224
  By: Luke Edwards
@@ -2197,344 +2276,6 @@ Repository: zeit/ms
2197
2276
 
2198
2277
  ---------------------------------------
2199
2278
 
2200
- ## node-forge
2201
- License: (BSD-3-Clause OR GPL-2.0)
2202
- By: Digital Bazaar, Inc., Dave Longley, David I. Lehn, Stefan Siegl, Christoph Dorn
2203
- Repository: https://github.com/digitalbazaar/forge
2204
-
2205
- > You may use the Forge project under the terms of either the BSD License or the
2206
- > GNU General Public License (GPL) Version 2.
2207
- >
2208
- > The BSD License is recommended for most projects. It is simple and easy to
2209
- > understand and it places almost no restrictions on what you can do with the
2210
- > Forge project.
2211
- >
2212
- > If the GPL suits your project better you are also free to use Forge under
2213
- > that license.
2214
- >
2215
- > You don't have to do anything special to choose one license or the other and
2216
- > you don't have to notify anyone which license you are using. You are free to
2217
- > use this project in commercial projects as long as the copyright header is
2218
- > left intact.
2219
- >
2220
- > If you are a commercial entity and use this set of libraries in your
2221
- > commercial software then reasonable payment to Digital Bazaar, if you can
2222
- > afford it, is not required but is expected and would be appreciated. If this
2223
- > library saves you time, then it's saving you money. The cost of developing
2224
- > the Forge software was on the order of several hundred hours and tens of
2225
- > thousands of dollars. We are attempting to strike a balance between helping
2226
- > the development community while not being taken advantage of by lucrative
2227
- > commercial entities for our efforts.
2228
- >
2229
- > -------------------------------------------------------------------------------
2230
- > New BSD License (3-clause)
2231
- > Copyright (c) 2010, Digital Bazaar, Inc.
2232
- > All rights reserved.
2233
- >
2234
- > Redistribution and use in source and binary forms, with or without
2235
- > modification, are permitted provided that the following conditions are met:
2236
- > * Redistributions of source code must retain the above copyright
2237
- > notice, this list of conditions and the following disclaimer.
2238
- > * Redistributions in binary form must reproduce the above copyright
2239
- > notice, this list of conditions and the following disclaimer in the
2240
- > documentation and/or other materials provided with the distribution.
2241
- > * Neither the name of Digital Bazaar, Inc. nor the
2242
- > names of its contributors may be used to endorse or promote products
2243
- > derived from this software without specific prior written permission.
2244
- >
2245
- > THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
2246
- > ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
2247
- > WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
2248
- > DISCLAIMED. IN NO EVENT SHALL DIGITAL BAZAAR BE LIABLE FOR ANY
2249
- > DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
2250
- > (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
2251
- > LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
2252
- > ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2253
- > (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
2254
- > SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2255
- >
2256
- > -------------------------------------------------------------------------------
2257
- > GNU GENERAL PUBLIC LICENSE
2258
- > Version 2, June 1991
2259
- >
2260
- > Copyright (C) 1989, 1991 Free Software Foundation, Inc.
2261
- > 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
2262
- > Everyone is permitted to copy and distribute verbatim copies
2263
- > of this license document, but changing it is not allowed.
2264
- >
2265
- > Preamble
2266
- >
2267
- > The licenses for most software are designed to take away your
2268
- > freedom to share and change it. By contrast, the GNU General Public
2269
- > License is intended to guarantee your freedom to share and change free
2270
- > software--to make sure the software is free for all its users. This
2271
- > General Public License applies to most of the Free Software
2272
- > Foundation's software and to any other program whose authors commit to
2273
- > using it. (Some other Free Software Foundation software is covered by
2274
- > the GNU Lesser General Public License instead.) You can apply it to
2275
- > your programs, too.
2276
- >
2277
- > When we speak of free software, we are referring to freedom, not
2278
- > price. Our General Public Licenses are designed to make sure that you
2279
- > have the freedom to distribute copies of free software (and charge for
2280
- > this service if you wish), that you receive source code or can get it
2281
- > if you want it, that you can change the software or use pieces of it
2282
- > in new free programs; and that you know you can do these things.
2283
- >
2284
- > To protect your rights, we need to make restrictions that forbid
2285
- > anyone to deny you these rights or to ask you to surrender the rights.
2286
- > These restrictions translate to certain responsibilities for you if you
2287
- > distribute copies of the software, or if you modify it.
2288
- >
2289
- > For example, if you distribute copies of such a program, whether
2290
- > gratis or for a fee, you must give the recipients all the rights that
2291
- > you have. You must make sure that they, too, receive or can get the
2292
- > source code. And you must show them these terms so they know their
2293
- > rights.
2294
- >
2295
- > We protect your rights with two steps: (1) copyright the software, and
2296
- > (2) offer you this license which gives you legal permission to copy,
2297
- > distribute and/or modify the software.
2298
- >
2299
- > Also, for each author's protection and ours, we want to make certain
2300
- > that everyone understands that there is no warranty for this free
2301
- > software. If the software is modified by someone else and passed on, we
2302
- > want its recipients to know that what they have is not the original, so
2303
- > that any problems introduced by others will not reflect on the original
2304
- > authors' reputations.
2305
- >
2306
- > Finally, any free program is threatened constantly by software
2307
- > patents. We wish to avoid the danger that redistributors of a free
2308
- > program will individually obtain patent licenses, in effect making the
2309
- > program proprietary. To prevent this, we have made it clear that any
2310
- > patent must be licensed for everyone's free use or not licensed at all.
2311
- >
2312
- > The precise terms and conditions for copying, distribution and
2313
- > modification follow.
2314
- >
2315
- > GNU GENERAL PUBLIC LICENSE
2316
- > TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
2317
- >
2318
- > 0. This License applies to any program or other work which contains
2319
- > a notice placed by the copyright holder saying it may be distributed
2320
- > under the terms of this General Public License. The "Program", below,
2321
- > refers to any such program or work, and a "work based on the Program"
2322
- > means either the Program or any derivative work under copyright law:
2323
- > that is to say, a work containing the Program or a portion of it,
2324
- > either verbatim or with modifications and/or translated into another
2325
- > language. (Hereinafter, translation is included without limitation in
2326
- > the term "modification".) Each licensee is addressed as "you".
2327
- >
2328
- > Activities other than copying, distribution and modification are not
2329
- > covered by this License; they are outside its scope. The act of
2330
- > running the Program is not restricted, and the output from the Program
2331
- > is covered only if its contents constitute a work based on the
2332
- > Program (independent of having been made by running the Program).
2333
- > Whether that is true depends on what the Program does.
2334
- >
2335
- > 1. You may copy and distribute verbatim copies of the Program's
2336
- > source code as you receive it, in any medium, provided that you
2337
- > conspicuously and appropriately publish on each copy an appropriate
2338
- > copyright notice and disclaimer of warranty; keep intact all the
2339
- > notices that refer to this License and to the absence of any warranty;
2340
- > and give any other recipients of the Program a copy of this License
2341
- > along with the Program.
2342
- >
2343
- > You may charge a fee for the physical act of transferring a copy, and
2344
- > you may at your option offer warranty protection in exchange for a fee.
2345
- >
2346
- > 2. You may modify your copy or copies of the Program or any portion
2347
- > of it, thus forming a work based on the Program, and copy and
2348
- > distribute such modifications or work under the terms of Section 1
2349
- > above, provided that you also meet all of these conditions:
2350
- >
2351
- > a) You must cause the modified files to carry prominent notices
2352
- > stating that you changed the files and the date of any change.
2353
- >
2354
- > b) You must cause any work that you distribute or publish, that in
2355
- > whole or in part contains or is derived from the Program or any
2356
- > part thereof, to be licensed as a whole at no charge to all third
2357
- > parties under the terms of this License.
2358
- >
2359
- > c) If the modified program normally reads commands interactively
2360
- > when run, you must cause it, when started running for such
2361
- > interactive use in the most ordinary way, to print or display an
2362
- > announcement including an appropriate copyright notice and a
2363
- > notice that there is no warranty (or else, saying that you provide
2364
- > a warranty) and that users may redistribute the program under
2365
- > these conditions, and telling the user how to view a copy of this
2366
- > License. (Exception: if the Program itself is interactive but
2367
- > does not normally print such an announcement, your work based on
2368
- > the Program is not required to print an announcement.)
2369
- >
2370
- > These requirements apply to the modified work as a whole. If
2371
- > identifiable sections of that work are not derived from the Program,
2372
- > and can be reasonably considered independent and separate works in
2373
- > themselves, then this License, and its terms, do not apply to those
2374
- > sections when you distribute them as separate works. But when you
2375
- > distribute the same sections as part of a whole which is a work based
2376
- > on the Program, the distribution of the whole must be on the terms of
2377
- > this License, whose permissions for other licensees extend to the
2378
- > entire whole, and thus to each and every part regardless of who wrote it.
2379
- >
2380
- > Thus, it is not the intent of this section to claim rights or contest
2381
- > your rights to work written entirely by you; rather, the intent is to
2382
- > exercise the right to control the distribution of derivative or
2383
- > collective works based on the Program.
2384
- >
2385
- > In addition, mere aggregation of another work not based on the Program
2386
- > with the Program (or with a work based on the Program) on a volume of
2387
- > a storage or distribution medium does not bring the other work under
2388
- > the scope of this License.
2389
- >
2390
- > 3. You may copy and distribute the Program (or a work based on it,
2391
- > under Section 2) in object code or executable form under the terms of
2392
- > Sections 1 and 2 above provided that you also do one of the following:
2393
- >
2394
- > a) Accompany it with the complete corresponding machine-readable
2395
- > source code, which must be distributed under the terms of Sections
2396
- > 1 and 2 above on a medium customarily used for software interchange; or,
2397
- >
2398
- > b) Accompany it with a written offer, valid for at least three
2399
- > years, to give any third party, for a charge no more than your
2400
- > cost of physically performing source distribution, a complete
2401
- > machine-readable copy of the corresponding source code, to be
2402
- > distributed under the terms of Sections 1 and 2 above on a medium
2403
- > customarily used for software interchange; or,
2404
- >
2405
- > c) Accompany it with the information you received as to the offer
2406
- > to distribute corresponding source code. (This alternative is
2407
- > allowed only for noncommercial distribution and only if you
2408
- > received the program in object code or executable form with such
2409
- > an offer, in accord with Subsection b above.)
2410
- >
2411
- > The source code for a work means the preferred form of the work for
2412
- > making modifications to it. For an executable work, complete source
2413
- > code means all the source code for all modules it contains, plus any
2414
- > associated interface definition files, plus the scripts used to
2415
- > control compilation and installation of the executable. However, as a
2416
- > special exception, the source code distributed need not include
2417
- > anything that is normally distributed (in either source or binary
2418
- > form) with the major components (compiler, kernel, and so on) of the
2419
- > operating system on which the executable runs, unless that component
2420
- > itself accompanies the executable.
2421
- >
2422
- > If distribution of executable or object code is made by offering
2423
- > access to copy from a designated place, then offering equivalent
2424
- > access to copy the source code from the same place counts as
2425
- > distribution of the source code, even though third parties are not
2426
- > compelled to copy the source along with the object code.
2427
- >
2428
- > 4. You may not copy, modify, sublicense, or distribute the Program
2429
- > except as expressly provided under this License. Any attempt
2430
- > otherwise to copy, modify, sublicense or distribute the Program is
2431
- > void, and will automatically terminate your rights under this License.
2432
- > However, parties who have received copies, or rights, from you under
2433
- > this License will not have their licenses terminated so long as such
2434
- > parties remain in full compliance.
2435
- >
2436
- > 5. You are not required to accept this License, since you have not
2437
- > signed it. However, nothing else grants you permission to modify or
2438
- > distribute the Program or its derivative works. These actions are
2439
- > prohibited by law if you do not accept this License. Therefore, by
2440
- > modifying or distributing the Program (or any work based on the
2441
- > Program), you indicate your acceptance of this License to do so, and
2442
- > all its terms and conditions for copying, distributing or modifying
2443
- > the Program or works based on it.
2444
- >
2445
- > 6. Each time you redistribute the Program (or any work based on the
2446
- > Program), the recipient automatically receives a license from the
2447
- > original licensor to copy, distribute or modify the Program subject to
2448
- > these terms and conditions. You may not impose any further
2449
- > restrictions on the recipients' exercise of the rights granted herein.
2450
- > You are not responsible for enforcing compliance by third parties to
2451
- > this License.
2452
- >
2453
- > 7. If, as a consequence of a court judgment or allegation of patent
2454
- > infringement or for any other reason (not limited to patent issues),
2455
- > conditions are imposed on you (whether by court order, agreement or
2456
- > otherwise) that contradict the conditions of this License, they do not
2457
- > excuse you from the conditions of this License. If you cannot
2458
- > distribute so as to satisfy simultaneously your obligations under this
2459
- > License and any other pertinent obligations, then as a consequence you
2460
- > may not distribute the Program at all. For example, if a patent
2461
- > license would not permit royalty-free redistribution of the Program by
2462
- > all those who receive copies directly or indirectly through you, then
2463
- > the only way you could satisfy both it and this License would be to
2464
- > refrain entirely from distribution of the Program.
2465
- >
2466
- > If any portion of this section is held invalid or unenforceable under
2467
- > any particular circumstance, the balance of the section is intended to
2468
- > apply and the section as a whole is intended to apply in other
2469
- > circumstances.
2470
- >
2471
- > It is not the purpose of this section to induce you to infringe any
2472
- > patents or other property right claims or to contest validity of any
2473
- > such claims; this section has the sole purpose of protecting the
2474
- > integrity of the free software distribution system, which is
2475
- > implemented by public license practices. Many people have made
2476
- > generous contributions to the wide range of software distributed
2477
- > through that system in reliance on consistent application of that
2478
- > system; it is up to the author/donor to decide if he or she is willing
2479
- > to distribute software through any other system and a licensee cannot
2480
- > impose that choice.
2481
- >
2482
- > This section is intended to make thoroughly clear what is believed to
2483
- > be a consequence of the rest of this License.
2484
- >
2485
- > 8. If the distribution and/or use of the Program is restricted in
2486
- > certain countries either by patents or by copyrighted interfaces, the
2487
- > original copyright holder who places the Program under this License
2488
- > may add an explicit geographical distribution limitation excluding
2489
- > those countries, so that distribution is permitted only in or among
2490
- > countries not thus excluded. In such case, this License incorporates
2491
- > the limitation as if written in the body of this License.
2492
- >
2493
- > 9. The Free Software Foundation may publish revised and/or new versions
2494
- > of the General Public License from time to time. Such new versions will
2495
- > be similar in spirit to the present version, but may differ in detail to
2496
- > address new problems or concerns.
2497
- >
2498
- > Each version is given a distinguishing version number. If the Program
2499
- > specifies a version number of this License which applies to it and "any
2500
- > later version", you have the option of following the terms and conditions
2501
- > either of that version or of any later version published by the Free
2502
- > Software Foundation. If the Program does not specify a version number of
2503
- > this License, you may choose any version ever published by the Free Software
2504
- > Foundation.
2505
- >
2506
- > 10. If you wish to incorporate parts of the Program into other free
2507
- > programs whose distribution conditions are different, write to the author
2508
- > to ask for permission. For software which is copyrighted by the Free
2509
- > Software Foundation, write to the Free Software Foundation; we sometimes
2510
- > make exceptions for this. Our decision will be guided by the two goals
2511
- > of preserving the free status of all derivatives of our free software and
2512
- > of promoting the sharing and reuse of software generally.
2513
- >
2514
- > NO WARRANTY
2515
- >
2516
- > 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
2517
- > FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
2518
- > OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
2519
- > PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
2520
- > OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
2521
- > MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
2522
- > TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
2523
- > PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
2524
- > REPAIR OR CORRECTION.
2525
- >
2526
- > 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
2527
- > WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
2528
- > REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
2529
- > INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
2530
- > OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
2531
- > TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
2532
- > YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
2533
- > PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
2534
- > POSSIBILITY OF SUCH DAMAGES.
2535
-
2536
- ---------------------------------------
2537
-
2538
2279
  ## normalize-path
2539
2280
  License: MIT
2540
2281
  By: Jon Schlinkert, Blaine Bublitz
@@ -3455,7 +3196,7 @@ Repository: chalk/strip-ansi
3455
3196
 
3456
3197
  > MIT License
3457
3198
  >
3458
- > Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
3199
+ > Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
3459
3200
  >
3460
3201
  > 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:
3461
3202
  >
@@ -3832,7 +3573,7 @@ License: ISC
3832
3573
  By: Eemeli Aro
3833
3574
  Repository: github:eemeli/yaml
3834
3575
 
3835
- > Copyright 2018 Eemeli Aro <eemeli@gmail.com>
3576
+ > Copyright Eemeli Aro <eemeli@gmail.com>
3836
3577
  >
3837
3578
  > Permission to use, copy, modify, and/or distribute this software for any purpose
3838
3579
  > with or without fee is hereby granted, provided that the above copyright notice
package/bin/vite.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { performance } from 'perf_hooks'
2
+ import { performance } from 'node:perf_hooks'
3
3
 
4
4
  if (!import.meta.url.includes('node_modules')) {
5
5
  try {
package/client.d.ts CHANGED
@@ -74,6 +74,18 @@ declare module '*.jpeg' {
74
74
  const src: string
75
75
  export default src
76
76
  }
77
+ declare module '*.jfif' {
78
+ const src: string
79
+ export default src
80
+ }
81
+ declare module '*.pjpeg' {
82
+ const src: string
83
+ export default src
84
+ }
85
+ declare module '*.pjp' {
86
+ const src: string
87
+ export default src
88
+ }
77
89
  declare module '*.png' {
78
90
  const src: string
79
91
  export default src
@@ -180,14 +180,49 @@ if (customElements && !customElements.get(overlayId)) {
180
180
  }
181
181
 
182
182
  console.debug('[vite] connecting...');
183
+ const importMetaUrl = new URL(import.meta.url);
183
184
  // use server configuration, then fallback to inference
185
+ const serverHost = __SERVER_HOST__;
184
186
  const socketProtocol = __HMR_PROTOCOL__ || (location.protocol === 'https:' ? 'wss' : 'ws');
185
- const socketHost = `${__HMR_HOSTNAME__ || location.hostname}:${__HMR_PORT__}`;
187
+ const hmrPort = __HMR_PORT__;
188
+ const socketHost = `${__HMR_HOSTNAME__ || importMetaUrl.hostname}:${hmrPort || importMetaUrl.port}${__HMR_BASE__}`;
189
+ const directSocketHost = __HMR_DIRECT_TARGET__;
186
190
  const base = __BASE__ || '/';
187
191
  const messageBuffer = [];
188
192
  let socket;
189
193
  try {
190
- socket = new WebSocket(`${socketProtocol}://${socketHost}`, 'vite-hmr');
194
+ let fallback;
195
+ // only use fallback when port is inferred to prevent confusion
196
+ if (!hmrPort) {
197
+ fallback = () => {
198
+ // fallback to connecting directly to the hmr server
199
+ // for servers which does not support proxying websocket
200
+ socket = setupWebSocket(socketProtocol, directSocketHost, () => {
201
+ const currentScriptHostURL = new URL(import.meta.url);
202
+ const currentScriptHost = currentScriptHostURL.host +
203
+ currentScriptHostURL.pathname.replace(/@vite\/client$/, '');
204
+ console.error('[vite] failed to connect to websocket.\n' +
205
+ 'your current setup:\n' +
206
+ ` (browser) ${currentScriptHost} <--[HTTP]--> ${serverHost} (server)\n` +
207
+ ` (browser) ${socketHost} <--[WebSocket (failing)]--> ${directSocketHost} (server)\n` +
208
+ 'Check out your Vite / network configuration and https://vitejs.dev/config/server-options.html#server-hmr .');
209
+ });
210
+ socket.addEventListener('open', () => {
211
+ console.info('[vite] Direct websocket connection fallback. Check out https://vitejs.dev/config/server-options.html#server-hmr to remove the previous connection error.');
212
+ }, { once: true });
213
+ };
214
+ }
215
+ socket = setupWebSocket(socketProtocol, socketHost, fallback);
216
+ }
217
+ catch (error) {
218
+ console.error(`[vite] failed to connect to websocket (${error}). `);
219
+ }
220
+ function setupWebSocket(protocol, hostAndPath, onCloseWithoutOpen) {
221
+ const socket = new WebSocket(`${protocol}://${hostAndPath}`, 'vite-hmr');
222
+ let isOpened = false;
223
+ socket.addEventListener('open', () => {
224
+ isOpened = true;
225
+ }, { once: true });
191
226
  // Listen for messages
192
227
  socket.addEventListener('message', async ({ data }) => {
193
228
  handleMessage(JSON.parse(data));
@@ -196,13 +231,15 @@ try {
196
231
  socket.addEventListener('close', async ({ wasClean }) => {
197
232
  if (wasClean)
198
233
  return;
234
+ if (!isOpened && onCloseWithoutOpen) {
235
+ onCloseWithoutOpen();
236
+ return;
237
+ }
199
238
  console.log(`[vite] server connection lost. polling for restart...`);
200
- await waitForSuccessfulPing();
239
+ await waitForSuccessfulPing(hostAndPath);
201
240
  location.reload();
202
241
  });
203
- }
204
- catch (error) {
205
- console.error(`[vite] failed to connect to websocket (${error}). `);
242
+ return socket;
206
243
  }
207
244
  function warnFailedFetch(err, path) {
208
245
  if (!err.message.match('fetch')) {
@@ -256,7 +293,17 @@ async function handleMessage(payload) {
256
293
  const el = Array.from(document.querySelectorAll('link')).find((e) => cleanUrl(e.href).includes(searchUrl));
257
294
  if (el) {
258
295
  const newPath = `${base}${searchUrl.slice(1)}${searchUrl.includes('?') ? '&' : '?'}t=${timestamp}`;
259
- el.href = new URL(newPath, el.href).href;
296
+ // rather than swapping the href on the existing tag, we will
297
+ // create a new link tag. Once the new stylesheet has loaded we
298
+ // will remove the existing link tag. This removes a Flash Of
299
+ // Unstyled Content that can occur when swapping out the tag href
300
+ // directly, as the new stylesheet has not yet been loaded.
301
+ const newLinkTag = el.cloneNode();
302
+ newLinkTag.href = new URL(newPath, el.href).href;
303
+ const removeOldEl = () => el.remove();
304
+ newLinkTag.addEventListener('load', removeOldEl);
305
+ newLinkTag.addEventListener('error', removeOldEl);
306
+ el.after(newLinkTag);
260
307
  }
261
308
  console.log(`[vite] css hot updated: ${searchUrl}`);
262
309
  }
@@ -353,13 +400,13 @@ async function queueUpdate(p) {
353
400
  (await Promise.all(loading)).forEach((fn) => fn && fn());
354
401
  }
355
402
  }
356
- async function waitForSuccessfulPing(ms = 1000) {
403
+ async function waitForSuccessfulPing(hostAndPath, ms = 1000) {
357
404
  // eslint-disable-next-line no-constant-condition
358
405
  while (true) {
359
406
  try {
360
407
  // A fetch on a websocket URL will return a successful promise with status 400,
361
408
  // but will reject a networking error.
362
- await fetch(`${location.protocol}//${socketHost}`);
409
+ await fetch(`${location.protocol}//${hostAndPath}`);
363
410
  break;
364
411
  }
365
412
  catch (e) {
@@ -521,6 +568,11 @@ function createHotContext(ownerPath) {
521
568
  throw new Error(`invalid hot.accept() usage.`);
522
569
  }
523
570
  },
571
+ // export names (first arg) are irrelevant on the client side, they're
572
+ // extracted in the server for propagation
573
+ acceptExports(_, callback) {
574
+ acceptDeps([ownerPath], callback && (([mod]) => callback(mod)));
575
+ },
524
576
  dispose(cb) {
525
577
  disposeMap.set(ownerPath, cb);
526
578
  },