Skip to content

Commit

Permalink
Fix Node.js 20 (#18)
Browse files Browse the repository at this point in the history
* Move to new scaffold

* Rename master to main

* Update PR number

* Adds github-pages: false

* Remove with.node-version

* Add scripts

* Update description

* Remove Babel

* Add tsconfig.*

* Add @tsconfig/strictest

* Disable precommit for now

* Add project-type

* Add node-version

* Exit with result.status

* Add prior arts
  • Loading branch information
compulim authored May 24, 2024
1 parent 9b49011 commit 320b9e4
Show file tree
Hide file tree
Showing 29 changed files with 3,767 additions and 215 deletions.
6 changes: 6 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"forwardPorts": [8000],
"image": "mcr.microsoft.com/devcontainers/typescript-node",
"remoteUser": "node",
"updateContentCommand": "npm clean-install && npm run build"
}
10 changes: 10 additions & 0 deletions .eslintrc.jest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
env:
commonjs: true
es2021: true
es2022: true
jest: true
rules:
# Disable for convenience
react/display-name: off
# Disable for convenience
react/prop-types: off
7 changes: 7 additions & 0 deletions .eslintrc.react.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
extends:
- plugin:react/recommended
plugins:
- react
settings:
react:
version: 18.2.0
12 changes: 12 additions & 0 deletions .eslintrc.typescript.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
extends:
- plugin:@typescript-eslint/recommended
parser: '@typescript-eslint/parser'
plugins:
- '@typescript-eslint'
rules:
'@typescript-eslint/no-unused-vars':
- error
- argsIgnorePattern: ^_
caughtErrorsIgnorePattern: ^_
destructuredArrayIgnorePattern: ^_
varsIgnorePattern: ^_
44 changes: 44 additions & 0 deletions .eslintrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
env:
node: true
extends:
- eslint:recommended
overrides:
- extends: .eslintrc.react.yml
files:
- '**/*.jsx'
- '**/*.tsx'
- extends: .eslintrc.typescript.yml
files:
- '**/*.mts'
- '**/*.ts'
- '**/*.tsx'
- extends: .eslintrc.jest.yml
files:
- '**/__tests__/**'
- '**/*.spec.cjs'
- '**/*.spec.mjs'
- '**/*.spec.js'
- '**/*.spec.jsx'
- '**/*.spec.cts'
- '**/*.spec.mts'
- '**/*.spec.ts'
- '**/*.spec.tsx'
- '**/*.test.cjs'
- '**/*.test.mjs'
- '**/*.test.js'
- '**/*.test.jsx'
- '**/*.test.cts'
- '**/*.test.mts'
- '**/*.test.ts'
- '**/*.test.tsx'
parserOptions:
ecmaVersion: latest
sourceType: module
plugins:
- prettier
root: true
rules:
prettier/prettier: error
no-empty:
- error
- allowEmptyCatch: true
58 changes: 58 additions & 0 deletions .github/ISSUE_TEMPLATE/bug.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Bug report
description: Use this template to report a bug.
labels:
- bug
body:
- type: markdown
attributes:
value: |
We run this project out of our spare time and may not monitor this repository every day. Our support capacity is very limited.
Developers in professional capacity will receive prioritized support.
- type: dropdown
attributes:
label: Version
description: |
Please verify the issue on latest versions. Support on non-latest version is minimal and on a per case basis.
If you are using latest production, please verify against our latest development version as the issue could have been resolved recently. To install latest development version, run `npm install iter-fest@main`.
multiple: true
options:
- Latest production (@latest)
- Latest development (@main)
- Not latest
validations:
required: true
- type: textarea
attributes:
label: Test case
description: |
Please write a minimal test case which fail the scenario with comments in [BDD format (given/when/then)](https://www.thoughtworks.com/insights/blog/applying-bdd-acceptance-criteria-user-stories).
To protect from regressions, once the issue is resolved, your test case will be added to [our test suite](../tree/main/packages/integration-test/).
For your convenience, a basic test case is provided below. For advanced scenarios, please look at [our test suite](../tree/main/packages/integration-test/).
*Support will be slow or denied if a test case is not provided.*
render: sh
value:
- type: input
attributes:
label: Coding sandbox URL
description: |
If you have a minimal repro in a coding sandbox, please provide a URL here. Please prepare it from scratch. We cannot work directly on your app source code.
placeholder: 'https://'
- type: textarea
attributes:
label: Console errors
description: Please copy any related errors printed to the console here.
render: js
- type: textarea
attributes:
label: Screenshots
description: Please remove or obscure any personally identifiable information from your screenshots or recordings.
- type: textarea
attributes:
label: Additional context
description: If any of the answers is "others or unrelated", please explain it here.
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
blank_issues_enabled: false
9 changes: 9 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
## Changelog

> Please copy and paste new entries from `CHANGELOG.md` here.
## Specific changes

> Please list each individual specific change in this pull request.
-
14 changes: 14 additions & 0 deletions .github/workflows/bump-dependencies.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Bump dependencies

on:
workflow_dispatch: {}

jobs:
call-workflow:
permissions:
contents: write
id-token: write
secrets: inherit
uses: compulim/workflows/.github/workflows/bump-dependencies.yml@main
with:
package-name: version-from-git
29 changes: 29 additions & 0 deletions .github/workflows/bump-scaffold.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Bump scaffold

on:
workflow_dispatch:
inputs:
package-name:
default: version-from-git
description: Name of the package
required: true
type: string
use-react:
default: false
description: Use React
required: true
type: boolean
skip-integration-test:
default: false
description: Skip integration test
required: true
type: boolean

jobs:
call-workflow:
secrets: inherit
uses: compulim/workflows/.github/workflows/bump-scaffold.yml@main
with:
package-name: ${{ inputs.package-name }}
skip-integration-test: ${{ inputs.skip-integration-test }}
use-react: ${{ inputs.use-react }}
22 changes: 22 additions & 0 deletions .github/workflows/continuous-deployment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Continuous deployment

on:
push:
branches: [main]
paths-ignore:
- '.devcontainer/**'
- '.github/**'
workflow_dispatch: {}

jobs:
call-workflow:
permissions:
contents: write
id-token: write
pages: write
secrets: inherit
uses: compulim/workflows/.github/workflows/continuous-deployment.yml@main
with:
github-pages: false
node-version: 18.x
package-name: version-from-git
10 changes: 10 additions & 0 deletions .github/workflows/list-outdated-dependencies.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: List outdated dependencies

on:
schedule:
- cron: '0 4 * * 1'
workflow_dispatch: {}

jobs:
call-workflow:
uses: compulim/workflows/.github/workflows/list-outdated-dependencies.yml@main
12 changes: 12 additions & 0 deletions .github/workflows/prepare-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Prepare release

on:
workflow_dispatch: {}

jobs:
call-workflow:
permissions:
contents: write
id-token: write
secrets: inherit
uses: compulim/workflows/.github/workflows/prepare-release.yml@main
17 changes: 17 additions & 0 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Publish release

on:
release:
types: [created]

jobs:
call-workflow:
permissions:
contents: write
pages: write
id-token: write
secrets: inherit
uses: compulim/workflows/.github/workflows/publish-release.yml@main
with:
package-name: version-from-git
tag: ${{ github.ref_name }}
19 changes: 19 additions & 0 deletions .github/workflows/pull-request-validation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Pull request validation

on:
pull_request:
branches: [main]
workflow_dispatch: {}

jobs:
call-workflow:
strategy:
matrix:
switch: [current]
uses: compulim/workflows/.github/workflows/pull-request-validation.yml@main
with:
github-pages: false
package-name: version-from-git
project-type: legacy
skip-integration-test: true
switch: ${{ matrix.switch }}
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
lib
node_modules
/node_modules
11 changes: 11 additions & 0 deletions .prettierrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
arrowParens: avoid
bracketSameLine: false
bracketSpacing: true
endOfLine: auto
printWidth: 120
proseWrap: preserve
quoteProps: as-needed
semi: true
singleQuote: true
tabWidth: 2
trailingComma: none
32 changes: 0 additions & 32 deletions .travis.yml

This file was deleted.

9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,24 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [Unreleased]

### Fixed

- Resolves [#16](https://github.com/compulim/version-from-git/issues/16). Fixes for Node.js 20, in PR [#17](https://github.com/compulim/version-from-git/pulls/17) and [#18](https://github.com/compulim/version-from-git/pulls/18), by [@evilru](https://github.com/evilru]

## [1.1.1] - 2019-08-12

### Added

- Fix [#2](https://github.com/compulim/version-from-git/issues/2). Supports customizing pre-release thru `--template`, in [PR #3](https://github.com/compulim/version-from-git/pulls/3)

## [1.0.0] - 2018-05-18

### Added

- Initial commit
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2019 William Wong

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Loading

0 comments on commit 320b9e4

Please sign in to comment.