Skip to content

Commit

Permalink
Temporarily bundle babel dependency for hotfix
Browse files Browse the repository at this point in the history
  • Loading branch information
Timer committed Aug 31, 2020
1 parent fac9631 commit 5e3868c
Show file tree
Hide file tree
Showing 9 changed files with 94 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
MIT License

Copyright (c) 2014-present Sebastian McKenzie and other contributors

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:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"name":"@babel/helper-builder-react-jsx-experimental","main":"index.js","license":"MIT"}
22 changes: 22 additions & 0 deletions packages/next/compiled/@babel/preset-react/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
MIT License

Copyright (c) 2014-present Sebastian McKenzie and other contributors

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:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1 change: 1 addition & 0 deletions packages/next/compiled/@babel/preset-react/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"name":"@babel/preset-react","main":"index.js","author":"Sebastian McKenzie <[email protected]>","license":"MIT"}

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions packages/next/compiled/babel__preset-react/index.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions packages/next/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@
"react-dom": "^16.6.0"
},
"devDependencies": {
"@babel/helper-builder-react-jsx-experimental": "gist:f4f085f422d7c2c0fd53fa347b491d4f",
"@next/polyfill-nomodule": "9.5.3-canary.25",
"@taskr/clear": "1.1.0",
"@taskr/esnext": "1.1.0",
Expand Down
33 changes: 33 additions & 0 deletions packages/next/taskfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -489,6 +489,37 @@ export async function ncc_semver(task, opts) {
.target('compiled/semver')
}

externals['@babel/helper-builder-react-jsx-experimental'] =
'next/dist/compiled/babel__helper-builder-react-jsx-experimental'
export async function ncc_babel__helper_builder_react_jsx_experimental(
task,
opts
) {
await task
.source(
opts.src ||
relative(
__dirname,
require.resolve('@babel/helper-builder-react-jsx-experimental')
)
)
.ncc({
packageName: '@babel/helper-builder-react-jsx-experimental',
externals,
})
.target('compiled/babel__helper-builder-react-jsx-experimental')
}

externals['@babel/preset-react'] = 'next/dist/compiled/babel__preset-react'
export async function ncc_babel__preset_react(task, opts) {
await task
.source(
opts.src || relative(__dirname, require.resolve('@babel/preset-react'))
)
.ncc({ packageName: '@babel/preset-react', externals })
.target('compiled/babel__preset-react')
}

externals['path-to-regexp'] = 'next/dist/compiled/path-to-regexp'
export async function path_to_regexp(task, opts) {
await task
Expand Down Expand Up @@ -561,6 +592,8 @@ export async function ncc(task) {
'ncc_terser_webpack_plugin',
'ncc_comment_json',
'ncc_semver',
'ncc_babel__helper_builder_react_jsx_experimental',
'ncc_babel__preset_react',
])
}

Expand Down
15 changes: 12 additions & 3 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,14 @@
"@babel/helper-module-imports" "^7.8.3"
"@babel/types" "^7.9.5"

"@babel/helper-builder-react-jsx-experimental@gist:f4f085f422d7c2c0fd53fa347b491d4f":
version "7.10.5-next.js"
resolved "https://gist.github.com/f4f085f422d7c2c0fd53fa347b491d4f.git#c89a3ad746024481bc30e2e0da7ff9db4415518d"
dependencies:
"@babel/helper-annotate-as-pure" "^7.10.4"
"@babel/helper-module-imports" "^7.10.4"
"@babel/types" "^7.10.5"

"@babel/helper-builder-react-jsx@^7.10.4":
version "7.10.4"
resolved "https://registry.yarnpkg.com/@babel/helper-builder-react-jsx/-/helper-builder-react-jsx-7.10.4.tgz#8095cddbff858e6fa9c326daee54a2f2732c1d5d"
Expand Down Expand Up @@ -7596,9 +7604,10 @@ finalhandler@~1.1.2:
statuses "~1.5.0"
unpipe "~1.0.0"

[email protected]:
version "0.1.0"
resolved "https://registry.yarnpkg.com/finally-polyfill/-/finally-polyfill-0.1.0.tgz#2a17b16581d9477db16a703c7b79a898ac0b7d50"
[email protected]:
version "0.2.0"
resolved "https://registry.yarnpkg.com/finally-polyfill/-/finally-polyfill-0.2.0.tgz#1b34c6e555a6c1603d2ae046e2e176d08687bfdb"
integrity sha512-3w46w5Vo4TRtk5jrLT3c8ITGxnPJhMAg3Ogbj4nmgL6thNep9+UgBgk+IRVmRpZDbwNkR7tyGsE3S3J4Qt2zVw==

[email protected], find-cache-dir@^3.0.0, find-cache-dir@^3.3.1:
version "3.3.1"
Expand Down

0 comments on commit 5e3868c

Please sign in to comment.