Skip to content
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
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -187,17 +187,17 @@ jobs:
run: |
# Colon separator
if [ "${{ steps.read-edge.outputs['edge-cases.server'] }}" != "example.com" ]; then
echo "FAIL: colon separator edge-cases.server expected 'example.com'"
echo "FAIL: colon separator - edge-cases.server expected 'example.com'"
exit 1
fi
# Continuation line
if [ "${{ steps.read-edge.outputs['edge-cases.long.value'] }}" != "first part second part third part" ]; then
echo "FAIL: continuation edge-cases.long.value expected 'first part second part third part'"
echo "FAIL: continuation - edge-cases.long.value expected 'first part second part third part'"
exit 1
fi
# Value containing equals sign
if [ "${{ steps.read-edge.outputs['edge-cases.connection.string'] }}" != "host=localhost;port=5432" ]; then
echo "FAIL: equals in value edge-cases.connection.string expected 'host=localhost;port=5432'"
echo "FAIL: equals in value - edge-cases.connection.string expected 'host=localhost;port=5432'"
exit 1
fi
echo "PASS: edge-case syntax"
2 changes: 1 addition & 1 deletion __tests__/properties.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ describe('parsePropertiesContent', () => {
})

it('skips lines that have no valid separator (no = or :)', () => {
// Covers the `if (!match) continue` branch a non-comment, non-blank line
// Covers the `if (!match) continue` branch - a non-comment, non-blank line
// that doesn't contain a key=value or key:value pattern is silently ignored.
const result = parsePropertiesContent(
'validKey=validValue\njustakeynovalue\nanotherValid=yes'
Expand Down
6 changes: 3 additions & 3 deletions action.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#
# © 2026-present Action Commons (https://github.com/ActionCommons)
#
name: Read Properties Action
name: Read Properties by Action Commons
description: >
Reads one or more .properties files and exposes every key-value pair as a step
output in the form <filename>.<key>.
author: Action Commons (https://github.com/ActionCommons)
# https://feathericons.com pick an icon that fits your action.
# https://feathericons.com - pick an icon that fits your action.
branding:
icon: file-text
color: blue
Expand Down Expand Up @@ -49,4 +49,4 @@ inputs:

runs:
using: node24
main: dist/index.js
main: dist/index.cjs
137 changes: 79 additions & 58 deletions dist/index.js → dist/index.cjs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions dist/index.cjs.map

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion dist/index.js.map

This file was deleted.

16 changes: 8 additions & 8 deletions docs/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ npm install

```text
src/
index.ts Entrypoint imports and calls run()
main.ts Action logic reads inputs, calls properties helpers,
index.ts Entrypoint - imports and calls run()
main.ts Action logic - reads inputs, calls properties helpers,
sets outputs
properties.ts Pure parser parsePropertiesContent, parsePropertiesFile,
properties.ts Pure parser - parsePropertiesContent, parsePropertiesFile,
getFileStem, assignOutputNames, filterProperties
__tests__/
main.test.ts Integration-style tests for run() with mocked I/O
Expand All @@ -36,7 +36,7 @@ __fixtures__/
properties.ts Jest mock for src/properties.ts (stubs parsePropertiesFile)
config.properties Standard fixture used by parsePropertiesFile tests
edge-cases.properties Fixture targeting tricky parser paths
dist/ Compiled output committed to the repository (see Releasing)
dist/ Compiled output - committed to the repository (see Releasing)
action.yml Action metadata: inputs, outputs, branding, runtime
```

Expand Down Expand Up @@ -156,11 +156,11 @@ using [Rollup](https://rollupjs.org/):
npm run package
```

Two warnings from `@actions/core` are expected and harmless they originate
Two warnings from `@actions/core` are expected and harmless - they originate
inside the package itself and are not a sign of a problem in this codebase:

- `"this" has been rewritten to "undefined"` a CommonJS/ESM interop quirk.
- `Circular dependency` a known cycle inside `@actions/core`.
- `"this" has been rewritten to "undefined"` - a CommonJS/ESM interop quirk.
- `Circular dependency` - a known cycle inside `@actions/core`.

To suppress them in output, add an `onwarn` handler to `rollup.config.ts`:

Expand All @@ -173,7 +173,7 @@ onwarn(warning, warn) {
```

> [!IMPORTANT] `dist/index.js` must be committed to the repository. GitHub
> Actions fetches it directly at runtime it does not run `npm install` or
> Actions fetches it directly at runtime - it does not run `npm install` or
> `npm run build`.

## Releasing
Expand Down
Loading
Loading