Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
N
next.js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alex
next.js
Commits
ff5e4442
Unverified
Commit
ff5e4442
authored
Aug 12, 2021
by
Maia Teegarden
Committed by
GitHub
Aug 12, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use @next scope for native packages (#28046)
parent
25df53d1
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
29 additions
and
32 deletions
+29
-32
index.js
packages/next/build/swc/index.js
+1
-1
README.md
packages/next/build/swc/npm/darwin-arm64/README.md
+3
-0
package.json
packages/next/build/swc/npm/darwin-arm64/package.json
+1
-1
README.md
packages/next/build/swc/npm/darwin-x64/README.md
+3
-0
package.json
packages/next/build/swc/npm/darwin-x64/package.json
+1
-1
README.md
packages/next/build/swc/npm/linux-x64-gnu/README.md
+3
-0
package.json
packages/next/build/swc/npm/linux-x64-gnu/package.json
+1
-1
README.md
packages/next/build/swc/npm/next-swc-darwin-arm64/README.md
+0
-3
README.md
packages/next/build/swc/npm/next-swc-darwin-x64/README.md
+0
-3
README.md
packages/next/build/swc/npm/next-swc-linux-x64-gnu/README.md
+0
-3
README.md
...ages/next/build/swc/npm/next-swc-win32-x64-msvc/README.md
+0
-3
README.md
packages/next/build/swc/npm/win32-x64-msvc/README.md
+3
-0
package.json
packages/next/build/swc/npm/win32-x64-msvc/package.json
+1
-1
publish-native.js
scripts/publish-native.js
+12
-15
No files found.
packages/next/build/swc/index.js
View file @
ff5e4442
...
...
@@ -12,7 +12,7 @@ const path = require('path')
const
bindings
=
loadBinding
(
path
.
join
(
__dirname
,
'../../../native'
),
'next-swc'
,
'
next-
swc'
'
@next/
swc'
)
async
function
transform
(
src
,
options
)
{
...
...
packages/next/build/swc/npm/darwin-arm64/README.md
0 → 100644
View file @
ff5e4442
# `@next/swc-darwin-arm64`
This is the
**aarch64-apple-darwin**
binary for
`@next/swc`
packages/next/build/swc/npm/
next-swc-
darwin-arm64/package.json
→
packages/next/build/swc/npm/darwin-arm64/package.json
View file @
ff5e4442
{
"name"
:
"
next-
swc-darwin-arm64"
,
"name"
:
"
@next/
swc-darwin-arm64"
,
"version"
:
"0.0.0"
,
"os"
:
[
"darwin"
...
...
packages/next/build/swc/npm/darwin-x64/README.md
0 → 100644
View file @
ff5e4442
# `@next/swc-darwin-x64`
This is the
**x86_64-apple-darwin**
binary for
`@next/swc`
packages/next/build/swc/npm/
next-swc-
darwin-x64/package.json
→
packages/next/build/swc/npm/darwin-x64/package.json
View file @
ff5e4442
{
"name"
:
"
next-
swc-darwin-x64"
,
"name"
:
"
@next/
swc-darwin-x64"
,
"version"
:
"0.0.0"
,
"os"
:
[
"darwin"
...
...
packages/next/build/swc/npm/linux-x64-gnu/README.md
0 → 100644
View file @
ff5e4442
# `@next/swc-linux-x64-gnu`
This is the
**x86_64-unknown-linux-gnu**
binary for
`@next/swc`
packages/next/build/swc/npm/
next-swc-
linux-x64-gnu/package.json
→
packages/next/build/swc/npm/linux-x64-gnu/package.json
View file @
ff5e4442
{
"name"
:
"
next-
swc-linux-x64-gnu"
,
"name"
:
"
@next/
swc-linux-x64-gnu"
,
"version"
:
"0.0.0"
,
"os"
:
[
"linux"
...
...
packages/next/build/swc/npm/next-swc-darwin-arm64/README.md
deleted
100644 → 0
View file @
25df53d1
# `next-swc-darwin-arm64`
This is the
**aarch64-apple-darwin**
binary for
`next-swc`
packages/next/build/swc/npm/next-swc-darwin-x64/README.md
deleted
100644 → 0
View file @
25df53d1
# `next-swc-darwin-x64`
This is the
**x86_64-apple-darwin**
binary for
`next-swc`
packages/next/build/swc/npm/next-swc-linux-x64-gnu/README.md
deleted
100644 → 0
View file @
25df53d1
# `next-swc-linux-x64-gnu`
This is the
**x86_64-unknown-linux-gnu**
binary for
`next-swc`
packages/next/build/swc/npm/next-swc-win32-x64-msvc/README.md
deleted
100644 → 0
View file @
25df53d1
# `next-swc-win32-x64-msvc`
This is the
**x86_64-pc-windows-msvc**
binary for
`next-swc`
packages/next/build/swc/npm/win32-x64-msvc/README.md
0 → 100644
View file @
ff5e4442
# `@next/swc-win32-x64-msvc`
This is the
**x86_64-pc-windows-msvc**
binary for
`@next/swc`
packages/next/build/swc/npm/
next-swc-
win32-x64-msvc/package.json
→
packages/next/build/swc/npm/win32-x64-msvc/package.json
View file @
ff5e4442
{
"name"
:
"
next-
swc-win32-x64-msvc"
,
"name"
:
"
@next/
swc-win32-x64-msvc"
,
"version"
:
"0.0.0"
,
"os"
:
[
"win32"
...
...
scripts/publish-native.js
View file @
ff5e4442
...
...
@@ -15,28 +15,25 @@ const cwd = process.cwd()
// Copy binaries to package folders, update version, and publish
let
nativePackagesDir
=
path
.
join
(
cwd
,
'packages/next/build/swc/npm'
)
let
nativePackages
=
await
readdir
(
nativePackagesDir
)
for
(
let
nativePackage
of
nativePackages
)
{
if
(
nativePackage
===
'.gitignore'
)
{
continue
}
let
binaryName
=
`next-swc.
${
nativePackage
.
substr
(
9
)}
.node`
let
platforms
=
await
(
await
readdir
(
nativePackagesDir
)).
filter
(
(
name
)
=>
name
!==
'.gitignore'
)
for
(
let
platform
of
platforms
)
{
let
binaryName
=
`next-swc.
${
platform
}
.node`
await
copy
(
path
.
join
(
cwd
,
'packages/next/build/swc/dist'
,
binaryName
),
path
.
join
(
nativePackagesDir
,
nativePackage
,
binaryName
)
path
.
join
(
nativePackagesDir
,
platform
,
binaryName
)
)
let
pkg
=
JSON
.
parse
(
await
readFile
(
path
.
join
(
nativePackagesDir
,
nativePackage
,
'package.json'
)
)
await
readFile
(
path
.
join
(
nativePackagesDir
,
platform
,
'package.json'
))
)
pkg
.
version
=
version
await
writeFile
(
path
.
join
(
nativePackagesDir
,
nativePackage
,
'package.json'
),
path
.
join
(
nativePackagesDir
,
platform
,
'package.json'
),
JSON
.
stringify
(
pkg
,
null
,
2
)
)
execSync
(
`npm publish
${
path
.
join
(
nativePackagesDir
,
nativePackage
)}${
`npm publish
${
path
.
join
(
nativePackagesDir
,
platform
)}${
gitref
.
includes
(
'canary'
)
?
' --tag canary'
:
''
}
`
)
...
...
@@ -44,7 +41,7 @@ const cwd = process.cwd()
execSync
(
`git update-index --skip-worktree
${
path
.
join
(
nativePackagesDir
,
nativePackage
,
platform
,
'package.json'
)}
`
)
...
...
@@ -54,9 +51,9 @@ const cwd = process.cwd()
let
nextPkg
=
JSON
.
parse
(
await
readFile
(
path
.
join
(
cwd
,
'packages/next/package.json'
))
)
for
(
let
name
of
nativePackage
s
)
{
for
(
let
platform
of
platform
s
)
{
let
optionalDependencies
=
nextPkg
.
optionalDependencies
||
{}
optionalDependencies
[
name
]
=
version
optionalDependencies
[
'@next/swc-'
+
platform
]
=
version
nextPkg
.
optionalDependencies
=
optionalDependencies
}
await
writeFile
(
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment