Skip to content

Commit

Permalink
Merge pull request #26 from homer0/next
Browse files Browse the repository at this point in the history
Update dependencies and move to pnpm
  • Loading branch information
homer0 authored May 26, 2024
2 parents 8834bdb + 6da8764 commit 59eb4c0
Show file tree
Hide file tree
Showing 8 changed files with 6,762 additions and 18,305 deletions.
13 changes: 8 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,21 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: '20.8.1'
- uses: pnpm/action-setup@v2
with:
version: 8
- name: Install dependencies
env:
HUSKY: 0
run: npm ci
HUSKY_SKIP_INSTALL: 1
run: pnpm install --frozen-lockfile
- name: Install semantic-release
run: npm install semantic-release@^23.0.2 @semantic-release/changelog@^6.0.3 @semantic-release/git@^10.0.1
- run: npx semantic-release
run: pnpm add -g semantic-release@^23.0.7 @semantic-release/changelog@^6.0.3 @semantic-release/git@^10.0.1
- run: semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Generate documentation
run: npm run docs
run: pnpm run docs
- name: Deploy documentation
uses: JamesIves/[email protected]
with:
Expand Down
13 changes: 7 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,12 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
- run: npm ci
- run: npm run lint:all
- run: npm test
- uses: pnpm/action-setup@v2
with:
version: 8
- run: pnpm install --frozen-lockfile
- run: pnpm run lint:all
- run: pnpm test
- name: Coveralls
if: ${{ matrix.node == '18' }}
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
uses: coverallsapp/github-action@v2
2 changes: 1 addition & 1 deletion .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx commitlint --edit $1
pnpm exec commitlint --edit $1

1 change: 1 addition & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ tests
utils
npm-debug.log
yarn-error.log
pnpm-debug.log
14 changes: 5 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,21 +40,14 @@ If there's no `package.json`, it tries to find `index.mjs` or `index.js`.
module.exports = Rosario;
module.exports.Pilar = Pilar;

module.exports = {
Rosario,
Pilar,
};

// Becomes

export default Rosario;
export { Pilar }

const exported = { Rosario, Pilar };
export default exported;
export { Rosario, Pilar };
```

> ⚠️: Do not do `module.exports = { Pilar }`, as the latest version of the parser doesn't support it.
## 🚀 Usage

The package comes with a binary that you can execute from your `package.json`, or with `npm`/`yarn`:
Expand All @@ -69,6 +62,9 @@ npx cjs2esm
# Yarn
yarn cjs2esm

# PNPM
pnpm exec cjs2esm

```

### Configuration
Expand Down
Loading

0 comments on commit 59eb4c0

Please sign in to comment.