lfify 1.1.1 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/cd.yml +4 -2
- package/.github/workflows/ci.yml +26 -26
- package/.lfifyrc-sample.json +2 -1
- package/.prettierignore +5 -0
- package/.prettierrc +9 -0
- package/.vscode/extensions.json +3 -0
- package/.vscode/launch.json +2 -4
- package/.vscode/settings.json +16 -0
- package/CHANGELOG.md +29 -0
- package/README.md +8 -6
- package/__fixtures__/already-lf/src/file.js +1 -0
- package/__fixtures__/cli-override/.lfifyrc.json +6 -0
- package/__fixtures__/cli-override/src/a.js +1 -0
- package/__fixtures__/cli-override/src/b.txt +1 -0
- package/__fixtures__/default-sensible/_git/config +2 -0
- package/__fixtures__/default-sensible/_node_modules/pkg/index.js +1 -0
- package/__fixtures__/default-sensible/src/app.js +1 -0
- package/__fixtures__/default-sensible/src/readme.txt +2 -0
- package/__fixtures__/with-config/.lfifyrc.json +6 -0
- package/__fixtures__/with-config/doc.txt +1 -0
- package/__fixtures__/with-config/lib/main.js +1 -0
- package/__fixtures__/with-config/skip/other.js +1 -0
- package/__mocks__/path.js +1 -1
- package/eslint.config.mjs +7 -5
- package/index.cjs +157 -61
- package/index.e2e.test.js +140 -0
- package/index.test.js +169 -103
- package/package.json +13 -4
- package/__mocks__/fs.js +0 -56
- package/__mocks__/micromatch.js +0 -39
package/.github/workflows/cd.yml
CHANGED
|
@@ -22,7 +22,7 @@ jobs:
|
|
|
22
22
|
- name: Setup Node.js
|
|
23
23
|
uses: actions/setup-node@v6
|
|
24
24
|
with:
|
|
25
|
-
node-version:
|
|
25
|
+
node-version: '24'
|
|
26
26
|
- name: Install dependencies
|
|
27
27
|
run: npm clean-install
|
|
28
28
|
- name: Verify the integrity of provenance attestations and registry signatures for installed dependencies
|
|
@@ -30,4 +30,6 @@ jobs:
|
|
|
30
30
|
- name: Release
|
|
31
31
|
env:
|
|
32
32
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
33
|
-
run:
|
|
33
|
+
run: |
|
|
34
|
+
unset NODE_AUTH_TOKEN
|
|
35
|
+
npx semantic-release
|
package/.github/workflows/ci.yml
CHANGED
|
@@ -2,41 +2,41 @@ name: Lint and Test
|
|
|
2
2
|
|
|
3
3
|
on:
|
|
4
4
|
pull_request:
|
|
5
|
-
branches: [
|
|
5
|
+
branches: [main]
|
|
6
6
|
push:
|
|
7
|
-
branches: [
|
|
7
|
+
branches: [main]
|
|
8
8
|
|
|
9
9
|
jobs:
|
|
10
10
|
lint:
|
|
11
11
|
runs-on: ubuntu-latest
|
|
12
12
|
|
|
13
13
|
steps:
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
14
|
+
- uses: actions/checkout@v3
|
|
15
|
+
|
|
16
|
+
- name: Setup Node.js
|
|
17
|
+
uses: actions/setup-node@v3
|
|
18
|
+
with:
|
|
19
|
+
node-version: '18'
|
|
20
|
+
|
|
21
|
+
- name: Install dependencies
|
|
22
|
+
run: npm ci
|
|
23
|
+
|
|
24
|
+
- name: Run linting
|
|
25
|
+
run: npm run lint || true
|
|
26
26
|
|
|
27
27
|
test:
|
|
28
28
|
runs-on: ubuntu-latest
|
|
29
29
|
|
|
30
30
|
steps:
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
31
|
+
- uses: actions/checkout@v3
|
|
32
|
+
|
|
33
|
+
- name: Setup Node.js
|
|
34
|
+
uses: actions/setup-node@v3
|
|
35
|
+
with:
|
|
36
|
+
node-version: '18'
|
|
37
|
+
|
|
38
|
+
- name: Install dependencies
|
|
39
|
+
run: npm ci
|
|
40
|
+
|
|
41
|
+
- name: Run tests
|
|
42
|
+
run: npm test
|
package/.lfifyrc-sample.json
CHANGED
package/.prettierignore
ADDED
package/.prettierrc
ADDED
package/.vscode/launch.json
CHANGED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
|
3
|
+
"editor.formatOnSave": true,
|
|
4
|
+
"editor.codeActionsOnSave": {
|
|
5
|
+
"source.fixAll.eslint": "explicit"
|
|
6
|
+
},
|
|
7
|
+
"[javascript]": {
|
|
8
|
+
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
|
9
|
+
},
|
|
10
|
+
"[json]": {
|
|
11
|
+
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
|
12
|
+
},
|
|
13
|
+
"[markdown]": {
|
|
14
|
+
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
|
15
|
+
}
|
|
16
|
+
}
|
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
## [1.2.1](https://github.com/GyeongHoKim/lfify/compare/v1.2.0...v1.2.1) (2026-03-18)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* unlink tmp files when rename failed ([173a38f](https://github.com/GyeongHoKim/lfify/commit/173a38f026d2f37dc521a4a5e089d071cfd425c9))
|
|
7
|
+
|
|
8
|
+
# [1.2.0](https://github.com/GyeongHoKim/lfify/compare/v1.1.0...v1.2.0) (2026-03-16)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* add provenance field to true ([fa1a7ff](https://github.com/GyeongHoKim/lfify/commit/fa1a7ffe9c101ff24ec72dd2a083a0facf414511))
|
|
14
|
+
* add trailing slash to publishConfig.registry for npm OIDC ([85175cd](https://github.com/GyeongHoKim/lfify/commit/85175cd160e4bce4d12af559a23e925baf6d7bd6))
|
|
15
|
+
* chunk process ([a77316f](https://github.com/GyeongHoKim/lfify/commit/a77316f792f26466f083c0f47092c79f135bd55a))
|
|
16
|
+
* declare tar resolutions ([e3d654d](https://github.com/GyeongHoKim/lfify/commit/e3d654df7dc67c4edade2043ee62e3e7d64e35a0)), closes [semantic-release/#2951](https://github.com/GyeongHoKim/lfify/issues/2951)
|
|
17
|
+
* dependencies ([87c9031](https://github.com/GyeongHoKim/lfify/commit/87c903143fde7c8c82d94a94d338e5467968ed4a))
|
|
18
|
+
* node 24 and unset NODE_AUTH_TOKEN for npm OIDC ([a74d183](https://github.com/GyeongHoKim/lfify/commit/a74d183248f25b187ef418127d80917c86dd6d86))
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
### Features
|
|
22
|
+
|
|
23
|
+
* include, exclude arguments ([9f4f2dc](https://github.com/GyeongHoKim/lfify/commit/9f4f2dc962f28c1ada58d6da556a35ef9dc4411b))
|
|
24
|
+
* log level ([f44f9c4](https://github.com/GyeongHoKim/lfify/commit/f44f9c4f3cd846088728dffe67f33e0526e61ffb))
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
### Reverts
|
|
28
|
+
|
|
29
|
+
* revert "ci: remove node_auth_token force reset" ([3d76f97](https://github.com/GyeongHoKim/lfify/commit/3d76f97ad85d9874b8998c2ac9940474eb95bb24))
|
package/README.md
CHANGED
|
@@ -42,12 +42,12 @@ npx lfify
|
|
|
42
42
|
|
|
43
43
|
## Options
|
|
44
44
|
|
|
45
|
-
| Option
|
|
46
|
-
|
|
|
47
|
-
| `--config <path>`
|
|
48
|
-
| `--entry <path>`
|
|
49
|
-
| `--include <pattern
|
|
50
|
-
| `--exclude <pattern
|
|
45
|
+
| Option | Description |
|
|
46
|
+
| --------------------- | ----------------------------------------------------------------------------- |
|
|
47
|
+
| `--config <path>` | Specify a custom path for the configuration file. Default is `.lfifyrc.json`. |
|
|
48
|
+
| `--entry <path>` | Specify the entry directory to process. Default is `./`. |
|
|
49
|
+
| `--include <pattern>` | Glob pattern(s) to include. Can be used multiple times. |
|
|
50
|
+
| `--exclude <pattern>` | Glob pattern(s) to exclude. Can be used multiple times. |
|
|
51
51
|
|
|
52
52
|
## Examples
|
|
53
53
|
|
|
@@ -68,12 +68,14 @@ npx lfify --config ./custom-config.json
|
|
|
68
68
|
## Default behavior
|
|
69
69
|
|
|
70
70
|
When no config file is found and no CLI options are provided, lfify uses sensible defaults:
|
|
71
|
+
|
|
71
72
|
- **include**: `**/*` (all files)
|
|
72
73
|
- **exclude**: `node_modules/**`, `.git/**`, `dist/**`, `build/**`, `coverage/**`
|
|
73
74
|
|
|
74
75
|
## Priority
|
|
75
76
|
|
|
76
77
|
CLI options take precedence over config file values:
|
|
78
|
+
|
|
77
79
|
1. CLI arguments (highest)
|
|
78
80
|
2. Config file
|
|
79
81
|
3. Default values (lowest)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const x = 1;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a = 1;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
b content
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
console.log("app");
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
doc content
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const x = 1;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
skipped;
|
package/__mocks__/path.js
CHANGED
package/eslint.config.mjs
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import globals from
|
|
2
|
-
import pluginJs from
|
|
3
|
-
|
|
1
|
+
import globals from 'globals';
|
|
2
|
+
import pluginJs from '@eslint/js';
|
|
3
|
+
import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended';
|
|
4
4
|
|
|
5
5
|
/** @type {import('eslint').Linter.Config[]} */
|
|
6
6
|
export default [
|
|
7
|
-
{
|
|
7
|
+
{ ignores: ['**/__fixtures__/**'] },
|
|
8
|
+
{ files: ['**/*.js'], languageOptions: { sourceType: 'commonjs' } },
|
|
8
9
|
{
|
|
9
10
|
languageOptions: {
|
|
10
11
|
globals: {
|
|
@@ -14,4 +15,5 @@ export default [
|
|
|
14
15
|
},
|
|
15
16
|
},
|
|
16
17
|
pluginJs.configs.recommended,
|
|
17
|
-
|
|
18
|
+
eslintPluginPrettierRecommended,
|
|
19
|
+
];
|