Skip to content

Commit

Permalink
Merge branch 'main' into fix/valid-node
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Aug 25, 2023
2 parents 41cf1ae + b7adabf commit 9dc8116
Show file tree
Hide file tree
Showing 14 changed files with 950 additions and 617 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@v3
- run: corepack enable
- uses: actions/setup-node@v3
with:
node-version: 18
cache: "pnpm"
- run: pnpm install
- name: Fix lint issues
run: npm run lint:fix
- uses: autofix-ci/action@8caa572fd27b0019a65e4c695447089c8d3138b9
with:
commit-message: 'chore: apply automated lint fixes'
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
18 changes: 9 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,20 +29,20 @@
"acorn": "^8.10.0",
"pathe": "^1.1.1",
"pkg-types": "^1.0.3",
"ufo": "^1.2.0"
"ufo": "^1.3.0"
},
"devDependencies": {
"@types/node": "^20.5.1",
"@vitest/coverage-v8": "^0.34.2",
"changelogen": "^0.5.4",
"@types/node": "^20.5.6",
"@vitest/coverage-v8": "^0.34.3",
"changelogen": "^0.5.5",
"eslint": "^8.47.0",
"eslint-config-unjs": "^0.2.1",
"import-meta-resolve": "^3.0.0",
"jiti": "^1.19.3",
"prettier": "^2.8.8",
"typescript": "^5.1.6",
"unbuild": "^1.2.1",
"vitest": "^0.34.2"
"prettier": "^3.0.2",
"typescript": "^5.2.2",
"unbuild": "^2.0.0",
"vitest": "^0.34.3"
},
"packageManager": "[email protected]"
}
}
Loading

0 comments on commit 9dc8116

Please sign in to comment.