Skip to content

Commit

Permalink
Update dependencies (#27)
Browse files Browse the repository at this point in the history
  • Loading branch information
fregante authored Jul 1, 2024
1 parent e34cf8a commit b5d2843
Show file tree
Hide file tree
Showing 10 changed files with 2,351 additions and 1,455 deletions.
71 changes: 39 additions & 32 deletions .github/workflows/esm-lint.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
env:
IMPORT_TEXT: import
NPM_MODULE_NAME: webext-events
NODE_VERSION: 18
IMPORT_STATEMENT: import "webext-events"

# FILE GENERATED WITH: npx ghat fregante/ghatemplates/esm-lint
# SOURCE: https://github.com/fregante/ghatemplates
Expand All @@ -24,74 +22,83 @@ jobs:
- run: npm run build --if-present
- run: npm pack --dry-run
- run: npm pack | tail -1 | xargs -n1 tar -xzf
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
path: package
Publint:
runs-on: ubuntu-latest
needs: Pack
steps:
- uses: actions/download-artifact@v4
- run: npx publint ./artifact
Webpack:
runs-on: ubuntu-latest
needs: Pack
steps:
- uses: actions/download-artifact@v3
- run: npm install ./artifact
- run: echo "${{ env.IMPORT_TEXT }} '${{ env.NPM_MODULE_NAME }}'" > index.js
- uses: actions/download-artifact@v4
- run: npm install --omit=dev ./artifact
- run: echo "$IMPORT_STATEMENT" > index.js
- run: webpack --entry ./index.js
- run: cat dist/main.js
Parcel:
runs-on: ubuntu-latest
needs: Pack
steps:
- uses: actions/download-artifact@v3
- run: npm install ./artifact
- run: echo "${{ env.IMPORT_TEXT }} '${{ env.NPM_MODULE_NAME }}'" > index.js
- uses: actions/download-artifact@v4
- run: npm install --omit=dev ./artifact
- run: echo "$IMPORT_STATEMENT" > index.js
- run: >
echo '{"@parcel/resolver-default": {"packageExports": true}}' >
package.json
- run: npx parcel@2 build index.js
- run: cat dist/index.js
Rollup:
runs-on: ubuntu-latest
needs: Pack
steps:
- uses: actions/download-artifact@v3
- run: npm install ./artifact rollup@2 @rollup/plugin-node-resolve
- run: echo "${{ env.IMPORT_TEXT }} '${{ env.NPM_MODULE_NAME }}'" > index.js
- uses: actions/download-artifact@v4
- run: npm install --omit=dev ./artifact rollup@4 @rollup/plugin-node-resolve
- run: echo "$IMPORT_STATEMENT" > index.js
- run: npx rollup -p node-resolve index.js
Vite:
runs-on: ubuntu-latest
needs: Pack
steps:
- uses: actions/download-artifact@v3
- run: npm install ./artifact
- run: >-
echo '<script type="module">${{ env.IMPORT_TEXT }} "${{
env.NPM_MODULE_NAME }}"</script>' > index.html
- uses: actions/download-artifact@v4
- run: npm install --omit=dev ./artifact
- run: echo '<script type="module">$IMPORT_STATEMENT</script>' > index.html
- run: npx vite build
- run: cat dist/assets/*
esbuild:
runs-on: ubuntu-latest
needs: Pack
steps:
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
- run: echo '{}' > package.json
- run: echo "${{ env.IMPORT_TEXT }} '${{ env.NPM_MODULE_NAME }}'" > index.js
- run: npm install ./artifact
- run: echo "$IMPORT_STATEMENT" > index.js
- run: npm install --omit=dev ./artifact
- run: npx esbuild --bundle index.js
TypeScript:
runs-on: ubuntu-latest
needs: Pack
steps:
- uses: actions/download-artifact@v3
- run: npm install ./artifact @sindresorhus/tsconfig
- run: echo "${{ env.IMPORT_TEXT }} '${{ env.NPM_MODULE_NAME }}'" > index.ts
- run: |
echo '{"extends":"@sindresorhus/tsconfig","files":["index.ts"]}' > tsconfig.json
- run: tsc
- run: cat index.js
- uses: actions/download-artifact@v4
- run: echo '{"type":"module"}' > package.json
- run: npm install --omit=dev ./artifact @sindresorhus/tsconfig
- run: echo "$IMPORT_STATEMENT" > index.ts
- run: >
echo '{"extends":"@sindresorhus/tsconfig","files":["index.ts"]}' >
tsconfig.json
- run: npx --package typescript -- tsc
- run: cat distribution/index.js
Node:
runs-on: ubuntu-latest
needs: Pack
steps:
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
- run: echo "${{ env.IMPORT_TEXT }} '${{ env.NPM_MODULE_NAME }}'" > index.mjs
- run: npm install ./artifact
node-version-file: artifact/package.json
- run: echo "$IMPORT_STATEMENT" > index.mjs
- run: npm install --omit=dev ./artifact
- run: node index.mjs
Loading

0 comments on commit b5d2843

Please sign in to comment.