Skip to content

Commit

Permalink
Merge pull request #6 from nodecfdi/dev
Browse files Browse the repository at this point in the history
chore: version bump 1.1.1
  • Loading branch information
luffynando authored Jan 23, 2023
2 parents 8917372 + 413d382 commit 15d2e7b
Show file tree
Hide file tree
Showing 48 changed files with 3,272 additions and 5,020 deletions.
46 changes: 0 additions & 46 deletions .babelrc.cjs

This file was deleted.

2 changes: 1 addition & 1 deletion .changeset/config.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "https://unpkg.com/@changesets/config@2.1.0/schema.json",
"$schema": "https://unpkg.com/@changesets/config@2.3.0/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"fixed": [],
Expand Down
10 changes: 6 additions & 4 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
node_modules
coverage
dist
docs
examples
coverage
web_modules
tsconfig.json
temp

# Config files
rollup.config.mjs
vitest.config.ts
89 changes: 0 additions & 89 deletions .eslintrc.cjs

This file was deleted.

68 changes: 68 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
{
"root": true,
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint", "eslint-plugin-tsdoc"],
"extends": ["eslint:recommended", "xo", "xo-typescript", "plugin:unicorn/recommended", "prettier"],
"parserOptions": {
"project": ["./tsconfig.json", "./tests/tsconfig.json"]
},
"rules": {
// Eslint suite rules
"new-cap": ["error", { "capIsNew": false }],
"semi": "error",
"quotes": [
"error",
"single",
{
"allowTemplateLiterals": true,
"avoidEscape": true
}
],

// Typescript rules
"@typescript-eslint/ban-types": [
"error",
{
"types": {
"null": false
},
"extendDefaults": true
}
],
"@typescript-eslint/explicit-function-return-type": [
"error",
{
"allowExpressions": true,
"allowTypedFunctionExpressions": true
}
],
"@typescript-eslint/explicit-member-accessibility": [
"error",
{
"accessibility": "explicit",
"overrides": {
"constructors": "no-public"
}
}
],
"@typescript-eslint/naming-convention": [
"error",
{ "selector": "class", "format": ["PascalCase", "camelCase"] }
],

// Unicorn rules
"unicorn/consistent-function-scoping": [
"error",
{
"checkArrowFunctions": false
}
],
"unicorn/no-null": "off",
"unicorn/prefer-dom-node-append": "off",
"unicorn/prefer-export-from": "off",
"unicorn/prefer-query-selector": "off",

// TSDOC rules
"tsdoc/syntax": "warn"
}
}
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,6 @@
/.husky/** linguist-detectable=false
*.cjs linguist-detectable=false
/examples/** linguist-detectable=false
*.mjs linguist-detectable=false

*.json linguist-language=JSON-with-Comments
131 changes: 68 additions & 63 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,74 +1,79 @@
name: build
on:
push:
branches:
- '*'
pull_request:
branches:
- main
- dev
schedule:
- cron: '0 16 * * 0' # sunday 16:00
push:
branches:
- main
- dev

pull_request:
branches:
- main
- dev

schedule:
- cron: '0 16 * * 0' # sunday 16:00

jobs:
build:
name: Node unit tests
runs-on: ubuntu-latest
strategy:
matrix:
node: ['14', '16', '17', '18']
steps:
- name: Checkout
uses: actions/checkout@v3
build:
name: Node unit tests
runs-on: ubuntu-latest
strategy:
matrix:
node: ['14', '16', '17', '18', '19']
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Cache .pnpm-store
uses: actions/cache@v3
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-node${{ matrix.node-version }}-${{ hashFiles('**/pnpm-lock.yaml') }}

- name: Setup node
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}

- name: Cache .pnpm-store
uses: actions/cache@v3
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-node${{ matrix.node-version }}-${{ hashFiles('**/pnpm-lock.yaml') }}
- name: Install dependencies
uses: pnpm/action-setup@v2
with:
version: 7
run_install: true

- name: Setup node
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
- name: Lint source
run: |
pnpm lint:check
- name: Install dependencies
uses: pnpm/action-setup@v2.2.2
with:
version: 6.23.6
run_install: true
- name: Build package
run: |
pnpm build
- name: Lint source
run: |
pnpm lint:ci
- name: Build package
run: |
pnpm build
- name: Run tests
run: |
pnpm test:ci
env:
CI: true
- name: Run tests
run: |
pnpm test:run
env:
CI: true

- name: 'Consume changesets'
if: github.event_name == 'push' && github.repository == 'nodecfdi/xml-schema-validator' && matrix.node == 16 && github.ref == 'refs/heads/main'
uses: changesets/action@v1
id: 'changesets'
with:
# This expects you to have a script called release which does a build for your packages and calls changeset publish
publish: pnpm release
commit: 'chore: version bump'
title: Next release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: 'Consume changesets'
if: github.event_name == 'push' && github.repository == 'nodecfdi/xml-schema-validator' && matrix.node == 16 && github.ref == 'refs/heads/main'
uses: changesets/action@v1
id: 'changesets'
with:
# This expects you to have a script called release which does a build for your packages and calls changeset publish
publish: pnpm release
commit: 'chore: version bump'
title: Next release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: 'Generate docs'
if: steps.changesets.outputs.published == 'true'
run: pnpm gen:docs
- name: 'Generate docs'
if: steps.changesets.outputs.published == 'true'
run: pnpm gen:docs

- name: Commit docs
if: steps.changesets.outputs.published == 'true'
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: 'docs: generate docs'
- name: Commit docs
if: steps.changesets.outputs.published == 'true'
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: 'docs: generate docs'
Loading

0 comments on commit 15d2e7b

Please sign in to comment.