Skip to content

Commit

Permalink
chore: dep update again (#629)
Browse files Browse the repository at this point in the history
* update deps

* cleanup lock

* update packages

* update usages

* more updates

* dedupe

* fix

* fix __dirname
  • Loading branch information
0xdeafcafe authored Nov 16, 2024
1 parent 74f0a78 commit e4b324d
Show file tree
Hide file tree
Showing 64 changed files with 351 additions and 1,276 deletions.
1 change: 0 additions & 1 deletion apps-host/electron/esbuild.main.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import path from 'path';

const require = createRequire(import.meta.url);

// eslint-disable-next-line @typescript-eslint/no-var-requires
const packageJson = require('./package.json');

const environment = process.env.NODE_ENV;
Expand Down
11 changes: 11 additions & 0 deletions apps-host/electron/eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import globals from "globals";
import baseConfig from "../../eslint.config.js";

export default [...baseConfig, {
"languageOptions": {
"globals": {
...globals.browser,
...globals.node,
}
},
}];
5 changes: 4 additions & 1 deletion apps-host/electron/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"description": "A feathery cross-platform API crafting tool",
"version": "1.1.7-beta.9",
"private": true,
"type": "module",
"author": {
"name": "Alexander Forbes-Reed (0xdeafcafe)",
"email": "[email protected]"
Expand All @@ -18,6 +19,7 @@
"package:release": "electron-builder -mw --publish always",
"start": "cross-env NODE_ENV=development electron-esbuild dev",
"typecheck": "tsc",
"lint": "eslint .",
"test": "echo Skipped."
},
"main": "./dist/main/main.js",
Expand All @@ -39,7 +41,8 @@
"isomorphic-git": "^1.27.1",
"lodash.clonedeep": "^4.5.0",
"source-map-support": "^0.5.21",
"uuid": "^11.0.3"
"uuid": "^11.0.3",
"chokidar": "^4.0.1"
},
"devDependencies": {
"@electron/notarize": "^2.5.0",
Expand Down
12 changes: 6 additions & 6 deletions apps-host/electron/scripts/after-pack.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
/* eslint-disable no-sync */
/* eslint-disable @typescript-eslint/no-var-requires */
const asar = require('asar');
const path = require('path');
const fs = require('fs');
const os = require('os');
import asar from 'asar';
import path from 'path';
import fs from 'fs';
import os from 'os';

const architectures = ['ia32', 'x64', 'armv7l', 'arm64', 'universal'];

exports.default = async function afterPack(context) {
export default async function afterPack(context) {
const arch = architectures[context.arch];
const platform = context.packager.platform.nodeName;
const tempDirPath = path.join(os.tmpdir(), Date.now().toString());
const asarPath = generateAsarPath(platform, context.appOutDir);
const nativeKeytarDir = path.join(__dirname, '..', '..', '..', 'build', 'native-components', 'keytar');
const nativeKeytarDir = path.join(import.meta.dirname, '..', '..', '..', 'build', 'native-components', 'keytar');
const nativeKeytarPath = path.join(nativeKeytarDir, generateKeytarFilename(arch, platform));
const asarKeytarPath = path.join(tempDirPath, 'keytar.node');

Expand Down
6 changes: 3 additions & 3 deletions apps-host/electron/scripts/notarize.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/* eslint-disable @typescript-eslint/no-var-requires */
const { notarize } = require('@electron/notarize');
const path = require('path');
import { notarize } from '@electron/notarize';
import path from 'path';

exports.default = async function notarizing(context) {
export default async function notarizing(context) {
const { electronPlatformName, appOutDir } = context;

if (electronPlatformName !== 'darwin')
Expand Down
6 changes: 3 additions & 3 deletions apps-host/electron/src/host/extensions/project.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ import getBeakHost from '..';

export async function tryOpenProjectFolder(projectPath: string, silent = false) {
let projectFilePath = projectPath;
if (!projectFilePath.endsWith('.json')) {

if (!projectFilePath.endsWith('.json'))
projectFilePath = path.join(projectFilePath, 'project.json');
}

const projectFolderPath = path.parse(projectFilePath).dir;
const projectFile = await getBeakHost().project.readProjectFile(projectFolderPath, {
Expand All @@ -25,7 +25,7 @@ export async function tryOpenProjectFolder(projectPath: string, silent = false)
if (!silent) {
await dialog.showMessageBox({
title: 'Unable to open project',
message: 'The project you tried to open does not exist. Project path provided: ' + projectPath,
message: `The project you tried to open does not exist. Project path provided: ${projectPath}`,
type: 'error',
});
}
Expand Down
3 changes: 0 additions & 3 deletions apps-host/electron/src/host/providers/aes.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
import AesProviderBase from '@beak/common-host/providers/encryption-aes';
import crypto, { Cipher, Decipher } from 'node:crypto';
import { promisify } from 'node:util';

const scrypt = promisify(crypto.scrypt);

export default class AesProvider extends AesProviderBase {
async generateKey(): Promise<string> {
Expand Down
2 changes: 1 addition & 1 deletion apps-host/electron/src/host/providers/credentials.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import CredentialsProviderBase from '@beak/common-host/providers/credentials';
import { ProjectEncryption } from '@beak/common/types/beak-project';
import CredentialsProviderBase from '@beak/common-host/providers/credentials';
import keytar from 'keytar';
import os from 'os';

Expand Down
3 changes: 0 additions & 3 deletions apps-host/electron/src/host/providers/storage.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
/* eslint-disable max-len */
/* eslint-disable no-dupe-class-members */

import StorageProviderBase, { GenericStore } from '@beak/common-host/providers/storage';
import ElectronStore from 'electron-store';

Expand Down
6 changes: 4 additions & 2 deletions apps-host/electron/src/ipc-layer/fs-watcher-service.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { IpcFsWatcherServiceMain, StartWatchingReq } from '@beak/common/ipc/fs-watcher';
import chokidar, { WatchOptions } from 'chokidar';
import type { ChokidarOptions } from 'chokidar';
import chokidar from 'chokidar';
import { ipcMain, IpcMainInvokeEvent } from 'electron';
import { FSWatcher } from 'original-fs';

Expand All @@ -16,7 +17,7 @@ service.registerStartWatching(async (event, payload: StartWatchingReq) => {

const sender = (event as IpcMainInvokeEvent).sender;
const senderIdStr = sender.id.toString();
const options: WatchOptions = {
const options: ChokidarOptions = {
...payload.options,
followSymlinks: false,
cwd: void 0,
Expand Down Expand Up @@ -45,6 +46,7 @@ service.registerStartWatching(async (event, payload: StartWatchingReq) => {
watcher.close();
});

// @ts-expect-error
watchers[payload.sessionIdentifier] = watcher;

if (windowContentsMapping[senderIdStr] === void 0)
Expand Down
2 changes: 1 addition & 1 deletion apps-host/electron/src/ipc-layer/utils.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { IpcEvent } from '@beak/common/ipc/ipc';
import { BrowserWindow, IpcMainInvokeEvent } from 'electron';
import path from 'path';

import { getProjectFilePathWindowMapping, getProjectIdFromWindowId } from './fs-shared';
import { BrowserWindow, IpcMainInvokeEvent } from 'electron';

export function getProjectFolder(event: IpcEvent) {
const projectFilePath = getProjectFilePathWindowMapping(event);
Expand Down
4 changes: 3 additions & 1 deletion apps-host/electron/src/lib/window-state-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,11 @@ export default class WindowStateManager {
private windowKey: string;
private window: BrowserWindow | undefined;
private state: WindowState;
private stateChangeTimer: NodeJS.Timeout | undefined;
private windowOptions: BrowserWindowConstructorOptions;

// eslint-disable-next-line
private stateChangeTimer: NodeJS.Timeout | undefined;

constructor(
existingWindowState: WindowState | undefined,
windowKey: string,
Expand Down
1 change: 0 additions & 1 deletion apps-host/electron/src/preload.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable no-process-env */
import { contextBridge, ipcRenderer, IpcRendererEvent } from 'electron';

import '@sentry/electron/preload';
Expand Down
1 change: 1 addition & 0 deletions apps-host/electron/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
}],
"exclude": [
"node_modules",
"eslint.config.js",
"dist",
"dist-ts",
"dist-react",
Expand Down
1 change: 0 additions & 1 deletion apps-host/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@
"react-reflex": "^4.2.6",
"react-tooltip": "^5.28.0",
"redux-devtools-extension": "^2.13.9",
"redux-saga": "^1.3.0",
"ua-parser-js": "^1.0.39",
"valid-filename": "^4.0.0",
"vite-plugin-mkcert": "^1.17.6",
Expand Down
2 changes: 1 addition & 1 deletion apps-web/marketing/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"@types/node": "^22.9.0",
"@types/react": "^18.3.12",
"@types/react-dom": "^18.3.1",
"eslint": "^9.14.0",
"eslint": "^9.15.0",
"eslint-config-next": "^15.0.3",
"next": "^14.0.4",
"react": "^18.3.1",
Expand Down
13 changes: 6 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,9 @@
"@babel/preset-env": "^7.26.0",
"@babel/preset-react": "^7.25.9",
"@babel/preset-typescript": "^7.26.0",
"@eslint/compat": "^1.2.2",
"@types/node": "^20.10.5",
"@eslint/compat": "^1.2.3",
"@redux-saga/core": "^1.3.0",
"@types/node": "^22.9.0",
"@types/react": "^18.3.12",
"@types/react-dom": "^18.3.1",
"@types/sanitize-html": "^2.13.0",
Expand All @@ -66,16 +67,15 @@
"@typescript-eslint/eslint-plugin": "^8.14.0",
"@typescript-eslint/parser": "^8.14.0",
"@vitejs/plugin-react": "^4.3.3",
"eslint": "^9.14.0",
"eslint": "^9.15.0",
"eslint-plugin-babel": "^5.3.1",

"eslint-plugin-react": "^7.37.2",
"eslint-plugin-react-hooks": "^5.0.0",
"eslint-plugin-simple-import-sort": "^12.1.1",
"eslint-plugin-unused-imports": "^4.1.4",
"globals": "^15.12.0",
"lerna": "^8.1.9",
"nx": "^20.1.0",
"nx": "^20.1.2",
"react-spring": "^9.7.4",
"sanitize-html": "^2.13.1",
"semver": "^7.6.3",
Expand All @@ -89,9 +89,8 @@
"@sentry/electron": "^4.15.1",
"@sentry/react": "^7.91.0",
"@sentry/tracing": "^7.91.0",
"chokidar": "^3.5.3",
"chokidar": "^4.0.1",
"cross-env": "^7.0.3",
"hw-fingerprint": "^2.1.0",
"keytar": "^7.9.0",
"prettier": "^3.3.3",
"pretty-bytes": "^6.1.1",
Expand Down
1 change: 1 addition & 0 deletions packages/common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"@getbeak/types-realtime-value": "^1.0.0"
},
"devDependencies": {
"chokidar": "^4.0.1",
"electron": "33.2.0"
}
}
6 changes: 3 additions & 3 deletions packages/common/src/ipc/fs-watcher.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import ksuid from '@beak/ksuid';
import type { WatchOptions } from 'chokidar';
import type { ChokidarOptions } from 'chokidar';
import { WebContents } from 'electron';

import { IpcServiceMain, IpcServiceRenderer, Listener, PartialIpcMain, PartialIpcRenderer } from './ipc';
Expand All @@ -13,7 +13,7 @@ export const FsWatcherMessages = {

export interface StartWatchingReq {
filePath: string;
options: WatchOptions;
options: ChokidarOptions;
sessionIdentifier: string;
}

Expand All @@ -31,7 +31,7 @@ export class IpcFsWatcherServiceRenderer extends IpcServiceRenderer {
return ksuid.generate('fswatch').toString();
}

async startWatching(sessionIdentifier: string, filePath: string, options: WatchOptions) {
async startWatching(sessionIdentifier: string, filePath: string, options: ChokidarOptions) {
await this.invoke(FsWatcherMessages.StartWatching, {
filePath,
options,
Expand Down
2 changes: 1 addition & 1 deletion packages/design-system/eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ export default [...baseConfig, {
"languageOptions": {
"globals": {
...globals.browser,
}
},
},
}];
1 change: 1 addition & 0 deletions packages/design-system/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"files": [
"dist"
],
"type": "module",
"scripts": {
"build": "yarn clean && yarn compile",
"clean": "rm -rf ./dist && rm -rf tsconfig.tsbuildinfo",
Expand Down
2 changes: 1 addition & 1 deletion packages/ksuid/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"start": "tsc -b tsconfig.json -w"
},
"dependencies": {
"base-x": "^4.0.0"
"base-x": "^5.0.0"
},
"devDependencies": {
"mockdate": "^3.0.5",
Expand Down
2 changes: 1 addition & 1 deletion packages/requester-node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@
"node-fetch": "^2.6.1"
},
"devDependencies": {
"@types/node-fetch": "^2.6.9"
"@types/node-fetch": "^2.6.12"
}
}
2 changes: 1 addition & 1 deletion packages/ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
"@fortawesome/react-fontawesome": "^0.2.2",
"@graphiql/toolkit": "^0.11.0",
"@monaco-editor/react": "^4.6.0",
"@redux-saga/core": "^1.3.0",
"@reduxjs/toolkit": "^2.3.0",
"@types/base64-js": "^1.3.2",
"@types/command-exists": "^1.2.3",
Expand Down Expand Up @@ -65,7 +66,6 @@
"react-reflex": "^4.2.6",
"react-tooltip": "^5.28.0",
"redux-devtools-extension": "^2.13.9",
"redux-saga": "^1.3.0",
"ua-parser-js": "^1.0.39",
"valid-filename": "^4.0.0",
"vite-plugin-monaco-editor": "^1.1.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { ApplicationState } from '@beak/ui/store';
import { createTakeLatestSagaSet } from '@beak/ui/utils/redux/sagas';
import type { Tree } from '@getbeak/types/nodes';
import type { VariableGroups } from '@getbeak/types/variable-groups';
import { delay, put, select } from 'redux-saga/effects';
import { delay, put, select } from '@redux-saga/core/effects';

import actions, { closeTab, reconciliationComplete } from '../actions';

Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/features/tabs/store/sagas/catch-changes.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { TabPreferences } from '@beak/common/types/beak-hub';
import { ipcFsService } from '@beak/ui/lib/ipc';
import { ApplicationState } from '@beak/ui/store';
import { call, select } from '@redux-saga/core/effects';
import path from 'path-browserify';
import { call, select } from 'redux-saga/effects';

import { State } from '../types';

Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/features/tabs/store/sagas/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { all, fork, takeEvery } from 'redux-saga/effects';
import { all, fork, takeEvery } from '@redux-saga/core/effects';

import { ActionTypes } from '../types';
import attemptReconciliation from './attempt-reconciliation';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import Squawk from '@beak/common/utils/squawk';
import { readJsonAndValidate } from '@beak/ui/lib/fs';
import { ipcFsService } from '@beak/ui/lib/ipc';
import { createTakeEverySagaSet } from '@beak/ui/utils/redux/sagas';
import { call, put } from '@redux-saga/core/effects';
import path from 'path-browserify';
import { call, put } from 'redux-saga/effects';

import { tabPreferences } from '../../../../lib/beak-hub/schemas';
import actions from '../actions';
Expand Down
6 changes: 3 additions & 3 deletions packages/ui/src/lib/fs-emitter.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import type { WatchOptions } from 'chokidar';
import { eventChannel } from '@redux-saga/core';
import type { ChokidarOptions } from 'chokidar';
import path from 'path-browserify';
import { eventChannel } from 'redux-saga';

import { ipcFsService, ipcFsWatcherService } from './ipc';

export default function createFsEmitter(path: string, options?: WatchOptions) {
export default function createFsEmitter(path: string, options?: ChokidarOptions) {
const sessionIdentifier = ipcFsWatcherService.generateSessionIdentifier();

const channel = eventChannel(emitter => {
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/store/arbiter/sagas/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { all } from 'redux-saga/effects';
import { all } from '@redux-saga/core/effects';

import startArbiterWorker from './start-arbiter';

Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/store/extensions/sagas/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { all, fork, takeEvery } from 'redux-saga/effects';
import { all, fork, takeEvery } from '@redux-saga/core/effects';

import { ActionTypes } from '../types';
import startExtensions from './start-extensions';
Expand Down
Loading

0 comments on commit e4b324d

Please sign in to comment.