Commit graph

962 commits

Author SHA1 Message Date
JJ Kasper
f090f321ee v13.2.5-canary.23 2023-03-31 13:53:10 +00:00
JJ Kasper
a6e504933b v13.2.5-canary.22 2023-03-31 00:57:10 +00:00
JJ Kasper
4803102a24 v13.2.5-canary.21 2023-03-30 05:16:37 +00:00
Tobias Koppers
18131c7dab v13.2.5-canary.20 2023-03-28 08:18:00 +00:00
JJ Kasper
53bcdea01c v13.2.5-canary.19 2023-03-27 07:05:28 +00:00
Tim Neutkens
266fd1cd67 v13.2.5-canary.18 2023-03-25 20:39:25 +01:00
Tobias Koppers
6ec94141f5 v13.2.5-canary.17 2023-03-25 13:49:36 +00:00
Tim Neutkens
baae7b1f44
Clean up leftover loaders (#46801)
More cleanup flowing out of the removal of the `target` option.

<!--
Thanks for opening a PR! Your contribution is much appreciated.
To make sure your PR is handled as smoothly as possible we request that
you follow the checklist sections below.
Choose the right checklist for the change(s) that you're making:
-->

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have a helpful link attached, see
[`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md)

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the
feature request has been accepted for implementation before opening a
PR.
- [ ] Related issues linked using `fixes #number`
- [ ]
[e2e](https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs)
tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have a helpful link attached, see
[`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md)

## Documentation / Examples

- [ ] Make sure the linting passes by running `pnpm build && pnpm lint`
- [ ] The "examples guidelines" are followed from [our contributing
doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)

---------

Co-authored-by: Shu Ding <g@shud.in>
2023-03-25 10:21:27 +01:00
JJ Kasper
be14eb1373 v13.2.5-canary.16 2023-03-24 06:24:45 +00:00
JJ Kasper
7d8310512f
v13.2.5-canary.15 2023-03-23 12:46:01 -07:00
Jimmy Lai
0416bd559d v13.2.5-canary.14 2023-03-23 10:15:46 +01:00
JJ Kasper
95322649ff
v13.2.5-canary.13 2023-03-22 15:55:34 -07:00
JJ Kasper
2e7dfca362
v13.2.5-canary.12 2023-03-21 16:23:51 -07:00
JJ Kasper
4ffaf5067f
v13.2.5-canary.11 2023-03-21 12:17:30 -07:00
JJ Kasper
17e1cc7a7b
v13.2.5-canary.10 2023-03-20 18:20:45 -07:00
Tim Neutkens
5d9b166eba v13.2.5-canary.9 2023-03-20 22:06:42 +01:00
JJ Kasper
1467be886a
v13.2.5-canary.8 2023-03-17 16:13:40 -07:00
Tim Neutkens
7a104a673b v13.2.5-canary.7 2023-03-17 13:31:21 +01:00
Tim Neutkens
6aa8c3768e v13.2.5-canary.6 2023-03-17 10:10:26 +01:00
Tim Neutkens
4e96e044d2 v13.2.5-canary.5 2023-03-16 21:53:59 +01:00
Tim Neutkens
e6f33ec3a1 v13.2.5-canary.4 2023-03-15 11:55:55 +01:00
JJ Kasper
6706a2a6ba
v13.2.5-canary.3 2023-03-13 21:46:07 -07:00
JJ Kasper
0b3e357808
v13.2.5-canary.2 2023-03-13 11:46:11 -07:00
Tim Neutkens
287ad83399 v13.2.5-canary.1 2023-03-11 20:41:30 +01:00
Tim Neutkens
7d48edfe8e v13.2.5-canary.0 2023-03-10 18:06:16 +01:00
JJ Kasper
05f6de1086
v13.2.4 2023-03-09 16:41:28 -08:00
JJ Kasper
1ce3b36179
v13.2.4-canary.9 2023-03-09 14:46:45 -08:00
Noemi
71dbcacf17
Do not re-assign process.env (#46914)
## Checklist

- [ ] Related issues linked using `fixes #number` 
  - no related issue exists, happy to open one if desired
- [x] Tests added
- not sure if specific tests are needed? there is an integration test
for environment variables, and Next.js relies a lot on passing
information through environment variables; i'd expect everything to
break if this change broke environment variable handling
- [x] Errors have a helpful link attached, see
https://github.com/vercel/next.js/blob/canary/contributing.md
  - no new errors, does not apply

### What?

Re-assigning `process.env` substitutes the "magic object" that sets
environment variables at the process level with an ordinary JavaScript
object. This causes environment variables that are set after
`process.env` is re-assigned to not be visible to native add-ons.

See [this Node.js issue][issue] and [this reproduction case][repro] for
details.

[issue]: https://github.com/nodejs/node/issues/46996
[repro]: https://github.com/unflxw/nodejs-process-env-addons-repro

### Why?

In general, paraphrasing the maintainer in the Node.js issue,
re-assigning `process.env` is not a thing you should do. More
specifically, I'm trying to use Next.js' experimental OpenTelemetry
support with AppSignal's Node.js integration, which also uses
OpenTelemetry.

The AppSignal Node.js package sets environment variables in order to
configure a long-running process, which is then launched through a
native add-on. Because of the re-assignment of `process.env` that occurs
early in Next.js' lifecycle process, by the time the AppSignal Node.js
package sets environment variables, it's setting them in an ordinary
JavaScript object that Next.js left in the global `process` object, not
in the magic one created by the Node.js runtime.

This means that these environment variables are not _actually_ being set
for the process at the OS level, and therefore they're also not set for
the native add-on, or for the long-running process it spawns.

### How?

A `replaceProcessEnv` function is implemented that takes an environment
object as an argument, and applies the difference between that
environment object and the current environment to the existing
`process.env` object. This function is used instead of re-assigning
`process.env`.

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2023-03-09 14:41:50 -08:00
JJ Kasper
715f96fb49
v13.2.4-canary.8 2023-03-08 16:06:57 -08:00
JJ Kasper
f99ae5af97
v13.2.4-canary.7 2023-03-08 11:52:58 -08:00
JJ Kasper
85ec94ffd7
v13.2.4-canary.6 2023-03-07 14:10:34 -08:00
JJ Kasper
a5a13fe930
v13.2.4-canary.5 2023-03-06 23:30:31 -08:00
JJ Kasper
a0c5a630f9
v13.2.4-canary.4 2023-03-05 10:26:29 -08:00
JJ Kasper
8d9b0b111f
v13.2.4-canary.3 2023-03-04 14:41:44 -08:00
JJ Kasper
f2989f747f
v13.2.4-canary.2 2023-03-03 17:36:25 -08:00
JJ Kasper
f7bfaff83b
v13.2.4-canary.1 2023-03-02 18:35:39 -08:00
JJ Kasper
262501eb68
v13.2.4-canary.0 2023-03-01 19:38:37 -08:00
JJ Kasper
7f0b9e262b
v13.2.3 2023-03-01 00:46:27 -08:00
JJ Kasper
419ade23b6
v13.2.3-canary.1 2023-03-01 00:26:46 -08:00
JJ Kasper
cccf4f2a29
v13.2.3-canary.0 2023-02-28 22:40:40 -08:00
JJ Kasper
5d48d7e6ed
v13.2.2 2023-02-28 17:48:09 -08:00
JJ Kasper
250a2f59b3
v13.2.2-canary.5 2023-02-28 16:31:35 -08:00
JJ Kasper
89a9bd9f74
v13.2.2-canary.4 2023-02-28 12:36:40 -08:00
Tim Neutkens
3609bdbffe v13.2.2-canary.3 2023-02-28 10:15:03 +01:00
JJ Kasper
6b276042ee
v13.2.2-canary.2 2023-02-27 17:17:33 -08:00
JJ Kasper
ff4e06afd1
v13.2.2-canary.1 2023-02-25 12:51:34 -08:00
JJ Kasper
e0e81ea049
v13.2.2-canary.0 2023-02-24 16:58:01 -08:00
JJ Kasper
8d83d85e53
v13.2.1 2023-02-23 17:56:27 -08:00
JJ Kasper
10ada08332
v13.2.1-canary.0 2023-02-23 17:29:49 -08:00
JJ Kasper
cf8ca960c4
v13.2.0 2023-02-23 10:10:30 -08:00