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

Convert to ESM #114

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
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
1 change: 1 addition & 0 deletions .github/linters/.checkov.yaml → .checkov.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
quiet: true
skip-check:
- CKV_GHA_7
# Ensure that HEALTHCHECK instructions have been added to container images
- CKV_DOCKER_2
# Ensure that a user for the container has been created
Expand Down
4 changes: 0 additions & 4 deletions .eslintignore

This file was deleted.

5 changes: 5 additions & 0 deletions .github/codeql/codeql-config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
name: JavaScript CodeQL Configuration

paths-ignore:
- node_modules
- dist
80 changes: 0 additions & 80 deletions .github/linters/.eslintrc.yml

This file was deleted.

9 changes: 0 additions & 9 deletions .github/linters/tsconfig.json

This file was deleted.

4 changes: 4 additions & 0 deletions .github/workflows/check-dist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,21 +26,25 @@ jobs:
runs-on: ubuntu-latest

steps:
# Checkout the repository.
- name: Checkout
id: checkout
uses: actions/checkout@v4

# Setup Node.js using the version specified in `.node-version`.
- name: Setup Node.js
id: setup-node
uses: actions/setup-node@v4
with:
node-version-file: .node-version
cache: npm

# Install dependencies using `npm ci`.
- name: Install Dependencies
id: install
run: npm ci

# Build the `dist/` directory.
- name: Build dist/ Directory
id: build
run: npm run bundle
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ name: Continuous Integration

on:
pull_request:
branches:
- main
push:
branches:
- main
Expand Down
21 changes: 19 additions & 2 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ on:

permissions:
actions: read
checks: write
contents: read
security-events: write

Expand All @@ -32,17 +31,35 @@ jobs:
id: checkout
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
id: initialize
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
source-root: src
config-file: ./.github/codeql/codeql-config.yml
# 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
id: 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
id: analyze
uses: github/codeql-action/analyze@v3
16 changes: 15 additions & 1 deletion .github/workflows/linter.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
# This workflow will lint the entire codebase using the
# `super-linter/super-linter` action.
#
# For more information, see the super-linter repository:
# https://github.com/super-linter/super-linter
name: Lint Codebase

on:
pull_request:
branches:
- main
push:
branches:
- main
Expand All @@ -17,32 +24,39 @@ jobs:
runs-on: ubuntu-latest

steps:
# Checkout the repository.
- name: Checkout
id: checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

# Setup Node.js using the version specified in `.node-version`.
- name: Setup Node.js
id: setup-node
uses: actions/setup-node@v4
with:
node-version-file: .node-version
cache: npm

# Install dependencies using `npm ci`.
- name: Install Dependencies
id: install
run: npm ci

# Lint the codebase using the `super-linter/super-linter` action.
- name: Lint Codebase
id: super-linter
uses: super-linter/super-linter/slim@v7
env:
DEFAULT_BRANCH: main
FILTER_REGEX_EXCLUDE: dist/**/*
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TYPESCRIPT_DEFAULT_STYLE: prettier
LINTER_RULES_PATH: ${{ github.workspace }}
VALIDATE_ALL_CODEBASE: true
VALIDATE_JAVASCRIPT_ES: false
VALIDATE_JAVASCRIPT_STANDARD: false
VALIDATE_JSCPD: false
VALIDATE_JSON: false
VALIDATE_TYPESCRIPT_ES: false
VALIDATE_TYPESCRIPT_STANDARD: false
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -99,5 +99,4 @@ __tests__/runner/*

# IDE files
.idea
.vscode
*.code-workspace
6 changes: 6 additions & 0 deletions .github/linters/.markdown-lint.yml → .markdown-lint.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
# See: https://github.com/DavidAnson/markdownlint

# Unordered list style
MD004:
style: dash

# Disable line length for tables
MD013:
tables: false

# Ordered list item prefix
MD029:
style: one
Expand Down
2 changes: 1 addition & 1 deletion .node-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
21.6.2
20.9.0
3 changes: 2 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.DS_Store
dist/
node_modules/
coverage/
coverage/
16 changes: 0 additions & 16 deletions .prettierrc.json

This file was deleted.

16 changes: 16 additions & 0 deletions .prettierrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# See: https://prettier.io/docs/en/configuration

printWidth: 80
tabWidth: 2
useTabs: false
semi: false
singleQuote: true
quoteProps: as-needed
jsxSingleQuote: false
trailingComma: none
bracketSpacing: true
bracketSameLine: true
arrowParens: always
proseWrap: always
htmlWhitespaceSensitivity: css
endOfLine: lf
2 changes: 2 additions & 0 deletions .github/linters/.yaml-lint.yml → .yaml-lint.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# See: https://yamllint.readthedocs.io/en/stable/

rules:
document-end: disable
document-start:
Expand Down
6 changes: 5 additions & 1 deletion CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Repository CODEOWNERS
############################################################################
# Repository CODEOWNERS #
# Order is important! The last matching pattern takes the most precedence. #
############################################################################

# Default owners, unless a later match takes precedence.
* @actions/actions-oss-maintainers
10 changes: 10 additions & 0 deletions __fixtures__/core.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import type * as core from '@actions/core'
import { jest } from '@jest/globals'

export const debug = jest.fn<typeof core.debug>()
export const error = jest.fn<typeof core.error>()
export const info = jest.fn<typeof core.info>()
export const getInput = jest.fn<typeof core.getInput>()
export const setOutput = jest.fn<typeof core.setOutput>()
export const setFailed = jest.fn<typeof core.setFailed>()
export const warning = jest.fn<typeof core.warning>()
3 changes: 3 additions & 0 deletions __fixtures__/wait.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { jest } from '@jest/globals'

export const wait = jest.fn<typeof import('../src/wait.js').wait>()
17 changes: 0 additions & 17 deletions __tests__/index.test.ts

This file was deleted.

Loading
Loading