#22988 - Fix Bug: @license header in React 18 bundles contains vundefined#23004
Merged
bvaughn merged 2 commits intofacebook:mainfrom Dec 21, 2021
Merged
#22988 - Fix Bug: @license header in React 18 bundles contains vundefined#23004bvaughn merged 2 commits intofacebook:mainfrom
bvaughn merged 2 commits intofacebook:mainfrom
Conversation
Contributor
|
try |
Contributor
Author
bvaughn
approved these changes
Dec 21, 2021
bvaughn
suggested changes
Dec 21, 2021
Contributor
bvaughn
left a comment
There was a problem hiding this comment.
Removing approval for now to avoid confusion.
Contributor
Author
|
If I can help with something else LMK please |
Contributor
|
There's an interesting mix of concerns here between the Rollup scripts that are building the JS bundles we're about to publish and the bespoke release scripts we use that inject the right version number after building and before publishing. Honestly maybe the best fix here for now is just to remove the version from the header comment. 😄 diff --git a/scripts/rollup/wrappers.js b/scripts/rollup/wrappers.js
index 46b162cee..9f61b8b17 100644
--- a/scripts/rollup/wrappers.js
+++ b/scripts/rollup/wrappers.js
@@ -3,7 +3,6 @@
const {resolve} = require('path');
const {readFileSync} = require('fs');
const {bundleTypes, moduleTypes} = require('./bundles');
-const reactVersion = require('../../packages/react-dom/package.json').version;
const {
NODE_ES2015,
@@ -54,7 +53,8 @@ const license = ` * Copyright (c) Facebook, Inc. and its affiliates.
const wrappers = {
/***************** NODE_ES2015 *****************/
[NODE_ES2015](source, globalName, filename, moduleType) {
- return `/** @license React v${reactVersion}
+ return `/**
+ * @license React
* ${filename}
*
${license}
@@ -67,7 +67,8 @@ ${source}`;
/***************** NODE_ESM *****************/
[NODE_ESM](source, globalName, filename, moduleType) {
- return `/** @license React v${reactVersion}
+ return `/**
+ * @license React
* ${filename}
*
${license}
@@ -78,7 +79,8 @@ ${source}`;
/***************** UMD_DEV *****************/
[UMD_DEV](source, globalName, filename, moduleType) {
- return `/** @license React v${reactVersion}
+ return `/**
+ * @license React
* ${filename}
*
${license}
@@ -88,7 +90,8 @@ ${source}`;
/***************** UMD_PROD *****************/
[UMD_PROD](source, globalName, filename, moduleType) {
- return `/** @license React v${reactVersion}
+ return `/**
+ * @license React
* ${filename}
*
${license}
@@ -98,7 +101,8 @@ ${license}
/***************** UMD_PROFILING *****************/
[UMD_PROFILING](source, globalName, filename, moduleType) {
- return `/** @license React v${reactVersion}
+ return `/**
+ * @license React
* ${filename}
*
${license}
@@ -108,7 +112,8 @@ ${license}
/***************** NODE_DEV *****************/
[NODE_DEV](source, globalName, filename, moduleType) {
- return `/** @license React v${reactVersion}
+ return `/**
+ * @license React
* ${filename}
*
${license}
@@ -125,7 +130,8 @@ ${source}
/***************** NODE_PROD *****************/
[NODE_PROD](source, globalName, filename, moduleType) {
- return `/** @license React v${reactVersion}
+ return `/**
+ * @license React
* ${filename}
*
${license}
@@ -135,7 +141,8 @@ ${source}`;
/***************** NODE_PROFILING *****************/
[NODE_PROFILING](source, globalName, filename, moduleType) {
- return `/** @license React v${reactVersion}
+ return `/**
+ * @license React
* ${filename}
*
${license}
@@ -294,7 +301,8 @@ ${source}`;
const reconcilerWrappers = {
/***************** NODE_DEV (reconciler only) *****************/
[NODE_DEV](source, globalName, filename, moduleType) {
- return `/** @license React v${reactVersion}
+ return `/**
+ * @license React
* ${filename}
*
${license}
@@ -313,7 +321,8 @@ ${source}
/***************** NODE_PROD (reconciler only) *****************/
[NODE_PROD](source, globalName, filename, moduleType) {
- return `/** @license React v${reactVersion}
+ return `/**
+ * @license React
* ${filename}
*
${license}
@@ -327,7 +336,8 @@ ${source}
/***************** NODE_PROFILING (reconciler only) *****************/
[NODE_PROFILING](source, globalName, filename, moduleType) {
- return `/** @license React v${reactVersion}
+ return `/**
+ * @license React
* ${filename}
*
${license} |
Contributor
Author
|
haha, ok, i pushed the change |
facebook-github-bot
pushed a commit
to facebook/react-native
that referenced
this pull request
Jan 10, 2022
Summary: This sync includes the following changes: - **[fe905f1](facebook/react@fe905f152 )**: Update package.json ([#22954](facebook/react#22954)) //<Jack Works>// - **[3dc41d8](facebook/react@3dc41d8a2 )**: fix: parseExportNamesInto specifiers typo ([#22537](facebook/react#22537)) //<btea>// - **[bd0a5dd](facebook/react@bd0a5dd68 )**: #22988 - Fix Bug: license header in React 18 bundles contains vundefined ([#23004](facebook/react#23004)) //<Vitalie>// - **[ceee524](facebook/react@ceee524a8 )**: Remove unnecessary clearContainer call ([#22979](facebook/react#22979)) //<Sebastian Markbåge>// - **[cd1a3e9](facebook/react@cd1a3e9b5 )**: Build both a partial renderer and fizz renderer of the legacy API for FB ([#22933](facebook/react#22933)) //<Sebastian Markbåge>// Changelog: [General][Changed] - React Native sync for revisions a049aa0...fe905f1 jest_e2e[run_all_tests] Reviewed By: rickhanlonii Differential Revision: D33512179 fbshipit-source-id: c2df06c8af6bb674ea0c5524538259e6d6d98f78
zhengjitf
pushed a commit
to zhengjitf/react
that referenced
this pull request
Apr 15, 2022
…s vundefined (facebook#23004) * Fix Bug: @license header in React 18 bundles contains vundefined * Remove React version from the header comment
nevilm-lt
pushed a commit
to nevilm-lt/react
that referenced
this pull request
Apr 22, 2022
…s vundefined (facebook#23004) * Fix Bug: @license header in React 18 bundles contains vundefined * Remove React version from the header comment
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Fix the version issue - #22988