mirror of
https://github.com/enso-org/enso.git
synced 2024-12-23 22:01:42 +03:00
343a644051
- Synchronize Y.Js clients by AST (implements #8237). - Before committing an edit, insert any parentheses-nodes needed for the concrete syntax to reflect tree structure (fixes #8884). - Move `externalId` and all node metadata into a Y.Map owned by each `Ast`. This allows including metadata changes in an edit, enables Y.Js merging of changes to different metadata fields, and will enable the use of Y.Js objects in metadata. (Implements #8804.) ### Important Notes - Metadata is now set and retrieved through accessors on the `Ast` objects. - Since some metadata edits need to take effect in real time (e.g. node dragging), new lower-overhead APIs (`commitDirect`, `skipTreeRepair`) are provided for careful use in certain cases. - The client is now bundled as ESM. - The build script cleans up git-untracked generated files in an outdated location, which fixes lint errors related to `src/generated` that may occur when switching branches.
9 lines
324 B
TypeScript
9 lines
324 B
TypeScript
// Environment detection
|
|
|
|
// Normally `global` is node-specific, but a workaround requires `global` to also exist
|
|
// in the browser for Amplify to work.
|
|
export const isNode =
|
|
typeof global !== 'undefined' && (global as any)[Symbol.toStringTag] === 'global'
|
|
|
|
export const isDevMode = process.env.NODE_ENV === 'development'
|