Skip to content

Commit

Permalink
fix: re-release napi packages (#39)
Browse files Browse the repository at this point in the history
* fix: re-release napi packages

* fix: rename napi project to archons-napi

* fix: remove options add by prepublish

* fix: napi package failed to release
  • Loading branch information
fu050409 authored Jul 21, 2024
1 parent 7eab5ef commit 0968fe3
Show file tree
Hide file tree
Showing 30 changed files with 96 additions and 91 deletions.
5 changes: 5 additions & 0 deletions .changeset/fuzzy-windows-accept.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'archons': patch
---

Fix napi package failed to release
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Build and Test
env:
DEBUG: napi:*
APP_NAME: archons
APP_NAME: archons-napi
MACOSX_DEPLOYMENT_TARGET: '10.13'
CARGO_INCREMENTAL: '1'
permissions:
Expand Down
72 changes: 36 additions & 36 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ switch (platform) {
case 'android':
switch (arch) {
case 'arm64':
localFileExisted = existsSync(join(__dirname, 'archons.android-arm64.node'))
localFileExisted = existsSync(join(__dirname, 'archons-napi.android-arm64.node'))
try {
if (localFileExisted) {
nativeBinding = require('./archons.android-arm64.node')
nativeBinding = require('./archons-napi.android-arm64.node')
} else {
nativeBinding = require('archons-android-arm64')
}
Expand All @@ -44,10 +44,10 @@ switch (platform) {
}
break
case 'arm':
localFileExisted = existsSync(join(__dirname, 'archons.android-arm-eabi.node'))
localFileExisted = existsSync(join(__dirname, 'archons-napi.android-arm-eabi.node'))
try {
if (localFileExisted) {
nativeBinding = require('./archons.android-arm-eabi.node')
nativeBinding = require('./archons-napi.android-arm-eabi.node')
} else {
nativeBinding = require('archons-android-arm-eabi')
}
Expand All @@ -63,11 +63,11 @@ switch (platform) {
switch (arch) {
case 'x64':
localFileExisted = existsSync(
join(__dirname, 'archons.win32-x64-msvc.node')
join(__dirname, 'archons-napi.win32-x64-msvc.node')
)
try {
if (localFileExisted) {
nativeBinding = require('./archons.win32-x64-msvc.node')
nativeBinding = require('./archons-napi.win32-x64-msvc.node')
} else {
nativeBinding = require('archons-win32-x64-msvc')
}
Expand All @@ -77,11 +77,11 @@ switch (platform) {
break
case 'ia32':
localFileExisted = existsSync(
join(__dirname, 'archons.win32-ia32-msvc.node')
join(__dirname, 'archons-napi.win32-ia32-msvc.node')
)
try {
if (localFileExisted) {
nativeBinding = require('./archons.win32-ia32-msvc.node')
nativeBinding = require('./archons-napi.win32-ia32-msvc.node')
} else {
nativeBinding = require('archons-win32-ia32-msvc')
}
Expand All @@ -91,11 +91,11 @@ switch (platform) {
break
case 'arm64':
localFileExisted = existsSync(
join(__dirname, 'archons.win32-arm64-msvc.node')
join(__dirname, 'archons-napi.win32-arm64-msvc.node')
)
try {
if (localFileExisted) {
nativeBinding = require('./archons.win32-arm64-msvc.node')
nativeBinding = require('./archons-napi.win32-arm64-msvc.node')
} else {
nativeBinding = require('archons-win32-arm64-msvc')
}
Expand All @@ -108,21 +108,21 @@ switch (platform) {
}
break
case 'darwin':
localFileExisted = existsSync(join(__dirname, 'archons.darwin-universal.node'))
localFileExisted = existsSync(join(__dirname, 'archons-napi.darwin-universal.node'))
try {
if (localFileExisted) {
nativeBinding = require('./archons.darwin-universal.node')
nativeBinding = require('./archons-napi.darwin-universal.node')
} else {
nativeBinding = require('archons-darwin-universal')
}
break
} catch {}
switch (arch) {
case 'x64':
localFileExisted = existsSync(join(__dirname, 'archons.darwin-x64.node'))
localFileExisted = existsSync(join(__dirname, 'archons-napi.darwin-x64.node'))
try {
if (localFileExisted) {
nativeBinding = require('./archons.darwin-x64.node')
nativeBinding = require('./archons-napi.darwin-x64.node')
} else {
nativeBinding = require('archons-darwin-x64')
}
Expand All @@ -132,11 +132,11 @@ switch (platform) {
break
case 'arm64':
localFileExisted = existsSync(
join(__dirname, 'archons.darwin-arm64.node')
join(__dirname, 'archons-napi.darwin-arm64.node')
)
try {
if (localFileExisted) {
nativeBinding = require('./archons.darwin-arm64.node')
nativeBinding = require('./archons-napi.darwin-arm64.node')
} else {
nativeBinding = require('archons-darwin-arm64')
}
Expand All @@ -152,10 +152,10 @@ switch (platform) {
if (arch !== 'x64') {
throw new Error(`Unsupported architecture on FreeBSD: ${arch}`)
}
localFileExisted = existsSync(join(__dirname, 'archons.freebsd-x64.node'))
localFileExisted = existsSync(join(__dirname, 'archons-napi.freebsd-x64.node'))
try {
if (localFileExisted) {
nativeBinding = require('./archons.freebsd-x64.node')
nativeBinding = require('./archons-napi.freebsd-x64.node')
} else {
nativeBinding = require('archons-freebsd-x64')
}
Expand All @@ -168,11 +168,11 @@ switch (platform) {
case 'x64':
if (isMusl()) {
localFileExisted = existsSync(
join(__dirname, 'archons.linux-x64-musl.node')
join(__dirname, 'archons-napi.linux-x64-musl.node')
)
try {
if (localFileExisted) {
nativeBinding = require('./archons.linux-x64-musl.node')
nativeBinding = require('./archons-napi.linux-x64-musl.node')
} else {
nativeBinding = require('archons-linux-x64-musl')
}
Expand All @@ -181,11 +181,11 @@ switch (platform) {
}
} else {
localFileExisted = existsSync(
join(__dirname, 'archons.linux-x64-gnu.node')
join(__dirname, 'archons-napi.linux-x64-gnu.node')
)
try {
if (localFileExisted) {
nativeBinding = require('./archons.linux-x64-gnu.node')
nativeBinding = require('./archons-napi.linux-x64-gnu.node')
} else {
nativeBinding = require('archons-linux-x64-gnu')
}
Expand All @@ -197,11 +197,11 @@ switch (platform) {
case 'arm64':
if (isMusl()) {
localFileExisted = existsSync(
join(__dirname, 'archons.linux-arm64-musl.node')
join(__dirname, 'archons-napi.linux-arm64-musl.node')
)
try {
if (localFileExisted) {
nativeBinding = require('./archons.linux-arm64-musl.node')
nativeBinding = require('./archons-napi.linux-arm64-musl.node')
} else {
nativeBinding = require('archons-linux-arm64-musl')
}
Expand All @@ -210,11 +210,11 @@ switch (platform) {
}
} else {
localFileExisted = existsSync(
join(__dirname, 'archons.linux-arm64-gnu.node')
join(__dirname, 'archons-napi.linux-arm64-gnu.node')
)
try {
if (localFileExisted) {
nativeBinding = require('./archons.linux-arm64-gnu.node')
nativeBinding = require('./archons-napi.linux-arm64-gnu.node')
} else {
nativeBinding = require('archons-linux-arm64-gnu')
}
Expand All @@ -226,11 +226,11 @@ switch (platform) {
case 'arm':
if (isMusl()) {
localFileExisted = existsSync(
join(__dirname, 'archons.linux-arm-musleabihf.node')
join(__dirname, 'archons-napi.linux-arm-musleabihf.node')
)
try {
if (localFileExisted) {
nativeBinding = require('./archons.linux-arm-musleabihf.node')
nativeBinding = require('./archons-napi.linux-arm-musleabihf.node')
} else {
nativeBinding = require('archons-linux-arm-musleabihf')
}
Expand All @@ -239,11 +239,11 @@ switch (platform) {
}
} else {
localFileExisted = existsSync(
join(__dirname, 'archons.linux-arm-gnueabihf.node')
join(__dirname, 'archons-napi.linux-arm-gnueabihf.node')
)
try {
if (localFileExisted) {
nativeBinding = require('./archons.linux-arm-gnueabihf.node')
nativeBinding = require('./archons-napi.linux-arm-gnueabihf.node')
} else {
nativeBinding = require('archons-linux-arm-gnueabihf')
}
Expand All @@ -255,11 +255,11 @@ switch (platform) {
case 'riscv64':
if (isMusl()) {
localFileExisted = existsSync(
join(__dirname, 'archons.linux-riscv64-musl.node')
join(__dirname, 'archons-napi.linux-riscv64-musl.node')
)
try {
if (localFileExisted) {
nativeBinding = require('./archons.linux-riscv64-musl.node')
nativeBinding = require('./archons-napi.linux-riscv64-musl.node')
} else {
nativeBinding = require('archons-linux-riscv64-musl')
}
Expand All @@ -268,11 +268,11 @@ switch (platform) {
}
} else {
localFileExisted = existsSync(
join(__dirname, 'archons.linux-riscv64-gnu.node')
join(__dirname, 'archons-napi.linux-riscv64-gnu.node')
)
try {
if (localFileExisted) {
nativeBinding = require('./archons.linux-riscv64-gnu.node')
nativeBinding = require('./archons-napi.linux-riscv64-gnu.node')
} else {
nativeBinding = require('archons-linux-riscv64-gnu')
}
Expand All @@ -283,11 +283,11 @@ switch (platform) {
break
case 's390x':
localFileExisted = existsSync(
join(__dirname, 'archons.linux-s390x-gnu.node')
join(__dirname, 'archons-napi.linux-s390x-gnu.node')
)
try {
if (localFileExisted) {
nativeBinding = require('./archons.linux-s390x-gnu.node')
nativeBinding = require('./archons-napi.linux-s390x-gnu.node')
} else {
nativeBinding = require('archons-linux-s390x-gnu')
}
Expand Down
4 changes: 2 additions & 2 deletions npm/android-arm-eabi/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# `archons-android-arm-eabi`
# `archons-napi-android-arm-eabi`

This is the **armv7-linux-androideabi** binary for `archons`
This is the **armv7-linux-androideabi** binary for `archons-napi`
4 changes: 2 additions & 2 deletions npm/android-arm-eabi/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "archons-android-arm-eabi",
"version": "0.1.1",
"name": "archons-napi-android-arm-eabi",
"version": "0.1.2",
"os": [
"android"
],
Expand Down
4 changes: 2 additions & 2 deletions npm/android-arm64/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# `archons-android-arm64`
# `archons-napi-android-arm64`

This is the **aarch64-linux-android** binary for `archons`
This is the **aarch64-linux-android** binary for `archons-napi`
4 changes: 2 additions & 2 deletions npm/android-arm64/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "archons-android-arm64",
"version": "0.1.1",
"name": "archons-napi-android-arm64",
"version": "0.1.2",
"os": [
"android"
],
Expand Down
4 changes: 2 additions & 2 deletions npm/darwin-arm64/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# `archons-darwin-arm64`
# `archons-napi-darwin-arm64`

This is the **aarch64-apple-darwin** binary for `archons`
This is the **aarch64-apple-darwin** binary for `archons-napi`
4 changes: 2 additions & 2 deletions npm/darwin-arm64/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "archons-darwin-arm64",
"version": "0.1.1",
"name": "archons-napi-darwin-arm64",
"version": "0.1.2",
"os": [
"darwin"
],
Expand Down
4 changes: 2 additions & 2 deletions npm/darwin-x64/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# `archons-darwin-x64`
# `archons-napi-darwin-x64`

This is the **x86_64-apple-darwin** binary for `archons`
This is the **x86_64-apple-darwin** binary for `archons-napi`
4 changes: 2 additions & 2 deletions npm/darwin-x64/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "archons-darwin-x64",
"version": "0.1.1",
"name": "archons-napi-darwin-x64",
"version": "0.1.2",
"os": [
"darwin"
],
Expand Down
4 changes: 2 additions & 2 deletions npm/freebsd-x64/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# `archons-freebsd-x64`
# `archons-napi-freebsd-x64`

This is the **x86_64-unknown-freebsd** binary for `archons`
This is the **x86_64-unknown-freebsd** binary for `archons-napi`
4 changes: 2 additions & 2 deletions npm/freebsd-x64/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "archons-freebsd-x64",
"version": "0.1.1",
"name": "archons-napi-freebsd-x64",
"version": "0.1.2",
"os": [
"freebsd"
],
Expand Down
4 changes: 2 additions & 2 deletions npm/linux-arm-gnueabihf/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# `archons-linux-arm-gnueabihf`
# `archons-napi-linux-arm-gnueabihf`

This is the **armv7-unknown-linux-gnueabihf** binary for `archons`
This is the **armv7-unknown-linux-gnueabihf** binary for `archons-napi`
4 changes: 2 additions & 2 deletions npm/linux-arm-gnueabihf/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "archons-linux-arm-gnueabihf",
"version": "0.1.1",
"name": "archons-napi-linux-arm-gnueabihf",
"version": "0.1.2",
"os": [
"linux"
],
Expand Down
4 changes: 2 additions & 2 deletions npm/linux-arm64-gnu/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# `archons-linux-arm64-gnu`
# `archons-napi-linux-arm64-gnu`

This is the **aarch64-unknown-linux-gnu** binary for `archons`
This is the **aarch64-unknown-linux-gnu** binary for `archons-napi`
4 changes: 2 additions & 2 deletions npm/linux-arm64-gnu/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "archons-linux-arm64-gnu",
"version": "0.1.1",
"name": "archons-napi-linux-arm64-gnu",
"version": "0.1.2",
"os": [
"linux"
],
Expand Down
4 changes: 2 additions & 2 deletions npm/linux-arm64-musl/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# `archons-linux-arm64-musl`
# `archons-napi-linux-arm64-musl`

This is the **aarch64-unknown-linux-musl** binary for `archons`
This is the **aarch64-unknown-linux-musl** binary for `archons-napi`
4 changes: 2 additions & 2 deletions npm/linux-arm64-musl/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "archons-linux-arm64-musl",
"version": "0.1.1",
"name": "archons-napi-linux-arm64-musl",
"version": "0.1.2",
"os": [
"linux"
],
Expand Down
4 changes: 2 additions & 2 deletions npm/linux-x64-gnu/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# `archons-linux-x64-gnu`
# `archons-napi-linux-x64-gnu`

This is the **x86_64-unknown-linux-gnu** binary for `archons`
This is the **x86_64-unknown-linux-gnu** binary for `archons-napi`
4 changes: 2 additions & 2 deletions npm/linux-x64-gnu/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "archons-linux-x64-gnu",
"version": "0.1.1",
"name": "archons-napi-linux-x64-gnu",
"version": "0.1.2",
"os": [
"linux"
],
Expand Down
Loading

0 comments on commit 0968fe3

Please sign in to comment.