Skip to content

Commit

Permalink
Dont add git-data.json to NPM releases
Browse files Browse the repository at this point in the history
  • Loading branch information
dapplion committed May 9, 2022
1 parent 307f685 commit 5fe2d38
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@
"files": [
"lib/**/*.d.ts",
"lib/**/*.js",
"lib/**/*.js.map",
".git-data.json"
"lib/**/*.js.map"
],
"bin": {
"lodestar": "lib/index.js"
Expand Down
4 changes: 2 additions & 2 deletions packages/cli/test/unit/util/gitData.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ describe("util / gitData", () => {
if (!gitData.commit) throw Error("No gitData.commit");
});

it("gitData path must be included in the package.json", () => {
it("gitData path must NOT be included in the package.json", () => {
const pkgJsonPath = findUp.sync("package.json", {cwd: __dirname});
if (!pkgJsonPath) {
throw Error("No package.json found");
Expand All @@ -21,6 +21,6 @@ describe("util / gitData", () => {
const pkgJson = JSON.parse(fs.readFileSync(pkgJsonPath, "utf8")) as {files: string[]};
const gitDataPathFromPkgJson = path.relative(path.dirname(pkgJsonPath), gitDataPath);

expect(pkgJson.files).to.include(gitDataPathFromPkgJson, "package.json .files does not include gitData path");
expect(pkgJson.files).to.not.include(gitDataPathFromPkgJson, "package.json .files includes gitData path");
});
});

0 comments on commit 5fe2d38

Please sign in to comment.