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

Generate build with esm #16

Merged
merged 4 commits into from
Sep 11, 2024
Merged
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
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
Loading