Skip to content
Open
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
19 changes: 19 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
version: 2
updates:
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "weekly"
day: "monday"
open-pull-requests-limit: 10
groups:
dev-dependencies:
dependency-type: "development"
production-dependencies:
dependency-type: "production"

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
day: "monday"
41 changes: 41 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: CodeQL Security Analysis

on:
push:
branches: [master, feature/**]
pull_request:
branches: [master]
schedule:
- cron: '0 8 * * 1' # Weekly on Monday at 8 AM UTC

jobs:
analyze:
name: Analyze (${{ matrix.language }})
runs-on: ubuntu-latest
permissions:
security-events: write
actions: read
contents: read

strategy:
fail-fast: false
matrix:
language: [javascript-typescript]

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
queries: security-extended,security-and-quality

- name: Autobuild
uses: github/codeql-action/autobuild@v3

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: /language:${{ matrix.language }}
7 changes: 4 additions & 3 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,15 @@ jobs:

strategy:
matrix:
node-version: [12.x]
node-version: [18.x, 20.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm ci
- run: npm test
38 changes: 38 additions & 0 deletions .github/workflows/security.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Security Audit

on:
push:
branches: [master]
pull_request:
branches: [master]
schedule:
- cron: '0 6 * * 1' # Weekly on Monday at 6 AM UTC

jobs:
audit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '18.x'
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Run npm audit
run: npm audit --audit-level=high
continue-on-error: true

- name: Run npm audit (report)
run: npm audit --json > npm-audit.json || true

- name: Upload audit report
uses: actions/upload-artifact@v4
with:
name: npm-audit-report
path: npm-audit.json
retention-days: 30
8 changes: 8 additions & 0 deletions src/cloud/components/Editor/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,14 @@ const Editor = ({
Enter: 'newlineAndIndentContinueMarkdownList',
Tab: 'indentMore',
'Ctrl-Space': 'autocomplete',
'Shift-Ctrl-/': (cm: CodeMirror.Editor) =>
cm.replaceSelection(new Date().toLocaleDateString()),
'Shift-Cmd-/': (cm: CodeMirror.Editor) =>
cm.replaceSelection(new Date().toLocaleDateString()),
'Ctrl-Alt-/': (cm: CodeMirror.Editor) =>
cm.replaceSelection(new Date().toLocaleString()),
'Shift-Alt-/': (cm: CodeMirror.Editor) =>
cm.replaceSelection(new Date().toLocaleString()),
},
scrollPastEnd: true,
// fixes IME being on top of current line, Codemirror issue: https://github.com/codemirror/CodeMirror/issues/3137
Expand Down