Skip to content

Commit

Permalink
Commit lockfile (#83)
Browse files Browse the repository at this point in the history
* Commit lockfile

* Update pnpm-lock.yaml
  • Loading branch information
irshadahmad21 authored Jan 29, 2024
1 parent 6e1164e commit 0e19628
Show file tree
Hide file tree
Showing 8 changed files with 14,196 additions and 31 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/deploy-php-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ jobs:

- name: Setup Environment
uses: ./actions/setup
with:
lockfile: pnpm-hashed.lock

- name: Prepare
run: |
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/deploy-wp-project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ jobs:
- name: Setup Environment
uses: ./actions/setup
with:
lockfile: pnpm-hashed.lock
enable-wireit-cache: true

- name: Prepare bundle
Expand Down Expand Up @@ -75,7 +74,6 @@ jobs:
- name: Setup Environment
uses: ./actions/setup
with:
lockfile: pnpm-hashed.lock
enable-wireit-cache: true

- name: List projects
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/pr-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ jobs:
- name: Setup Environment
uses: ./actions/setup
with:
lockfile: pnpm-hashed.lock
php-version: ${{ matrix.php }}
enable-wireit-cache: true

Expand Down Expand Up @@ -84,7 +83,6 @@ jobs:
- name: Setup Environment
uses: ./actions/setup
with:
lockfile: pnpm-hashed.lock
enable-wireit-cache: true

- name: Lint
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ jobs:
- name: Setup Environment
uses: ./actions/setup
with:
lockfile: pnpm-hashed.lock
enable-wireit-cache: true

- name: Create Release Pull Request or Publish
Expand Down
4 changes: 0 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,6 @@ tsconfig.tsbuildinfo
.wireit/
.phpunit.result.cache

# We don't want to have lock file to be tracked to allow other plugins be managed in the monorepo
# We create a hashed version of the lock file (via .pnpmfile.cjs) to be able to check if it has changed
pnpm-lock.yaml

# Misc
build/
dist/
Expand Down
19 changes: 0 additions & 19 deletions .pnpmfile.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -42,27 +42,8 @@ function readPackage(pkg, context) {
return pkg;
}

function afterAllResolved(lockfile) {
// Since we are not tracking the lockfile, we need to generate a hash of the lockfile
// To use for cache busting
const hashedContent = require('crypto')
.createHash('sha1')
.update(JSON.stringify(lockfile))
.digest('hex');

console.log('hashedContent', hashedContent);

require('fs').writeFileSync(
require('path').join(__dirname, 'pnpm-hashed.lock'),
hashedContent,
);

return lockfile;
}

module.exports = {
hooks: {
readPackage,
afterAllResolved,
},
};
1 change: 0 additions & 1 deletion pnpm-hashed.lock

This file was deleted.

Loading

0 comments on commit 0e19628

Please sign in to comment.