Skip to content

Commit

Permalink
chore(release): publish 0.0.76; try fix publish
Browse files Browse the repository at this point in the history
  • Loading branch information
andelf committed Nov 13, 2023
1 parent b1a1f30 commit 2dba51a
Show file tree
Hide file tree
Showing 8 changed files with 9,013 additions and 6,692 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -266,8 +266,10 @@ jobs:
- name: Lerna publish
if: "startsWith(github.event.head_commit.message, 'chore(release): publish')"
run: |
npm config set provenance true
find ./packages/ -type d -maxdepth 1 -exec cp LICENSE {} \;
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
npx lerna publish from-package --no-verify-access --yes
yarn lerna publish from-package --no-verify-access --yes
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
44 changes: 24 additions & 20 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,35 +9,39 @@
"packages/*"
],
"scripts": {
"artifacts": "lerna run artifacts",
"artifacts": "yarn workspaces foreach -A --no-private run artifacts",
"bench": "lerna run bench --concurrency 1 --stream --no-prefix",
"build": "lerna run build --concurrency 1 --stream --no-prefix",
"build": "yarn workspaces foreach -A --no-private -j 1 run build",
"lint": "true",
"test": "true",
"format": "true",
"typecheck": "true"
},
"devDependencies": {
"@napi-rs/cli": "^2.3.0",
"@swc-node/register": "^1.4.2",
"@types/node": "^17.0.8",
"@typescript-eslint/eslint-plugin": "^5.9.0",
"@typescript-eslint/parser": "^5.9.0",
"ava": "^4.0.1",
"@napi-rs/cli": "2.16.5",
"@swc-node/core": "^1.10.6",
"@swc-node/register": "^1.6.8",
"@swc/core": "^1.3.95",
"@taplo/cli": "^0.5.2",
"@types/node": "^20.8.9",
"@typescript-eslint/eslint-plugin": "^6.9.0",
"@typescript-eslint/parser": "^6.9.0",
"ava": "^5.3.1",
"benchmark": "^2.1.4",
"codecov": "^3.8.3",
"cross-env": "^7.0.3",
"eslint": "^8.6.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-import": "^2.25.4",
"eslint-plugin-prettier": "^4.0.0",
"husky": "^7.0.4",
"lerna": "^4.0.0",
"lint-staged": "^12.1.7",
"eslint": "^8.52.0",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-import": "^2.29.0",
"eslint-plugin-prettier": "^5.0.1",
"husky": "^8.0.3",
"lerna": "^7.4.1",
"lint-staged": "^15.0.2",
"npm-run-all": "^4.1.5",
"nyc": "^15.1.0",
"prettier": "^2.5.1",
"tslib": "^2.3.1",
"typescript": "^4.5.4"
}
"prettier": "^3.0.3",
"ts-node": "^10.9.1",
"tslib": "^2.6.2",
"typescript": "^5.2.2"
},
"packageManager": "[email protected]"
}
32 changes: 27 additions & 5 deletions packages/rsapi/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,33 @@

/* auto-generated by NAPI-RS */

export class ExternalObject<T> {
readonly '': {
readonly '': unique symbol
[K: symbol]: T
}
export interface FileMeta {
size: number
/** modified time, in milliseconds */
mtime: number
/** creation time, in milliseconds */
ctime: number
md5: string
fname: string
incomingFname: string
normalizedFname: string
encryptedFname: string
}
/** Metadata for batch remote update */
export interface Metadata {
fsCaseSensitive: boolean
version: string
revision: string
platform: string
}
/** Download/Upload Progress Info */
export interface Progress {
graphUuid: string
file: string
type: string
progress: number
total: number
percent: number
}
/** Set rsapi Logger */
export function initLogger(jsLoggingFn: (...args: any[]) => any): void
Expand Down
61 changes: 46 additions & 15 deletions packages/rsapi/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
/* tslint:disable */
/* eslint-disable */
/* prettier-ignore */

/* auto-generated by NAPI-RS */

const { existsSync, readFileSync } = require('fs')
const { join } = require('path')

Expand All @@ -11,30 +17,46 @@ function isMusl() {
// For Node 10
if (!process.report || typeof process.report.getReport !== 'function') {
try {
return readFileSync('/usr/bin/ldd', 'utf8').includes('musl')
const lddPath = require('child_process').execSync('which ldd').toString().trim()
return readFileSync(lddPath, 'utf8').includes('musl')
} catch (e) {
return false
return true
}
} else {
const { glibcVersionRuntime } = process.report.getReport().header
return !Boolean(glibcVersionRuntime)
return !glibcVersionRuntime
}
}

switch (platform) {
case 'android':
if (arch !== 'arm64') {
throw new Error(`Unsupported architecture on Android ${arch}`)
}
localFileExisted = existsSync(join(__dirname, 'rsapi.android-arm64.node'))
try {
if (localFileExisted) {
nativeBinding = require('./rsapi.android-arm64.node')
} else {
nativeBinding = require('@logseq/rsapi-android-arm64')
}
} catch (e) {
loadError = e
switch (arch) {
case 'arm64':
localFileExisted = existsSync(join(__dirname, 'rsapi.android-arm64.node'))
try {
if (localFileExisted) {
nativeBinding = require('./rsapi.android-arm64.node')
} else {
nativeBinding = require('@logseq/rsapi-android-arm64')
}
} catch (e) {
loadError = e
}
break
case 'arm':
localFileExisted = existsSync(join(__dirname, 'rsapi.android-arm-eabi.node'))
try {
if (localFileExisted) {
nativeBinding = require('./rsapi.android-arm-eabi.node')
} else {
nativeBinding = require('@logseq/rsapi-android-arm-eabi')
}
} catch (e) {
loadError = e
}
break
default:
throw new Error(`Unsupported architecture on Android ${arch}`)
}
break
case 'win32':
Expand Down Expand Up @@ -86,6 +108,15 @@ switch (platform) {
}
break
case 'darwin':
localFileExisted = existsSync(join(__dirname, 'rsapi.darwin-universal.node'))
try {
if (localFileExisted) {
nativeBinding = require('./rsapi.darwin-universal.node')
} else {
nativeBinding = require('@logseq/rsapi-darwin-universal')
}
break
} catch {}
switch (arch) {
case 'x64':
localFileExisted = existsSync(join(__dirname, 'rsapi.darwin-x64.node'))
Expand Down
3 changes: 0 additions & 3 deletions packages/rsapi/npm/win32-arm64-msvc/README.md

This file was deleted.

22 changes: 0 additions & 22 deletions packages/rsapi/npm/win32-arm64-msvc/package.json

This file was deleted.

8 changes: 4 additions & 4 deletions packages/rsapi/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"name": "@logseq/rsapi",
"private": false,
"publishConfig": {
"access": "public"
},
Expand All @@ -24,16 +23,17 @@
},
"license": "MIT",
"devDependencies": {
"@napi-rs/cli": "^2.2.0"
"@napi-rs/cli": "2.16.5",
"cross-env": "^7.0.3"
},
"engines": {
"node": ">= 10"
},
"scripts": {
"artifacts": "napi artifacts",
"artifacts": "napi artifacts -d ../../artifacts",
"build": "napi build --platform --release",
"build:debug": "napi build --platform",
"prepublishOnly": "napi prepublish -t npm",
"prepublishOnly": "napi prepublish",
"version": "napi version"
}
}
Loading

0 comments on commit 2dba51a

Please sign in to comment.