Skip to content

Commit

Permalink
update changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
runspired committed Nov 4, 2022
1 parent fe6d69d commit 1f84b58
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 1 deletion.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Ember Data Changelog

## 4.8.2 (2022-11-04)

#### :bug: Bug Fix
* fix: (Actually fix) publish should use pnpm pack to remove `workspace:` prefix

## 4.8.1 (2022-11-04)

#### :bug: Bug Fix
* fix: publish should use pnpm pack to remove `workspace:` prefix

## 4.8.0 (2022-11-04)

Expand Down
22 changes: 21 additions & 1 deletion scripts/publish.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,21 @@ function cleanProject() {
execWithLog(`cd ${projectRoot} && pnpm install`);
}

// function scrubWorkspacesForHash(hash) {
// Object.keys(hash).forEach(function (key) {
// let val = hash[key];
// if (val.startsWith('workspace:')) {
// val = val.replace('workspace:', '');
// }
// });
// }
// function scrubWorkspaces(pkg, path) {
// scrubWorkspacesForHash(pkg.dependencies);
// scrubWorkspacesForHash(pkg.peerDependencies);
// scrubWorkspacesForHash(pkg.devDependencies);
// fs.writeFileSync(path, JSON.stringify(pkg, null, 2), { encoding: 'utf8' });
// }

/**
*
* @param {*} command The command to execute
Expand Down Expand Up @@ -273,6 +288,11 @@ function packAllPackages() {
const pkgPath = path.join(pkgDir, 'package.json');
const pkgInfo = require(pkgPath);
if (pkgInfo.private !== true) {
// pnpm pack / npm pack do not scrub `workspace:` prefixes when packing
// so we do this manually
// https://github.com/pnpm/pnpm/issues/5591
//scrubWorkspaces(pkgInfo);

// will pack into the project root directory
// due to an issue where npm does not run prepublishOnly for pack, we run it here
// however this is also a timing bug, as typically it would be run *after* prepublish
Expand All @@ -285,7 +305,7 @@ function packAllPackages() {
execWithLog(`cd ${pkgDir} && pnpm run prepack`);
}
}
execWithLog(`cd ${pkgDir} && npm pack --pack-destination=${projectRoot}`);
execWithLog(`cd ${pkgDir} && pnpm pack --pack-destination=${projectRoot}`);
}
});
}
Expand Down

0 comments on commit 1f84b58

Please sign in to comment.