Skip to content

Commit

Permalink
Merge pull request #607 from appsignal/script-test-files
Browse files Browse the repository at this point in the history
Ignore script test files in published package
  • Loading branch information
tombruijn authored Feb 11, 2022
2 parents 0af54b7 + 178b49a commit 49e26a3
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 6 deletions.
6 changes: 6 additions & 0 deletions packages/nodejs/.changesets/do-not-ship-test-files.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
bump: "patch"
type: "remove"
---

Do not ship the extension install script test files in the published package. Reduces the package size a tiny bit.
1 change: 1 addition & 0 deletions packages/nodejs/.npmignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
*
!/dist/**/*
!/scripts/**/*
scripts/**/*.test.js
!/ext/appsignal_extension.cpp
!/cert/**/*
!binding.gyp
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const fs = require("fs")
const path = require("path")
const { reportPath } = require("./report")
const { reportPath } = require("../report")

function hasExtensionFailure() {
if (process.env._TEST_APPSIGNAL_EXTENSION_FAILURE !== "true") {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
const fs = require("fs")
const { reportPath } = require("./report")
const { downloadFromMirror } = require("./extension")
const { reportPath } = require("../report")
const { downloadFromMirror } = require("../extension")
const nock = require("nock")
const { Writable, EventEmitter } = require("stream")
const { AGENT_VERSION } = require("./support/constants")
const { AGENT_VERSION } = require("../support/constants")

describe("Extension install success", () => {
test("writes success result to diagnose installation report", () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ const originalProcess = process
const originalProcessEnv = process.env
const mockHelpers = { hasMusl: jest.fn() }

jest.doMock("./support/helpers", () => mockHelpers)
jest.doMock("../support/helpers", () => mockHelpers)

const { createBuildReport } = require("./report")
const { createBuildReport } = require("../report")

describe("muslOverride", () => {
beforeEach(() => {
Expand Down

0 comments on commit 49e26a3

Please sign in to comment.