Skip to content

Commit

Permalink
Typescript migration
Browse files Browse the repository at this point in the history
  • Loading branch information
e-adrien committed Oct 31, 2024
1 parent 93d1348 commit d9f8660
Show file tree
Hide file tree
Showing 441 changed files with 6,223 additions and 160,224 deletions.
22 changes: 16 additions & 6 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
root = true

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

[*.yml]
indent_style = space
indent_size = 2

[*.{js,ts,cjs,mjs}]
indent_style = space
indent_size = 2
25 changes: 0 additions & 25 deletions .eslintrc.cjs

This file was deleted.

1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text=auto eol=lf
24 changes: 24 additions & 0 deletions .github/renovate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"extends": ["config:recommended", ":semanticCommits"],
"timezone": "Europe/Paris",
"schedule": ["before 4:00 am on the first day of the month"],
"rangeStrategy": "bump",
"packageRules": [
{
"matchDatasources": ["npm"],
"minimumReleaseAge": "3 days"
},
{
"matchDatasources": ["npm"],
"matchPackageNames": ["*"],
"matchUpdateTypes": ["minor", "patch"],
"groupName": "all non-major dependencies",
"groupSlug": "all-minor-patch",
"automerge": true,
"automergeType": "pr",
"automergeStrategy": "squash"
}
],
"ignoreDeps": [],
"ignorePaths": []
}
70 changes: 70 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"

on:
push:
branches: [main]
pull_request:
# The branches below must be a subset of the branches above
branches: [main]
schedule:
- cron: "20 18 * * 0"

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: ["javascript"]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Learn more about CodeQL language support at https://git.io/codeql-language-support

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

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
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.
# queries: ./path/to/local/query, your-org/your-repo/queries@main

# 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@v3

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
# make bootstrap
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
32 changes: 32 additions & 0 deletions .github/workflows/gh-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Publish Package to GitHub Packages

on:
release:
types: [created]

jobs:
publish:
name: Publish Package to GitHub Packages
runs-on: ubuntu-latest

permissions:
contents: read
packages: write

steps:
- uses: actions/checkout@v4

- name: Use Node.js 20
uses: actions/setup-node@v4
with:
node-version: "20"
registry-url: "https://npm.pkg.github.com"
scope: "@lesjoursfr"

- run: npm install

- run: npm run build

- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
33 changes: 13 additions & 20 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
@@ -1,34 +1,27 @@
name: Node.js package
name: Publish Package to npmjs

on:
release:
types: [created]

jobs:
publish-npm:
name: Publish to npm
publish:
name: Publish Package to npmjs
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write

steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: 20
registry-url: https://registry.npmjs.org/
cache: npm

- name: Installing dependencies
run: npm ci
- name: Use Node.js 20
uses: actions/setup-node@v4
with:
node-version: "20"
registry-url: "https://registry.npmjs.org"

- run: npm version ${TAG_NAME} --git-tag-version=false
env:
TAG_NAME: ${{ github.event.release.tag_name }}
- run: npm install

- name: Build
run: npm run build
- run: npm run build

- run: npm whoami; npm --ignore-scripts publish --provenance --access public
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
NODE_AUTH_TOKEN: ${{ secrets.NPM_LESJOURS_TOKEN }}
56 changes: 56 additions & 0 deletions .github/workflows/quality-control.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: QC Checks

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
checks:
name: QC Checks
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Use Node.js 20
uses: actions/setup-node@v4
with:
node-version: "20"

- name: Install
run: npm install

- name: ESLint checks
run: npm run check-lint

- name: Prettier checks
run: npm run check-format

- name: TSC checks
run: npm run check-tsc

tests:
name: Tests Node.js ${{ matrix.node-version }}
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [20.x, 22.x]

steps:
- uses: actions/checkout@v4

- uses: microsoft/playwright-github-action@v1

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}

- name: Install
run: npm install

- name: Run tests
run: npx mocha
50 changes: 0 additions & 50 deletions .github/workflows/test.yml

This file was deleted.

30 changes: 15 additions & 15 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
node_modules
coverage.html
.idea
.DS_Store
docs/agenda/*
!docs/agenda/1.0.3/
!docs/agenda/2.0.0/
!docs/agenda/2.2.0/
!docs/agenda/3.1.0/
!docs/agenda/4.x/
!docs/agenda/6.x/
dist
.nyc_output
coverage
*.tsbuildinfo
# Generated files
lib

# Yarn lockfile
yarn.lock

# Yarn & node.js dependencies
node_modules/
.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions
6 changes: 6 additions & 0 deletions .mocharc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"extension": ["ts"],
"spec": "tests/**/*.spec.ts",
"require": "ts-node/register",
"timeout": 25000
}
13 changes: 0 additions & 13 deletions .mocharc.jsonc

This file was deleted.

Loading

0 comments on commit d9f8660

Please sign in to comment.