Skip to content

Commit

Permalink
Merge pull request #2 from kuzzleio/beta
Browse files Browse the repository at this point in the history
  • Loading branch information
fmauNeko authored Sep 10, 2024
2 parents 44636b6 + 15c4112 commit c70b641
Show file tree
Hide file tree
Showing 29 changed files with 17,508 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .cz.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"path": "./node_modules/cz-conventional-changelog"
}
16 changes: 16 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# EditorConfig is awesome: https://EditorConfig.org

# top-most EditorConfig file
root = true

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

[*.md]
trim_trailing_whitespace = false
indent_size = 4
5 changes: 5 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"plugins": ["kuzzle"],
"extends": ["plugin:kuzzle/default", "plugin:kuzzle/node", "plugin:kuzzle/typescript"],
"ignorePatterns": ["dist/"]
}
29 changes: 29 additions & 0 deletions .github/issue_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<!--- Provide a general summary of the issue in the Title above -->

## Expected Behavior

<!--- Tell us what should happen -->

## Current Behavior

<!--- Tell us what happens instead of the expected behavior -->

## Possible Solution

<!--- Not obligatory, but suggest a fix/reason for the bug, -->

## Steps to Reproduce

<!--- Provide a link to a live example, or an unambiguous set of steps to -->
<!--- reproduce this bug. Include code to reproduce, if relevant -->

1.
2.
3.
4.

## Context (Environment)

<!--- How has this issue affected you? What are you trying to accomplish? -->
<!--- Providing context helps us come up with a solution that is most useful in the real world -->
<!--- Include NodeJS version, SDK version, Kuzzle version, ElasticSearch version, ... -->
46 changes: 46 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<!--
This template is not mandatory.
It simply serves to provide a guide to allow a better review of pull requests.
-->

<!--
IMPORTANT
Don't forget to add the corresponding "changelog:xxx" label to your PR.
This is part of our release process in order to generate the change log.
-->

## What does this PR do ?

<!-- Please fulfill this section -->

<!--
Please include a summary of the change and which issue is fixed.
Please also include relevant motivation and context.
List any dependencies that are required for this change.
-->

### How should this be manually tested?

<!--
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce.
Please also list any relevant details for your test configuration
-->

- Step 1 :
- Step 2 :
- Step 3 :
...

### Other changes

<!--
Please describe here all changes not directly linked to the main issue, but made because of it.
For instance: issues spotted during this PR and fixed on-the-fly, dependencies update, and so on
-->

### Boyscout

<!--
Describe here minor improvements in the code base and not directly linked to the main changes:
typos fixes, better/new comments, small code simplification, new debug messages, and so on.
-->
71 changes: 71 additions & 0 deletions .github/workflows/pull_request.workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: Pull request checks

on: [pull_request]

jobs:
lint:
name: Lint
runs-on: ubuntu-latest
strategy:
matrix:
node-version: ['18', '20', '22']
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
cache: 'npm'
node-version: ${{ matrix.node-version }}

- name: Install dependencies
run: npm ci

- name: Run lint
run: npm run lint

check-types:
name: Check types
runs-on: ubuntu-latest
strategy:
matrix:
node-version: ['18', '20', '22']
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
cache: 'npm'
node-version: ${{ matrix.node-version }}

- name: Install dependencies
run: npm ci

- name: Run types tests
run: npm run test:types

unit-tests:
name: Unit tests
runs-on: ubuntu-latest
needs: [lint, check-types]
strategy:
matrix:
node-version: ['18', '20', '22']
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
cache: 'npm'
node-version: ${{ matrix.node-version }}

- name: Install dependencies
run: npm ci

- name: Run unit tests
run: npm run test:unit
47 changes: 47 additions & 0 deletions .github/workflows/release.workflow.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Release

on:
push:
branches:
- main
- beta

jobs:
release:
name: Release process
runs-on: ubuntu-22.04
permissions:
contents: write
issues: write
pull-requests: write
packages: write
steps:
- name: Checkout
uses: actions/checkout@v4

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

- name: Install dependencies
run: npm ci

- name: Build
run: npm run build

- name: Release
env:
GITHUB_TOKEN: ${{ secrets.SEMANTIC_RELEASE_GHP }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
SEMANTIC_RELEASE_NPM_PUBLISH: 'true'
SEMANTIC_RELEASE_SLACK_WEBHOOK: ${{ secrets.SEMANTIC_RELEASE_SLACK_WEBHOOK }}
run: npx semantic-release

- name: Rebase dev branch (keep linear history)
run: |
git fetch --no-tags origin 1-dev:1-dev
git rebase ${GITHUB_REF_NAME} 1-dev
git push origin 1-dev
1 change: 1 addition & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
npx --no -- commitlint --edit $1
1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
npx lint-staged
4 changes: 4 additions & 0 deletions .lintstagedrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module.exports = {
'*.{js,ts}': 'eslint --fix',
'*.md': 'prettier --write',
};
7 changes: 7 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"trailingComma": "all",
"singleQuote": true,
"printWidth": 100,
"tabWidth": 2,
"semi": true
}
10 changes: 10 additions & 0 deletions .releaserc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"extends": ["semantic-release-config-kuzzle"],
"branches": [
"main",
{
"name": "beta",
"prerelease": true
}
]
}
16 changes: 16 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"version": "0.2.0",
"configurations": [
{
"address": "localhost",
"localRoot": "${workspaceFolder}",
"name": "API - Attach to Remote",
"port": 9229,
"remoteRoot": "Absolute path to the remote directory containing the program",
"request": "attach",
"restart": true,
"skipFiles": ["<node_internals>/**"],
"type": "node"
}
]
}
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# [1.0.0-beta.2](https://github.com/kuzzleio/pino-transport-ecs/compare/v1.0.0-beta.1...v1.0.0-beta.2) (2024-09-10)

### Bug Fixes

- **npm pack:** add files field in package.json ([e7db536](https://github.com/kuzzleio/pino-transport-ecs/commit/e7db536d0bf6518506900f46fa40785c6a87ee9e))

# 1.0.0-beta.1 (2024-09-10)

### Features

- **transport:** initial transport implementation ([eaa6cf3](https://github.com/kuzzleio/pino-transport-ecs/commit/eaa6cf3875b1fe3cef699e94126c31b262cd4c04))
8 changes: 8 additions & 0 deletions commitlint.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import type { UserConfig } from '@commitlint/types';

const Configuration: UserConfig = {
extends: ['@commitlint/config-conventional'],
ignores: [(message) => message.includes('chore(release)')],
};

export default Configuration;
5 changes: 5 additions & 0 deletions ergol.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"killDelay": "5000",
"nodeArgs": ["--inspect=0.0.0.0:9229", "-r", "ts-node/register"],
"watch": ["tests/application", "src/"]
}
9 changes: 9 additions & 0 deletions jest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { type JestConfigWithTsJest, createDefaultPreset } from 'ts-jest';

const defaultPreset = createDefaultPreset();

const jestConfig: JestConfigWithTsJest = {
...defaultPreset,
};

export default jestConfig;
Loading

0 comments on commit c70b641

Please sign in to comment.