Skip to content

Commit

Permalink
meta: use overrides to make sure no uppy package is fetch from npm
Browse files Browse the repository at this point in the history
  • Loading branch information
aduh95 committed Apr 2, 2023
1 parent 46368c8 commit 2e79bd3
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions .github/workflows/bundlers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,18 @@ jobs:
run: |
node <<'EOF'
const pkg = require('./packages/uppy/package.json');
for(const key of Object.keys(pkg.dependencies)) {
if (key.startsWith('@uppy/')) {
pkg.dependencies[key] = `/tmp/packages/${key.replace('/', '-')}-${{ github.sha }}.tgz`;
pkg.overrides = {};
(async () => {
for await (const { name } of await require('node:fs/promises').opendir('./packages/@uppy/')) {
pkg.overrides["@uppy/" + name] = `/tmp/packages/@uppy-${name}-${{ github.sha }}.tgz`;
}
}
require('node:fs').writeFileSync('./packages/uppy/package.json', JSON.stringify(pkg));
for(const key of Object.keys(pkg.dependencies)) {
if (key in pkg.overrides) {
pkg.dependencies[key] = pkg.overrides[key];
}
}
require('node:fs').writeFileSync('./packages/uppy/package.json', JSON.stringify(pkg));
})();
EOF
- name: Eject public packages from repo
run: mkdir /tmp/artifacts && corepack yarn workspaces foreach --no-private pack --install-if-needed -o /tmp/artifacts/%s-${{ github.sha }}.tgz
Expand Down

0 comments on commit 2e79bd3

Please sign in to comment.