Skip to content

Commit

Permalink
[fix] 2 compatibility bugs of cross JS runtimes
Browse files Browse the repository at this point in the history
[add] GitHub settings & VS Code extensions
[migrate] replace Yarn with PNPM to reduce Disk Usage
[optimize] upgrade Tool-chain packages
  • Loading branch information
TechQuery committed Dec 25, 2023
1 parent 249feca commit cb5ae12
Show file tree
Hide file tree
Showing 12 changed files with 584 additions and 551 deletions.
85 changes: 85 additions & 0 deletions .github/settings.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
# These settings are synced to GitHub by https://probot.github.io/apps/settings/

repository:
allow_merge_commit: false

delete_branch_on_merge: true

enable_vulnerability_alerts: true

labels:
- name: bug
color: '#d73a4a'
description: Something isn't working

- name: documentation
color: '#0075ca'
description: Improvements or additions to documentation

- name: duplicate
color: '#cfd3d7'
description: This issue or pull request already exists

- name: enhancement
color: '#a2eeef'
description: Some improvements

- name: feature
color: '#16b33f'
description: New feature or request

- name: good first issue
color: '#7057ff'
description: Good for newcomers

- name: help wanted
color: '#008672'
description: Extra attention is needed

- name: invalid
color: '#e4e669'
description: This doesn't seem right

- name: question
color: '#d876e3'
description: Further information is requested

- name: wontfix
color: '#ffffff'
description: This will not be worked on

branches:
- name: main
# https://docs.github.com/en/rest/reference/repos#update-branch-protection
protection:
# Required. Require at least one approving review on a pull request, before merging. Set to null to disable.
required_pull_request_reviews:
# The number of approvals required. (1-6)
required_approving_review_count: 1
# Dismiss approved reviews automatically when a new commit is pushed.
dismiss_stale_reviews: true
# Blocks merge until code owners have reviewed.
require_code_owner_reviews: true
# Specify which users and teams can dismiss pull request reviews.
# Pass an empty dismissal_restrictions object to disable.
# User and team dismissal_restrictions are only available for organization-owned repositories.
# Omit this parameter for personal repositories.
dismissal_restrictions:
# users: []
# teams: []
# Required. Require status checks to pass before merging. Set to null to disable
required_status_checks:
# Required. Require branches to be up to date before merging.
strict: true
# Required. The list of status checks to require in order to merge into this branch
contexts: []
# Required. Enforce all configured restrictions for administrators.
# Set to true to enforce required status checks for repository administrators.
# Set to null to disable.
enforce_admins: true
# Prevent merge commits from being pushed to matching branches
required_linear_history: true
# Required. Restrict who can push to this branch.
# Team and user restrictions are only available for organization-owned repositories.
# Set to null to disable.
restrictions: null
21 changes: 13 additions & 8 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,20 @@ jobs:
Build-and-Publish:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v2
- uses: actions/checkout@v3

- uses: pnpm/action-setup@v2
with:
node-version: 14
version: 8
- uses: actions/setup-node@v3
with:
node-version: 18
registry-url: https://registry.npmjs.org
cache: yarn
- name: Install, Build & Publish
run: yarn && yarn publish
cache: pnpm
- name: Install Dependencies
run: pnpm i --frozen-lockfile

- name: Build & Publish
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ build/Release

# Dependency files
package-lock.json
yarn.lock
node_modules/
jspm_packages/

Expand Down Expand Up @@ -103,3 +104,7 @@ dist

# TernJS port file
.tern-port

# IDE configuration
.vscode/settings.json
.idea/
4 changes: 3 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
!dist/
.husky/
.github/
.github/
.vscode/
.idea/
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
auto-install-peers = false
14 changes: 14 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"recommendations": [
"yzhang.markdown-all-in-one",
"redhat.vscode-yaml",
"akamud.vscode-caniuse",
"visualstudioexptteam.intellicode-api-usage-examples",
"pflannery.vscode-versionlens",
"christian-kohler.npm-intellisense",
"esbenp.prettier-vscode",
"eamodio.gitlens",
"github.vscode-pull-request-github",
"github.vscode-github-actions"
]
}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import 'event-submitter-polyfill';

```html
<head>
<script src="https://cdn.jsdelivr.net/npm/event-submitter-polyfill"></script>
<script src="https://polyfill.web-cell.dev/feature/EventSubmitter.js"></script>
</head>
```

Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "event-submitter-polyfill",
"version": "0.3.1",
"version": "0.3.2",
"description": "A polyfill for submitter property of form Submit Event, which is written in TypeScript.",
"keywords": [
"submitter",
Expand All @@ -27,10 +27,10 @@
"url": "https://github.com/idea2app/event-submitter-polyfill/issues"
},
"devDependencies": {
"husky": "^8.0.1",
"lint-staged": "^12.4.1",
"prettier": "^2.6.2",
"typescript": "^4.6.4"
"husky": "^8.0.3",
"lint-staged": "^15.2.0",
"prettier": "^3.1.1",
"typescript": "~5.3.3"
},
"prettier": {
"singleQuote": true,
Expand Down
Loading

0 comments on commit cb5ae12

Please sign in to comment.