Skip to content

Commit

Permalink
Merge branch 'develop' into wip/akirathan/10702-dataflowerr-stack-reg…
Browse files Browse the repository at this point in the history
…ression
  • Loading branch information
Akirathan committed Oct 22, 2024
2 parents be57ead + 171a95f commit a59af0a
Show file tree
Hide file tree
Showing 411 changed files with 7,858 additions and 4,501 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/engine-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ jobs:
enso-build-ci-gen-job-ci-check-backend-graal-vm-ce-macos-amd64:
name: Engine (GraalVM CE) (macos, amd64)
runs-on:
- macos-12
- macos-13
steps:
- if: startsWith(runner.name, 'GitHub Actions') || startsWith(runner.name, 'Hosted Agent')
name: Installing wasm-pack
Expand Down Expand Up @@ -354,7 +354,7 @@ jobs:
enso-build-ci-gen-job-jvm-tests-graal-vm-ce-macos-amd64:
name: JVM Tests (GraalVM CE) (macos, amd64)
runs-on:
- macos-12
- macos-13
steps:
- if: startsWith(runner.name, 'GitHub Actions') || startsWith(runner.name, 'Hosted Agent')
name: Installing wasm-pack
Expand Down Expand Up @@ -640,7 +640,7 @@ jobs:
enso-build-ci-gen-job-standard-library-tests-graal-vm-ce-macos-amd64:
name: Standard Library Tests (GraalVM CE) (macos, amd64)
runs-on:
- macos-12
- macos-13
steps:
- if: startsWith(runner.name, 'GitHub Actions') || startsWith(runner.name, 'Hosted Agent')
name: Installing wasm-pack
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/enso4igv.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
target/lib/**
build_mac_intel_parser:
runs-on: macos-12
runs-on: macos-13

steps:
- uses: actions/checkout@v4
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/gui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:
enso-build-ci-gen-job-build-backend-macos-amd64:
name: Build Backend (macos, amd64)
runs-on:
- macos-12
- macos-13
steps:
- if: startsWith(runner.name, 'GitHub Actions') || startsWith(runner.name, 'Hosted Agent')
name: Installing wasm-pack
Expand Down Expand Up @@ -213,7 +213,7 @@ jobs:
enso-build-ci-gen-job-gui-build-macos-amd64:
name: GUI build (macos, amd64)
runs-on:
- macos-12
- macos-13
steps:
- if: startsWith(runner.name, 'GitHub Actions') || startsWith(runner.name, 'Hosted Agent')
name: Installing wasm-pack
Expand Down Expand Up @@ -391,7 +391,7 @@ jobs:
needs:
- enso-build-ci-gen-job-build-backend-macos-amd64
runs-on:
- macos-12
- macos-13
steps:
- if: startsWith(runner.name, 'GitHub Actions') || startsWith(runner.name, 'Hosted Agent')
name: Installing wasm-pack
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ jobs:
needs:
- enso-build-ci-gen-draft-release-linux-amd64
runs-on:
- macos-12
- macos-13
steps:
- if: startsWith(runner.name, 'GitHub Actions') || startsWith(runner.name, 'Hosted Agent')
name: Installing wasm-pack
Expand Down Expand Up @@ -484,7 +484,7 @@ jobs:
- enso-build-ci-gen-draft-release-linux-amd64
- enso-build-ci-gen-job-upload-backend-macos-amd64
runs-on:
- macos-12
- macos-13
steps:
- if: startsWith(runner.name, 'GitHub Actions') || startsWith(runner.name, 'Hosted Agent')
name: Installing wasm-pack
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/scala-new.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ jobs:
enso-build-ci-gen-job-ci-check-backend-graal-vm-ce-macos-amd64:
name: Engine (GraalVM CE) (macos, amd64)
runs-on:
- macos-12
- macos-13
steps:
- if: startsWith(runner.name, 'GitHub Actions') || startsWith(runner.name, 'Hosted Agent')
name: Installing wasm-pack
Expand Down Expand Up @@ -220,7 +220,7 @@ jobs:
enso-build-ci-gen-job-jvm-tests-graal-vm-ce-macos-amd64:
name: JVM Tests (GraalVM CE) (macos, amd64)
runs-on:
- macos-12
- macos-13
steps:
- if: startsWith(runner.name, 'GitHub Actions') || startsWith(runner.name, 'Hosted Agent')
name: Installing wasm-pack
Expand Down Expand Up @@ -390,7 +390,7 @@ jobs:
enso-build-ci-gen-job-standard-library-tests-graal-vm-ce-macos-amd64:
name: Standard Library Tests (GraalVM CE) (macos, amd64)
runs-on:
- macos-12
- macos-13
steps:
- if: startsWith(runner.name, 'GitHub Actions') || startsWith(runner.name, 'Hosted Agent')
name: Installing wasm-pack
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,15 @@

- [Rows and Columns may be now removed in Table Input Widget][11151]. The option
is available in right-click context menu.
- [Rows and Columns may be now reordered by dragging in Table Input
Widget][11271]
- [Copying and pasting in Table Editor Widget now works properly][11332]
- [Fix invisible selection in Table Input Widget][11358]

[11151]: https://github.com/enso-org/enso/pull/11151
[11271]: https://github.com/enso-org/enso/pull/11271
[11332]: https://github.com/enso-org/enso/pull/11332
[11358]: https://github.com/enso-org/enso/pull/11358

#### Enso Standard Library

Expand Down
3 changes: 2 additions & 1 deletion app/common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@
"./src/types": "./src/types.d.ts"
},
"scripts": {
"test": "vitest run"
"test": "vitest run",
"lint": "eslint . --max-warnings=0"
},
"peerDependencies": {
"@tanstack/query-core": "5.54.1",
Expand Down
16 changes: 9 additions & 7 deletions app/common/src/accessToken.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,19 @@
// === AccessToken ===
// ===================

/** Payload for the `save-access-token` event that saves an access token to a credentials file. */
/** Credentials to be saved to a credentials file. */
export interface AccessToken {
/** The JWT token to save. */
/** The user's JWT token. */
readonly accessToken: string
/** The Cognito app integration client id. */
/** The ID for the Cognito app integration. */
readonly clientId: string
/** The refresh token taken from authorization flow. */
/** The refresh token taken from the authorization flow. */
readonly refreshToken: string
/** The Cognito url to refresh the token. */
/** The Cognito URL to refresh the token. */
readonly refreshUrl: string
/** The when the token will expire.
* This is a string representation of a date in ISO 8601 format (e.g. "2021-01-01T00:00:00Z"). */
/**
* The expiry time of the token.
* This is a string representation of a date in ISO 8601 format (e.g. "2021-01-01T00:00:00Z").
*/
readonly expireAt: string
}
12 changes: 8 additions & 4 deletions app/common/src/appConfig.d.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
/** @file Functions for managing app configuration. */

/** Read environment variables from a file based on the `ENSO_CLOUD_ENV_FILE_NAME`
/**
* Read environment variables from a file based on the `ENSO_CLOUD_ENV_FILE_NAME`
* environment variable. Reads from `.env` if the variable is blank or absent.
* DOES NOT override existing environment variables if the variable is absent. */
* DOES NOT override existing environment variables if the variable is absent.
*/
export function readEnvironmentFromFile(): Promise<void>

/** An object containing app configuration to inject.
/**
* An object containing app configuration to inject.
*
* This includes:
* - the base URL for backend endpoints
* - the WebSocket URL for the chatbot
* - the unique identifier for the cloud environment, for use in Sentry logs
* - Stripe, Sentry and Amplify public keys */
* - Stripe, Sentry and Amplify public keys
*/
export function getDefines(serverPort?: number): Record<string, string>

/** Load test environment variables, useful for when the Cloud backend is mocked or unnecessary. */
Expand Down
9 changes: 2 additions & 7 deletions app/common/src/appConfig.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/** @file Functions for managing app configuration. */
import * as fs from 'node:fs/promises'
import * as path from 'node:path'
import * as process from 'node:process'
import * as url from 'node:url'

// ===============================
Expand All @@ -19,14 +20,13 @@ export async function readEnvironmentFromFile() {
const filePath = path.join(url.fileURLToPath(new URL('../..', import.meta.url)), fileName)
const buildInfo = await (async () => {
try {
return await import('../../../../build.json', { with: { type: 'json' } })
return await import('../../../build.json', { with: { type: 'json' } })
} catch {
return { commit: '', version: '', engineVersion: '', name: '' }
}
})()
try {
const file = await fs.readFile(filePath, { encoding: 'utf-8' })
// eslint-disable-next-line jsdoc/valid-types
/** @type {readonly (readonly [string, string])[]} */
let entries = file.split('\n').flatMap(line => {
if (/^\s*$|^.s*#/.test(line)) {
Expand All @@ -47,14 +47,10 @@ export async function readEnvironmentFromFile() {
if (!isProduction || entries.length > 0) {
Object.assign(process.env, variables)
}
// @ts-expect-error This is the only file where `process.env` should be written to.
process.env.ENSO_CLOUD_DASHBOARD_VERSION ??= buildInfo.version
// @ts-expect-error This is the only file where `process.env` should be written to.
process.env.ENSO_CLOUD_DASHBOARD_COMMIT_HASH ??= buildInfo.commit
} catch (error) {
// @ts-expect-error This is the only file where `process.env` should be written to.
process.env.ENSO_CLOUD_DASHBOARD_VERSION ??= buildInfo.version
// @ts-expect-error This is the only file where `process.env` should be written to.
process.env.ENSO_CLOUD_DASHBOARD_COMMIT_HASH ??= buildInfo.commit
const expectedKeys = Object.keys(DUMMY_DEFINES)
.map(key => key.replace(/^process[.]env[.]/, ''))
Expand Down Expand Up @@ -147,7 +143,6 @@ const DUMMY_DEFINES = {
/** Load test environment variables, useful for when the Cloud backend is mocked or unnecessary. */
export function loadTestEnvironmentVariables() {
for (const [k, v] of Object.entries(DUMMY_DEFINES)) {
// @ts-expect-error This is the only file where `process.env` should be written to.
process.env[k.replace(/^process[.]env[.]/, '')] = v
}
}
24 changes: 16 additions & 8 deletions app/common/src/buildUtils.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,34 @@
/** Indent size for stringifying JSON. */
export const INDENT_SIZE: number

/** Get the environment variable value.
/**
* Get the environment variable value.
* @param name - The name of the environment variable.
* @returns The value of the environment variable.
* @throws {Error} If the environment variable is not set. */
* @throws {Error} If the environment variable is not set.
*/
export function requireEnv(name: string): string

/** Read the path from environment variable and resolve it.
/**
* Read the path from environment variable and resolve it.
* @param name - The name of the environment variable.
* @returns The resolved path.
* @throws {Error} If the environment variable is not set. */
* @throws {Error} If the environment variable is not set.
*/
export function requireEnvResolvedPath(name: string): string

/** Read the path from environment variable and resolve it. Verify that it exists.
/**
* Read the path from environment variable and resolve it. Verify that it exists.
* @param name - The name of the environment variable.
* @returns The resolved path.
* @throws {Error} If the environment variable is not set or path does not exist. */
* @throws {Error} If the environment variable is not set or path does not exist.
*/
export function requireEnvPathExist(name: string): string

/** Get the common prefix of the two strings.
/**
* Get the common prefix of the two strings.
* @param a - the first string.
* @param b - the second string.
* @returns The common prefix. */
* @returns The common prefix.
*/
export function getCommonPrefix(a: string, b: string): string
18 changes: 12 additions & 6 deletions app/common/src/detect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,10 @@ export enum Platform {
android = 'Android',
}

/** The platform the app is currently running on.
* This is used to determine whether `metaKey` or `ctrlKey` is used in shortcuts. */
/**
* The platform the app is currently running on.
* This is used to determine whether `metaKey` or `ctrlKey` is used in shortcuts.
*/
export function platform() {
if (isOnWindowsPhone()) {
// MUST be before Android and Windows.
Expand Down Expand Up @@ -96,8 +98,10 @@ export enum Browser {
opera = 'Opera',
}

/** Return the platform the app is currently running on.
* This is used to determine whether `metaKey` or `ctrlKey` is used in shortcuts. */
/**
* Return the platform the app is currently running on.
* This is used to determine whether `metaKey` or `ctrlKey` is used in shortcuts.
*/
export function browser(): Browser {
if (isOnElectron()) {
return Browser.electron
Expand All @@ -117,10 +121,12 @@ export function browser(): Browser {
return Browser.unknown
}
}
/** Returns `true` if running in Electron, else `false`.
/**
* Returns `true` if running in Electron, else `false`.
* This is used to determine whether to use a `MemoryRouter` (stores history in an array)
* or a `BrowserRouter` (stores history in the path of the URL).
* It is also used to determine whether to send custom state to Amplify for a workaround. */
* It is also used to determine whether to send custom state to Amplify for a workaround.
*/
export function isOnElectron() {
return /electron/i.test(navigator.userAgent)
}
Expand Down
4 changes: 2 additions & 2 deletions app/common/src/gtag.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ window.dataLayer = window.dataLayer || []
export function gtag(_action: 'config' | 'event' | 'js' | 'set', ..._args: unknown[]) {
// @ts-expect-error This is explicitly not given types as it is a mistake to acess this
// anywhere else.
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call, prefer-rest-params
window.dataLayer.push(arguments)
}

Expand All @@ -27,7 +27,7 @@ export function event(name: string, params?: object) {
}

gtag('js', new Date())
// eslint-disable-next-line @typescript-eslint/naming-convention
// eslint-disable-next-line @typescript-eslint/naming-convention, camelcase
gtag('set', 'linker', { accept_incoming: true })
gtag('config', GOOGLE_ANALYTICS_TAG)
if (GOOGLE_ANALYTICS_TAG === 'G-CLTBJ37MDM') {
Expand Down
24 changes: 16 additions & 8 deletions app/common/src/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,22 @@
/** @file This module contains metadata about the product and distribution,
/**
* @file This module contains metadata about the product and distribution,
* and various other constants that are needed in multiple sibling packages.
*
* Code in this package is used by two or more sibling packages of this package. The code is defined
* here when it is not possible for a sibling package to own that code without introducing a
* circular dependency in our packages. */
* circular dependency in our packages.
*/

// ========================
// === Product metadata ===
// ========================

/** URL protocol scheme for deep links to authentication flow pages, without the `:` suffix.
/**
* URL protocol scheme for deep links to authentication flow pages, without the `:` suffix.
*
* For example: the deep link URL
* `enso://authentication/register?code=...&state=...` uses this scheme. */
* `enso://authentication/register?code=...&state=...` uses this scheme.
*/
export const DEEP_LINK_SCHEME: string

/** Name of the product. */
Expand All @@ -21,12 +25,16 @@ export const PRODUCT_NAME: string
/** Company name, used as the copyright holder. */
export const COMPANY_NAME: string

/** The domain on which the Cloud Dashboard web app is hosted.
* Excludes the protocol (`https://`). */
/**
* The domain on which the Cloud Dashboard web app is hosted.
* Excludes the protocol (`https://`).
*/
export const CLOUD_DASHBOARD_DOMAIN: string

/** COOP, COEP, and CORP headers: https://web.dev/coop-coep/
/**
* COOP, COEP, and CORP headers: https://web.dev/coop-coep/
*
* These are required to increase the resolution of `performance.now()` timers,
* making profiling a lot more accurate and consistent. */
* making profiling a lot more accurate and consistent.
*/
export const COOP_COEP_CORP_HEADERS: [header: string, value: string][]
Loading

0 comments on commit a59af0a

Please sign in to comment.