-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: lazy load AceEditor to allow server side rendering the input
Also, ci: add semantic-release workflow
- Loading branch information
Showing
15 changed files
with
31,354 additions
and
15,453 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,69 @@ | ||
name: CI | ||
name: CI & Release | ||
on: | ||
push: | ||
workflow_dispatch: | ||
inputs: | ||
release: | ||
description: 'Release new version' | ||
required: true | ||
default: false | ||
type: boolean | ||
skipTests: | ||
description: 'Skip tests' | ||
required: true | ||
default: false | ||
type: boolean | ||
|
||
jobs: | ||
test: | ||
runs-on: ${{ matrix.platform }} | ||
name: Node.js ${{ matrix.node-version }} / ${{ matrix.platform }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
platform: [ubuntu-latest, macos-latest] | ||
node-version: | ||
- 16 | ||
build: | ||
name: 'Lint & Build' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set git to use LF | ||
run: | | ||
git config --global core.autocrlf false | ||
git config --global core.eol lf | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v1 | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: lts/* | ||
cache: 'npm' | ||
- run: npm ci | ||
- run: npm run lint --if-present | ||
- run: npm run build | ||
|
||
test: | ||
name: 'Test' | ||
needs: build | ||
strategy: | ||
matrix: | ||
node-version: [ 16.x, 18.x ] | ||
platform: [ ubuntu-latest, macos-latest ] | ||
runs-on: ${{ matrix.platform }} | ||
if: inputs.skipTests != true | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
cache: 'npm' | ||
- run: npm install | ||
- run: npm run lint | ||
- run: npm run build | ||
#- run: npm test | ||
- run: npm test | ||
|
||
release: | ||
name: 'Semantic release' | ||
needs: test | ||
runs-on: ubuntu-latest | ||
if: inputs.release == true | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: lts/* | ||
cache: 'npm' | ||
- run: npm install | ||
# Branches that will release new versions is defined in .releaserc.json | ||
- run: npx semantic-release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"extends": "@parcel/config-default", | ||
"transformers": { | ||
"*.{js,mjs,jsx,cjs,ts,tsx}": [ | ||
"@parcel/transformer-js", | ||
"@parcel/transformer-react-refresh-wrap" | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"branches": [ | ||
{"name": "main", "channel": "studio-v3", "prerelease": "v3-studio"}, | ||
{"name": "main-post-ga"} | ||
], | ||
"plugins": [ | ||
"@semantic-release/commit-analyzer", | ||
"@semantic-release/release-notes-generator", | ||
[ | ||
"@semantic-release/npm", | ||
{ | ||
"tarballDir": "release" | ||
} | ||
], | ||
[ | ||
"@semantic-release/github", | ||
{ | ||
"assets": "release/*.tgz" | ||
} | ||
] | ||
], | ||
"preset": "angular" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// used only by jest, .parcelrc configured to ignore this file | ||
module.exports = { | ||
presets: [ | ||
'@babel/preset-env', | ||
[ | ||
'@babel/preset-react', | ||
{ | ||
runtime: 'automatic', | ||
}, | ||
], | ||
], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/** @type {import('ts-jest/dist/types').InitialOptionsTsJest} */ | ||
const crypto = require('crypto') | ||
module.exports = { | ||
preset: 'ts-jest', | ||
testEnvironment: 'node', | ||
testPathIgnorePatterns: ['.yalc', 'node_modules', '.idea', 'lib', '.parcel-cache'], | ||
globals: { | ||
'ts-jest': { | ||
babelConfig: true, | ||
}, | ||
crypto: { | ||
getRandomValues: (arr) => crypto.randomBytes(arr.length), | ||
}, | ||
}, | ||
transform: { | ||
'^.+\\.(ts|tsx)?$': 'ts-jest', | ||
'^.+\\.(mjs|js|jsx)$': 'babel-jest', | ||
}, | ||
transformIgnorePatterns: ['node_modules/(?!(nanoid|uuid|get-random-values-esm))'], | ||
} |
Oops, something went wrong.