Skip to content

Commit

Permalink
Merge pull request #16 from AurorNZ/esbuild_esm
Browse files Browse the repository at this point in the history
Generate build with esm
  • Loading branch information
alex-auror authored Sep 11, 2024
2 parents e597062 + d28a639 commit 54ebb4d
Show file tree
Hide file tree
Showing 18 changed files with 30,072 additions and 67 deletions.
4 changes: 3 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
* text=auto eol=lf
* text=auto eol=lf

dist/** -diff linguist-generated=true
14 changes: 12 additions & 2 deletions .github/workflows/pull-request-verification.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,21 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Need history for changelog generation
- uses: volta-cli/action@v4
- run: |
pnpm install
pnpm i
pnpm run all
# We need to make sure the checked-in `index.mjs` actually matches what we expect it to be.
- name: Compare the expected and actual dist/ directories
run: |
if [ "$(git diff --ignore-space-at-eol dist/ | wc -l)" -gt "0" ]; then
echo "Detected uncommitted changes after build. See status below:"
git diff
exit 1
fi
test-inline:
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion __tests__/csv-escape.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {describe, expect, test} from 'vitest'

import {csvEscape} from '../src/list-format/csv-escape'
import {csvEscape} from '../src/list-format/csv-escape.ts'

describe('csvEscape() backslash escapes every character except subset of definitely safe characters', () => {
test('simple filename should not be modified', () => {
Expand Down
4 changes: 2 additions & 2 deletions __tests__/filter.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {describe, expect, test} from 'vitest'

import {File, ChangeStatus} from '../src/file'
import {Filter} from '../src/filter'
import {File, ChangeStatus} from '../src/file.ts'
import {Filter} from '../src/filter.ts'

describe('yaml filter parsing tests', () => {
test('throws if yaml is not a dictionary', () => {
Expand Down
4 changes: 2 additions & 2 deletions __tests__/git.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {describe, expect, test} from 'vitest'

import {ChangeStatus} from '../src/file'
import * as git from '../src/git'
import {ChangeStatus} from '../src/file.ts'
import * as git from '../src/git.ts'

describe('parsing output of the git diff command', () => {
test('parseGitDiffOutput returns files with correct change status', () => {
Expand Down
2 changes: 1 addition & 1 deletion __tests__/shell-escape.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {describe, expect, test} from 'vitest'

import {backslashEscape, shellEscape} from '../src/list-format/shell-escape'
import {backslashEscape, shellEscape} from '../src/list-format/shell-escape.ts'

describe('escape() backslash escapes every character except subset of definitely safe characters', () => {
test('simple filename should not be modified', () => {
Expand Down
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ outputs:
description: JSON array with names of all filters matching any of changed files
runs:
using: 'node20'
main: 'dist/index.js'
main: 'dist/index.mjs'
branding:
color: blue
icon: filter
21 changes: 0 additions & 21 deletions dist/index.js

This file was deleted.

Loading

0 comments on commit 54ebb4d

Please sign in to comment.