Skip to content

Commit

Permalink
Merge branch 'main' into whitesource-remediate/dependabot-fetch-metad…
Browse files Browse the repository at this point in the history
…ata-1.x
  • Loading branch information
franher authored Oct 28, 2023
2 parents 543a0f0 + e4af77a commit 8696564
Show file tree
Hide file tree
Showing 173 changed files with 2,119 additions and 719 deletions.
5 changes: 5 additions & 0 deletions .commitlintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"extends": [
"@commitlint/config-conventional"
]
}
4 changes: 2 additions & 2 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
dist/
**/dist/**/*
node_modules/
coverage/
target/
Expand All @@ -12,5 +13,4 @@ target/
*.sublime-*
*.swo
*.swp
*.tgz
packages/bautajs-core/benchmark/legacy/*.js
*.tgz
46 changes: 30 additions & 16 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,27 +1,36 @@
{
"root": true,
"plugins": ["@typescript-eslint", "import", "prettier"],
"extends": [
"airbnb-base",
"airbnb-typescript/base",
"plugin:jest/all",
"plugin:prettier/recommended",
"prettier"
"prettier",
"plugin:@typescript-eslint/recommended",
"plugin:import/typescript"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 2020,
"project": "./tsconfig.base.json",
"sourceType": "module"
"project": "tsconfig.eslint.json"
},
"overrides": [
{
"files": "**/__tests__/*.js",
"files": "**/*.js",
"rules": {
"example-internal/no-focused-tests": 2
"@typescript-eslint/ban-ts-comment": 0,
"@typescript-eslint/no-var-requires": 0,
"import/extensions": 0
}
},
{
"files": "**/test/*",
"rules": {
"@typescript-eslint/ban-ts-comment": 0,
"@typescript-eslint/no-var-requires": 0
}
}
],
"plugins": ["import", "prettier", "jest"],
"rules": {
"@typescript-eslint/no-explicit-any": 0,
"@typescript-eslint/ban-ts-comment": 1,
"@typescript-eslint/member-delimiter-style": [
"error",
{
Expand All @@ -40,11 +49,6 @@
"comma-dangle": ["error", "never"],
"import/no-extraneous-dependencies": "off",
"import/prefer-default-export": "off",
"jest/consistent-test-it": 0,
"jest/no-hooks": 0,
"jest/require-hook": 0,
"jest/prefer-expect-assertions": 0,
"jest/no-conditional-in-test": 0,
"no-multiple-empty-lines": [
"error",
{
Expand All @@ -61,6 +65,16 @@
}
],
"no-promise-executor-return": 0,
"class-methods-use-this": "warn"
"class-methods-use-this": "warn",
"import/extensions": [
"error",
"always",
{
"pattern": {
"js": "never",
"ts": "never"
}
}
]
}
}
26 changes: 0 additions & 26 deletions .github/workflows/ci-windows.yml

This file was deleted.

6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: CI

on:
push:
branches: [main, 3.x]
branches: [main]
pull_request:
branches: [main, 3.x]
branches: [main]

jobs:
build:
Expand All @@ -14,7 +14,7 @@ jobs:
strategy:
fail-fast: false
matrix:
node-version: [14.x, 16.x, 18.x]
node-version: [16.x, 18.x]
os: [macos-latest, ubuntu-latest, windows-latest]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

Expand Down
61 changes: 30 additions & 31 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"
name: 'CodeQL'

on:
push:
branches: [ "main", "3.x" ]
branches: ['main']
pull_request:
# The branches below must be a subset of the branches above
branches: [ "main", "3.x" ]
branches: ['main']

jobs:
analyze:
Expand All @@ -30,41 +30,40 @@ jobs:
strategy:
fail-fast: false
matrix:
language: [ 'javascript' ]
language: ['javascript']
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support

steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Checkout repository
uses: actions/checkout@v3

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.

# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.


# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2
# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality

# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2

# If the Autobuild fails above, remove it and uncomment the following three lines.
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun

# - run: |
# echo "Run, Build Application using script"
# ./location_of_script_within_repo/buildscript.sh
# If the Autobuild fails above, remove it and uncomment the following three lines.
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
# - run: |
# echo "Run, Build Application using script"
# ./location_of_script_within_repo/buildscript.sh

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
70 changes: 0 additions & 70 deletions .github/workflows/release-new.yml

This file was deleted.

72 changes: 59 additions & 13 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,70 @@
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages
# BAUTA.JS RELEASE PROCESS
# 1) on-demand workflow
# 1.1) input version semver (X.Y.Z) mandatory
# 1.2) input branch (main by default)
# 2) lerna publish x.y.z
# 2.1) git tag + commit --- chore(release): vX.Y.Z
# 2.2) NPM publish
# 3) github release from tag vX.Y.Z on 1.2) branch input

name: Publish npm version when new GitHub release
name: Bauta.js Release

on:
release:
types: [published]
workflow_dispatch:
inputs:
version:
description: 'Version (semver) to release'
required: true
type: string
branch:
description: 'Base branch to release'
required: true
default: 'main'
type: string

jobs:
publish-npm:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v3
- uses: actions/checkout@v3
with:
ref: ${{ inputs.branch }}
fetch-depth: 0
- uses: actions/setup-node@v2
with:
node-version: 18
registry-url: https://registry.npmjs.org/
- run: npm i
- run: npm run build
- run: npm test
- run: npm run release:from-package
- name: Install dependencies
run: npm i
- name: Build distributable files
run: npm run build
- name: Run linter
run: npm run lint
- name: Run tests
run: npm test
- name: Removing package-lock
run: rm package-lock.json
- name: Versioning & Publishing
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
GH_TOKEN: ${{ secrets.GH_CLI_TOKEN }}
run: |
git config user.name "${{ github.actor }}"
git config user.email "${{ github.actor}}@users.noreply.github.com"
npm run release ${{ inputs.version }}
release:
needs: publish
if: |
always() &&
needs.publish.result == 'success'
runs-on: 'ubuntu-latest'
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: 'Create GitHub release'
run: |
gh release create v${{ inputs.version }} --verify-tag --target ${{ inputs.branch}} -t 'v${{ inputs.version }}' --generate-notes
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
GITHUB_TOKEN: ${{ secrets.GH_CLI_TOKEN }}
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,7 @@ dist/
coverage/

# TypeScript incremental compilation cache
*.tsbuildinfo
*.tsbuildinfo

## Sonar reporter
test-report.xml
Loading

0 comments on commit 8696564

Please sign in to comment.