Skip to content

Commit

Permalink
Merge branch 'main' into pr/mateenagy/179
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Jan 11, 2024
2 parents 08a102b + c29618f commit f662bdb
Show file tree
Hide file tree
Showing 20 changed files with 2,048 additions and 1,095 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/autofix.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: autofix.ci # needed to securely identify the workflow

on:
pull_request:
push:
branches: [ "main" ]

permissions:
contents: read

jobs:
autofix:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- run: corepack enable
- uses: actions/setup-node@v4
with:
node-version: 18
cache: "pnpm"
- run: pnpm install
- name: Fix lint issues
run: npm run lint:fix
- uses: autofix-ci/action@ea32e3a12414e6d3183163c3424a7d7a8631ad84
with:
commit-message: 'chore: apply automated lint fixes'
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ jobs:
ci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- run: corepack enable
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: 16
cache: "pnpm"
Expand Down
38 changes: 38 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,44 @@

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

## v1.4.2

[compare changes](https://github.com/unjs/mlly/compare/v1.4.1...v1.4.2)

### 🩹 Fixes

- **findExports:** Support generator ([#189](https://github.com/unjs/mlly/pull/189))

### 🏡 Chore

- Update lockfile ([ad68cb7](https://github.com/unjs/mlly/commit/ad68cb7))

### ❤️ Contributors

- Pooya Parsa ([@pi0](http://github.com/pi0))
- Anthony Fu <[email protected]>

## v1.4.1

[compare changes](https://github.com/unjs/mlly/compare/v1.4.0...v1.4.1)

### 🩹 Fixes

- **isValidNodeImport:** Detect invalid cjs modules ([#187](https://github.com/unjs/mlly/pull/187))

### 🏡 Chore

- Update dependencies ([1a25f45](https://github.com/unjs/mlly/commit/1a25f45))
- Add autofix ci ([b7adabf](https://github.com/unjs/mlly/commit/b7adabf))

### 🎨 Styles

- Format with prettier v3 ([914493c](https://github.com/unjs/mlly/commit/914493c))

### ❤️ Contributors

- Pooya Parsa ([@pi0](http://github.com/pi0))

## v1.4.0

[compare changes](https://github.com/unjs/mlly/compare/v1.3.0...v1.4.0)
Expand Down
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ import { resolveImports } from "mlly";

// import foo from 'file:///home/user/project/bar.mjs'
console.log(
await resolveImports(`import foo from './bar.mjs'`, { url: import.meta.url })
await resolveImports(`import foo from './bar.mjs'`, { url: import.meta.url }),
);
```
Expand Down Expand Up @@ -216,7 +216,7 @@ console.log(
findStaticImports(`
// Empty line
import foo, { bar /* foo */ } from 'baz'
`)
`),
);
```
Expand Down Expand Up @@ -276,7 +276,7 @@ import { findDynamicImports } from "mlly";
console.log(
findDynamicImports(`
const foo = await import('bar')
`)
`),
);
```
Expand All @@ -290,7 +290,7 @@ console.log(
export const foo = 'bar'
export { bar, baz }
export default something
`)
`),
);
```
Expand Down Expand Up @@ -331,7 +331,7 @@ console.log(
export const foo = 'bar'
export { bar, baz }
export default something
`)
`),
);
```
Expand Down Expand Up @@ -369,7 +369,7 @@ await evalModule(
import { reverse } from './utils.mjs'
console.log(reverse('!emosewa si sj'))
`,
{ url: import.meta.url }
{ url: import.meta.url },
);
```
Expand Down Expand Up @@ -453,7 +453,7 @@ console.log(
toDataURL(`
// This is an example
console.log('Hello world')
`)
`),
);
```
Expand Down Expand Up @@ -508,7 +508,7 @@ import { parseNodeModulePath } from "mlly";
// name: "lib"
// subpath: "./dist/index.mjs"
const { dir, name, subpath } = parseNodeModulePath(
"/src/a/node_modules/lib/dist/index.mjs"
"/src/a/node_modules/lib/dist/index.mjs",
);
```
Expand All @@ -521,7 +521,7 @@ import { lookupNodeModuleSubpath } from "mlly";

// subpath: "./utils"
const subpath = lookupNodeModuleSubpath(
"/src/a/node_modules/lib/dist/utils.mjs"
"/src/a/node_modules/lib/dist/utils.mjs",
);
```
Expand Down
32 changes: 16 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mlly",
"version": "1.4.0",
"version": "1.4.2",
"description": "Missing ECMAScript module utils for Node.js",
"repository": "unjs/mlly",
"license": "MIT",
Expand All @@ -26,23 +26,23 @@
"test": "pnpm lint && vitest run"
},
"dependencies": {
"acorn": "^8.9.0",
"pathe": "^1.1.1",
"acorn": "^8.11.3",
"pathe": "^1.1.2",
"pkg-types": "^1.0.3",
"ufo": "^1.1.2"
"ufo": "^1.3.2"
},
"devDependencies": {
"@types/node": "^20.3.3",
"@vitest/coverage-v8": "^0.32.4",
"changelogen": "^0.5.4",
"eslint": "^8.44.0",
"@types/node": "^20.11.0",
"@vitest/coverage-v8": "^1.1.3",
"changelogen": "^0.5.5",
"eslint": "^8.56.0",
"eslint-config-unjs": "^0.2.1",
"import-meta-resolve": "^3.0.0",
"jiti": "^1.19.1",
"prettier": "^2.8.8",
"typescript": "^5.1.6",
"unbuild": "^1.2.1",
"vitest": "^0.32.4"
"import-meta-resolve": "^3.1.1",
"jiti": "^1.21.0",
"prettier": "^3.1.1",
"typescript": "^5.3.3",
"unbuild": "^2.0.0",
"vitest": "^1.1.3"
},
"packageManager": "pnpm@8.6.6"
}
"packageManager": "pnpm@8.14.0"
}
Loading

0 comments on commit f662bdb

Please sign in to comment.