Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Platform/update depdencies jun 2024 #255

Merged
merged 4 commits into from
Jun 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 0 additions & 40 deletions .eslintrc.json

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/manual-test-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
- run: yarn workspaces focus --all --production
# package final binaries
- run: |
yarn dlx @yao-pkg/pkg@5.11.1 ./dist -t node18-${{ matrix.settings.target }} -o bundle/dcli-${{ matrix.settings.target }}${{ matrix.settings.extension }} -C Brotli "--public" "--public-packages" "tslib,thirty-two,node-hkdf-sync,vows" "--no-bytecode"
yarn dlx @yao-pkg/pkg@5.12.0 ./dist -t node18-${{ matrix.settings.target }} -o bundle/dcli-${{ matrix.settings.target }}${{ matrix.settings.extension }} -C Brotli "--public" "--public-packages" "tslib,thirty-two,node-hkdf-sync,vows" "--no-bytecode"

- name: Archive binary artifact
uses: actions/upload-artifact@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
- run: yarn workspaces focus --all --production
# package final binaries
- run: |
yarn dlx @yao-pkg/pkg@5.11.1 ./dist -t node18-${{ matrix.settings.target }} -o bundle/dcli-${{ matrix.settings.target }}${{ matrix.settings.extension }} -C Brotli "--public" "--public-packages" "tslib,thirty-two,node-hkdf-sync,vows" "--no-bytecode"
yarn dlx @yao-pkg/pkg@5.12.0 ./dist -t node18-${{ matrix.settings.target }} -o bundle/dcli-${{ matrix.settings.target }}${{ matrix.settings.extension }} -C Brotli "--public" "--public-packages" "tslib,thirty-two,node-hkdf-sync,vows" "--no-bytecode"

- name: Archive binary artifact
uses: actions/upload-artifact@v4
Expand Down
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,13 @@ yarn run pkg

It outputs in `bundle` directory. Be aware you must use the same Node version as the target.

> [!NOTE]
> If you're using vscode, you need to enable eslint flat configuration in your settings `.vscode/settings.json`.
>
> ```
> "eslint.experimental.useFlatConfig": true`
> ```

### Debug mode

You can use `--debug` to see all the debug logs of the CLI.
Expand Down
38 changes: 38 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
import tseslint from 'typescript-eslint';
import eslint from '@eslint/js';
import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended';

export default tseslint.config(
{
ignores: ['**/documentation', '**/scripts'],
},
eslint.configs.recommended,
...tseslint.configs.recommendedTypeChecked,
eslintPluginPrettierRecommended,
{
languageOptions: {
ecmaVersion: 2022,
sourceType: 'module',
parserOptions: {
project: true,
},
},

rules: {
'no-return-await': 'error',

'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-empty-interface': 'off',

'@typescript-eslint/no-unused-vars': [
'error',
{
varsIgnorePattern: '[iI]gnored',
argsIgnorePattern: '^_',
},
],

'object-shorthand': ['error', 'always'],
},
}
);
31 changes: 18 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
"../node_modules/@json2csv/transforms/dist/**/*",
"../node_modules/@streamparser/json/dist/**/*",
"../node_modules/node-mac-auth/build/Release/auth.node"
],
"ignore": [
"**/*/better-sqlite3/deps/**/*"
]
},
"scripts": {
Expand Down Expand Up @@ -52,27 +55,29 @@
},
"devDependencies": {
"@aivenio/tsc-output-parser": "^2.1.1",
"@eslint/eslintrc": "^3.1.0",
"@eslint/js": "^9.4.0",
"@types/async": "^3.2.24",
"@types/better-sqlite3": "^7.6.10",
"@types/chai": "^4.3.16",
"@types/eslint__js": "^8.42.3",
"@types/inquirer": "^9.0.7",
"@types/libsodium-wrappers": "^0.7.14",
"@types/mocha": "^10.0.6",
"@types/node": "^18.19.33",
"@typescript-eslint/eslint-plugin": "^7.8.0",
"@typescript-eslint/parser": "^7.8.0",
"@yao-pkg/pkg": "^5.11.5",
"@types/node": "^18.19.34",
"@yao-pkg/pkg": "^5.12.0",
"chai": "^5.1.1",
"esbuild": "^0.21.4",
"eslint": "^8.57.0",
"esbuild": "^0.21.5",
"eslint": "^9.4.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-import": "^2.29.1",
"execa": "^9.1.0",
"eslint-plugin-prettier": "^5.1.3",
"execa": "^9.2.0",
"husky": "^9.0.11",
"mocha": "^10.4.0",
"prettier": "^3.2.5",
"prettier": "^3.3.1",
"ts-node": "^10.9.2",
"typescript": "^5.4.5"
"typescript": "^5.4.5",
"typescript-eslint": "^7.12.0"
},
"dependencies": {
"@dashlane/nsm-attestation": "^1.0.2",
Expand All @@ -82,14 +87,14 @@
"@napi-rs/clipboard": "^1.1.2",
"@napi-rs/keyring": "^1.1.6",
"@node-rs/argon2": "^1.8.3",
"ajv": "^8.14.0",
"ajv": "^8.16.0",
"ajv-formats": "^3.0.1",
"better-sqlite3": "^11.0.0",
"commander": "^12.1.0",
"got": "^14.3.0",
"got": "^14.4.1",
"jsonpath-plus": "^9.0.0",
"libsodium-wrappers": "^0.7.13",
"node-mac-auth": "^1.0.0",
"node-mac-auth": "^1.1.0",
"otplib": "^12.0.1",
"playwright-core": "^1.44.1",
"winston": "^3.13.0",
Expand Down
2 changes: 1 addition & 1 deletion src/command-handlers/configure.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export const configureUserPresenceVerification = async (options: {

if (method === 'biometrics') {
if (process.platform === 'darwin') {
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-var-requires
// eslint-disable-next-line @typescript-eslint/no-var-requires
const nodemacauth = require('node-mac-auth') as typeof import('node-mac-auth');
Mikescops marked this conversation as resolved.
Show resolved Hide resolved
if (!nodemacauth.canPromptTouchID()) {
throw new Error('Biometrics are not supported on your device.');
Expand Down
2 changes: 1 addition & 1 deletion src/modules/auth/userPresenceVerification.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export const userPresenceVerification = async (params: { deviceConfiguration: De

if (deviceConfiguration.userPresenceVerification === 'biometrics') {
if (process.platform === 'darwin') {
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-var-requires
// eslint-disable-next-line @typescript-eslint/no-var-requires
const nodemacauth = require('node-mac-auth') as typeof import('node-mac-auth');
const { canPromptTouchID, promptTouchID } = nodemacauth;
if (canPromptTouchID()) {
Expand Down
Loading