Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): bump tinymce from 5.10.9 to 7.2.0 #2

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
15 changes: 15 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"presets": [
[
"@babel/preset-env",
{
"useBuiltIns": "usage",
"debug": false,
"corejs": 3,
"modules": "commonjs"
}
],
["@babel/preset-react"]
],
"plugins": ["@babel/plugin-syntax-dynamic-import"]
}
5 changes: 5 additions & 0 deletions .browserslistrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Browsers that we support
# Run "npx browserslist" to get full list
> 0.1%
last 2 major versions
IE 11
19 changes: 19 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# http://editorconfig.org

root = true

[*]
indent_style = space
indent_size = 4
insert_final_newline = true
trim_trailing_whitespace = true
end_of_line = lf
charset = utf-8

# Docstrings and comments use max_line_length = 79
[*.py]
max_line_length = 119


# The JSON files contain newlines inconsistently
insert_final_newline = ignore
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.min.js
25 changes: 25 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"env": {
"browser": false,
"commonjs": true,
"es6": true,
"node": true
},
"parser": "@babel/eslint-parser",
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"sourceType": "module",
"allowImportExportEverywhere": true
},
"rules": {
"no-const-assign": "warn",
"no-this-before-super": "warn",
"no-undef": "warn",
"no-unreachable": "warn",
"no-unused-vars": "warn",
"constructor-super": "warn",
"valid-typeof": "warn"
}
}
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Ensure shell scripts are always checked out with unix line endings, even on Windows.
*.sh text eol=lf
102 changes: 102 additions & 0 deletions .github/workflows/build_release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
name: Build and Release package
on:
workflow_dispatch:
inputs:
release-type:
description: 'Release type (one of): patch, minor, major, prepatch, preminor, premajor, prerelease'
required: true
jobs:
release:
runs-on: ubuntu-latest
steps:
# Checkout project repository
- name: Checkout
uses: actions/checkout@v3
with:
token: ${{ secrets.DIGITAL_QHEALTH_WORKFLOW }}

- name: Setup Node.js
uses: actions/setup-node@v3
with:
registry-url: https://registry.npmjs.org/
node-version: '16'
cache: npm

- name: npm install and build webpack
run: |
npm ci
npm run build

# Configure Git
- name: Git configuration
run: |
git config --global user.email "${{ secrets.GH_ORG_EMAIL }}"
git config --global user.name "${{ secrets.GH_ORG_NAME }}"

# Bump package version
# Use tag latest
- name: Bump release version
if: startsWith(github.event.inputs.release-type, 'pre') != true
run: |
echo "NEW_VERSION=$(npm --no-git-tag-version version $RELEASE_TYPE)" >> $GITHUB_ENV
echo "RELEASE_TAG=latest" >> $GITHUB_ENV
env:
RELEASE_TYPE: ${{ github.event.inputs.release-type }}

# Bump package pre-release version
# Use tag beta for pre-release versions
- name: Bump pre-release version
if: startsWith(github.event.inputs.release-type, 'pre')
run: |
echo "NEW_VERSION=$(npm --no-git-tag-version --preid=beta version $RELEASE_TYPE)" >> $GITHUB_ENV
echo "RELEASE_TAG=beta" >> $GITHUB_ENV
env:
RELEASE_TYPE: ${{ github.event.inputs.release-type }}

# Update changelog unreleased section with new version
- name: Update changelog
uses: superfaceai/release-changelog-action@v1
with:
path-to-changelog: CHANGELOG.md
version: ${{ env.NEW_VERSION }}
operation: release

# Publish version to public repository
- name: Publish
run: npm publish --access public --tag ${{ env.RELEASE_TAG }}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPMJS_ACCESS_TOKEN }}

# Commit changes
- name: Commit CHANGELOG.md and package.json changes and create tag
run: |
git add "package.json"
git add "CHANGELOG.md"
git commit -m "chore: release ${{ env.NEW_VERSION }}"
git tag ${{ env.NEW_VERSION }}

# Push repository changes
- name: Push changes to repository
env:
token: ${{ secrets.DIGITAL_QHEALTH_WORKFLOW }}
run: |
git push origin && git push --tags

# Read version changelog
- id: get-changelog
name: Get version changelog
uses: superfaceai/release-changelog-action@v1
with:
path-to-changelog: CHANGELOG.md
version: ${{ env.NEW_VERSION }}
operation: read

# Update GitHub release with changelog
- name: Update GitHub release documentation
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ env.NEW_VERSION }}
body: ${{ steps.get-changelog.outputs.changelog }}
prerelease: ${{ startsWith(github.event.inputs.release-type, 'pre') }}
env:
token: ${{ secrets.DIGITAL_QHEALTH_WORKFLOW }}
104 changes: 104 additions & 0 deletions .github/workflows/pr-build-release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
name: PR Build and Release package

on:
pull_request_target:
types:
- closed
branches:
- 'master'

jobs:
release:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3
with:
token: ${{ secrets.DIGITAL_QHEALTH_WORKFLOW }}

- name: Setup Node.js
uses: actions/setup-node@v3
with:
registry-url: https://registry.npmjs.org/
node-version: '16'
cache: npm

- name: Configure Git
run: |
git config --global user.email "${{ secrets.GH_ORG_EMAIL }}"
git config --global user.name "${{ secrets.GH_ORG_NAME }}"

- name: npm install
run: npm ci

- name: Bump version
run: |
# Get the label names from the pull request event
LABELS=$(jq -r '.pull_request.labels[].name' "$GITHUB_EVENT_PATH")

# Convert the labels into an array
IFS=',' read -ra LABEL_ARRAY <<< "$LABELS"

# Initialize variable to store the highest label
HIGHEST_LABEL=""

# Loop through the labels and check for "major, minor, patch"
for LABEL in "${LABEL_ARRAY[@]}"; do
if [ "$LABEL" == "major" ] || [ "$LABEL" == "minor" ] || [ "$LABEL" == "patch" ]; then
HIGHEST_LABEL="$LABEL"
fi
done

# Check if a valid label was found
if [ -n "$HIGHEST_LABEL" ]; then
echo "NEW_VERSION=$(npm --no-git-tag-version version $HIGHEST_LABEL)" >> $GITHUB_ENV
echo "RELEASE_TAG=latest" >> $GITHUB_ENV
else
echo "No version bump label found, skipping release"
exit 0
fi

- name: npm build webpack
run: npm run build

- name: Update changelog
uses: superfaceai/release-changelog-action@v1
with:
path-to-changelog: CHANGELOG.md
version: ${{ env.NEW_VERSION }}
operation: release

- name: Publish
run: npm publish --access public --tag ${{ env.RELEASE_TAG }}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPMJS_ACCESS_TOKEN }}

- name: Commit CHANGELOG.md and package.json changes and create tag
run: |
git add .
git commit -m "chore: release ${{ env.NEW_VERSION }}"
git tag ${{ env.NEW_VERSION }}

- name: Push changes to repository
env:
token: ${{ secrets.DIGITAL_QHEALTH_WORKFLOW }}
run: |
git push origin && git push --tags

- name: Get version changelog
id: get-changelog
uses: superfaceai/release-changelog-action@v1
with:
path-to-changelog: CHANGELOG.md
version: ${{ env.NEW_VERSION }}
operation: read

- name: Update GitHub release documentation
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ env.NEW_VERSION }}
body: ${{ steps.get-changelog.outputs.changelog }}
env:
token: ${{ secrets.DIGITAL_QHEALTH_WORKFLOW }}
12 changes: 12 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
node
node_modules
.env
.DS_Store
.vscode
storybook-static/
build-storybook.log
docs/
dist/
.idea
*.iml
docs/storybook-static
13 changes: 13 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
.github/
.vscode/
dist/
scripts/
webpack/
.babelrc
.browserslistrc
.editorconfig
.eslintignore
.eslintrc
.gitattributes
.gitignore
package-lock.json
Loading