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

feat: Updated library versions; Added examples for dog-fooding; Automated release process; Node 22 upgrade #35

Merged
merged 5 commits into from
Sep 26, 2024
Merged
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
3 changes: 3 additions & 0 deletions .clean-publish
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"fields": ["scripts"]
}
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
dist
node_modules
9 changes: 1 addition & 8 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,8 +1 @@
/**
* Copyright (c) Encoura, LLC and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

module.exports = require('./index');
module.exports = require('./src/index');
22 changes: 22 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
name: Bug report
about: Create a report to help us improve
title: 'Bug Report: '
labels: ''
assignees: ''
---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior...

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Additional context**
Add any other context about the problem here.
21 changes: 21 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
name: Feature request
about: Suggest an idea for this project
title: 'Feature Request: '
labels: ''
assignees: ''
---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always
frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've
considered.

**Additional context**
Add any other context or screenshots about the feature request here.
30 changes: 30 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
version: 2
updates:
- package-ecosystem: 'npm'
directory: '/'
schedule:
interval: 'monthly'
groups:
patch:
patterns:
- '*'
update-types:
- 'patch'
commitlint:
patterns:
- '@commitlint*'
semantic-release:
patterns:
- '@semantic-release*'
- 'semantic-release'
typescript-eslint:
patterns:
- '@typescript-eslint*'
types:
patterns:
- '@types/*'
typescript:
patterns:
- 'typescript'
- 'typescript-*'
- 'ts-*'
46 changes: 46 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Continuous Integration
on:
push:
branches:
- main
workflow_dispatch:

jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 22
- name: Install dependencies
run: npm ci --ignore-scripts
- name: Test
run: npm test
release:
name: Release
needs: test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 22
- name: Install dependencies
run: npm ci --ignore-scripts
- name: Build
run: npm run build
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npx semantic-release
36 changes: 0 additions & 36 deletions .github/workflows/pr-testing.yml

This file was deleted.

23 changes: 23 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Pull Request Validation
on:
workflow_dispatch:
pull_request:
merge_group:

jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 22
- name: Install dependencies
run: npm ci --ignore-scripts
- name: Test
run: npm test
35 changes: 0 additions & 35 deletions .github/workflows/publish.yml

This file was deleted.

5 changes: 2 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
.DS_Store
dist
node_modules
npm-debug.log
package-lock.json
npm-shrinkwrap.json
tsconfig.tsbuildinfo
1 change: 1 addition & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
./node_modules/.bin/commitlint --config "./src/commitlint.config.js" --edit $1
4 changes: 0 additions & 4 deletions .npmignore

This file was deleted.

2 changes: 1 addition & 1 deletion .npmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
package-lock=false
preid=rc
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
18
v22
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CHANGELOG.md
22 changes: 1 addition & 21 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -1,21 +1 @@
const defaultConfig = require('@actinc/eslint-config/prettier.config');

const config = { ...defaultConfig };

// jsxBracketSameLine is deprecated, so squash the warning
if (typeof config.jsxBracketSameLine !== 'undefined') {
delete config.jsxBracketSameLine;
}
config.printWidth = 120;
config.insertPragma = false;
config.requirePragma = false;
config.overrides = [
{
files: ['*.jsx', '*.tsx'],
options: {
printWidth: 160,
},
},
];

module.exports = config;
module.exports = require('./src/prettier.config');
44 changes: 44 additions & 0 deletions .releaserc
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
[
"@semantic-release/changelog",
{
"changelogFile": "CHANGELOG.md",
"changeLogTitle": "# Changelog"
}
],
[
"@semantic-release/exec",
{
"prepareCmd": "npm version ${nextRelease.version} --no-commit-hooks --no-git-tag-version"
}
],
[
"@semantic-release/npm",
{
"pkgRoot": "./dist"
}
],
"@semantic-release/github",
[
"@semantic-release/git",
{
"assets": [
"CHANGELOG.md",
"package.json",
"package-lock.json"
],
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
}
]
],
"repositoryUrl": "[email protected]:nrrccua/eslint-config.git",
"branches": [
{
"name": "main",
"prerelease": false
}
]
}
12 changes: 0 additions & 12 deletions .versionrc

This file was deleted.

3 changes: 3 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"recommendations": ["esbenp.prettier-vscode", "dbaeumer.vscode-eslint"]
}
3 changes: 3 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"configurations": []
}
33 changes: 33 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"editor.formatOnSave": true,
"editor.formatOnPaste": true,
"git.ignoreLimitWarning": true,
"editor.tabSize": 2,
"editor.codeActionsOnSave": ["source.organizeImports", "source.fixAll", "source.addMissingImports"],
"eslint.codeActionsOnSave.mode": "problems",
"typescript.tsdk": "node_modules/typescript/lib",
"[javascript]": {
"editor.codeActionsOnSave": {
"source.fixAll": "never",
"source.fixAll.eslint": "explicit",
"source.organizeImports": "never"
},
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[typescript]": {
"editor.codeActionsOnSave": {
"source.fixAll": "never",
"source.fixAll.eslint": "always",
"source.organizeImports": "always"
},
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[typescriptreact]": {
"editor.codeActionsOnSave": {
"source.fixAll": "never",
"source.fixAll.eslint": "always",
"source.organizeImports": "always"
},
"editor.defaultFormatter": "esbenp.prettier-vscode"
}
}
Loading
Loading