React: `const` in prop-types `lib/ReactPropTypesSecret.js`

Created on 8 Apr 2017  ยท  13Comments  ยท  Source: facebook/react

Do you want to request a feature or report a bug?

Bug: [email protected] contains an un-transpiled const in lib/ReactPropTypesSecret.js.

Not sure where the code for this lives.

Most helpful comment

The usual procedure for any long-awaited release ๐Ÿ˜…

All 13 comments

Fixing now!

Hmm, perhaps we need a karma / PhantomJS@1 test to check for this kind of thing in the future?

Should be fixed! Want to give it another try?

~/Projects 
15:31 $ mkdir test2
โœ” ~/Projects 
15:31 $ cd test2/
โœ” ~/Projects/test2 
15:31 $ yarn add react
yarn add v0.21.3
info No lockfile found.
[1/4] ๐Ÿ”  Resolving packages...
[2/4] ๐Ÿšš  Fetching packages...
[3/4] ๐Ÿ”—  Linking dependencies...
[4/4] ๐Ÿ“ƒ  Building fresh packages...
success Saved lockfile.
success Saved 17 new dependencies.
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ””โ”€ [email protected]
โœจ  Done in 2.23s.
โœ” ~/Projects/test2 
15:32 $ cat node_modules/prop-types/lib/ReactPropTypesSecret.js 
/**
 * Copyright 2013-present, Facebook, Inc.
 * All rights reserved.
 *
 * This source code is licensed under the BSD-style license found in the
 * LICENSE file in the root directory of this source tree. An additional grant
 * of patent rights can be found in the PATENTS file in the same directory.
 */

'use strict';

const ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';

module.exports = ReactPropTypesSecret;

It looks like [email protected] has a dependency on [email protected]. Is that correct?

Ahhh I see the problem. Yep, that's it.

Fixing now

The usual procedure for any long-awaited release ๐Ÿ˜…

๐Ÿ‘ fixed for me locally now.

Awesome, sorry for the trouble. Thanks for the quick report!

Strange, node_modules/react/lib/ReactPropTypesSecret.js is actually with var but node_modules/react/dist/react.js still has const.

@manuelbertelli Yep, should be fixed in 15.5.2

Was this page helpful?
0 / 5 - 0 ratings