Skip to content

Commit

Permalink
Various ESM-related updates (#185)
Browse files Browse the repository at this point in the history
  • Loading branch information
ncalteen authored Dec 16, 2024
2 parents d409309 + d5d283f commit 421236b
Show file tree
Hide file tree
Showing 28 changed files with 49,279 additions and 46,914 deletions.
58 changes: 0 additions & 58 deletions .eslintrc.yml

This file was deleted.

24 changes: 18 additions & 6 deletions .markdown-lint.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,24 @@
MD003: false
# See: https://github.com/DavidAnson/markdownlint

# Unordered list style
MD004:
style: dash

# Disable line length for tables
MD013:
tables: false
MD026: false

# Ordered list item prefix
MD029:
style: one
MD033: false
MD034: false
MD036: false
MD041: false

# Spaces after list markers
MD030:
ul_single: 1
ol_single: 1
ul_multi: 1
ol_multi: 1

# Code block style
MD046:
style: fenced
15 changes: 3 additions & 12 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,13 +1,4 @@
.*.swp
.DS_Store
.bundle/
.jekyll*
.sass-cache/
_site/
node_modules/
*.min.js
*.min.js.map
*.scss
dist/
coverage/
fixtures/
dist/
node_modules/
.DS_Store
2 changes: 2 additions & 0 deletions .prettierrc.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# See: https://prettier.io/docs/en/configuration

printWidth: 80
tabWidth: 2
useTabs: false
Expand Down
6 changes: 2 additions & 4 deletions .yaml-lint.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
###########################
## YAML Linter rules ##
###########################
# See: https://yamllint.readthedocs.io/en/stable/

rules:
document-end: disable
Expand All @@ -9,6 +7,6 @@ rules:
present: false
line-length:
level: warning
max: 120
max: 80
allow-non-breakable-words: true
allow-non-breakable-inline-mappings: true
8 changes: 7 additions & 1 deletion CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
* @ncalteen
############################################################################
# Repository CODEOWNERS #
# Order is important! The last matching pattern takes the most precedence. #
############################################################################

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

export const debug = jest.fn()
export const error = jest.fn()
export const info = jest.fn()
export const getInput = jest.fn()
export const setOutput = jest.fn()
export const setFailed = jest.fn()
export const warning = jest.fn()
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: 0 additions & 3 deletions __fixtures__/exec.ts

This file was deleted.

6 changes: 0 additions & 6 deletions __fixtures__/octokit-graphql.ts

This file was deleted.

19 changes: 0 additions & 19 deletions __fixtures__/octokit.ts

This file was deleted.

1 change: 1 addition & 0 deletions __tests__/create-regex.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { jest } from '@jest/globals'
import * as core from '../__fixtures__/core.js'

jest.unstable_mockModule('@actions/core', () => core)

const { createRegex } = await import('../src/utils/create-regex.js')

describe('createRegex', () => {
Expand Down
3 changes: 2 additions & 1 deletion __tests__/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import dedent from 'dedent-js'
import * as core from '../__fixtures__/core.js'

jest.unstable_mockModule('@actions/core', () => core)

const { run } = await import('../src/index.js')

const validPolicy = dedent`*:dev
Expand All @@ -13,7 +14,7 @@ qa:main`
const invalidPolicy = dedent`**/*/my-branch:dev`

describe('run', () => {
beforeEach(() => {
afterEach(() => {
jest.resetAllMocks()
})

Expand Down
13 changes: 9 additions & 4 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,13 @@ branding:

inputs:
policy:
description: |
A comma-separated list of branches in the order they can be merged. Each line should contain the name of the branch and the name of the branch it can be merged into separated by a colon. For example, `dev:main` would indicate that the `dev` branch can be merged into the `main` branch. Use `*` to indicate any branch. For example, `*:dev` would indicate that any branch can be merged into the `dev` branch.
description:
A comma-separated list of branches in the order they can be merged. Each
line should contain the name of the branch and the name of the branch it
can be merged into separated by a colon. For example, `dev:main` would
indicate that the `dev` branch can be merged into the `main` branch. Use
`*` to indicate any branch. For example, `*:dev` would indicate that any
branch can be merged into the `dev` branch.
required: true
default: |
.:dev
Expand All @@ -24,5 +29,5 @@ inputs:
default: main

runs:
using: 'node16'
main: 'dist/index.js'
using: node20
main: dist/index.js
Loading

0 comments on commit 421236b

Please sign in to comment.