@atomicsmash/init-testing 1.0.0-beta.4 → 1.0.0-beta.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/cli.js +6 -5
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -128,15 +128,16 @@ await Promise.all([
128
128
  return data.toString().split("\n");
129
129
  })
130
130
  .then((fileLines) => {
131
- const linesToAddToGitignore = [
131
+ const linesToCheck = [
132
132
  "/test-results/",
133
133
  "/playwright-report/",
134
134
  "/blob-report/",
135
135
  "/playwright/.cache/",
136
136
  ];
137
- for (const line of linesToAddToGitignore) {
138
- if (fileLines.includes(line)) {
139
- linesToAddToGitignore.splice(linesToAddToGitignore.indexOf(line), 1);
137
+ const linesToAddToGitignore = [];
138
+ for (const line of linesToCheck) {
139
+ if (!fileLines.includes(line)) {
140
+ linesToAddToGitignore.push(line);
140
141
  }
141
142
  }
142
143
  return linesToAddToGitignore;
@@ -145,7 +146,7 @@ await Promise.all([
145
146
  if (linesToAddToGitignore.length === 0) {
146
147
  return false;
147
148
  }
148
- await appendFile(`${process.cwd()}/.gitignore`, `\n# Testing tools\n${linesToAddToGitignore.join(`\n`)}`);
149
+ await appendFile(`${process.cwd()}/.gitignore`, `\n\n# Testing tools\n${linesToAddToGitignore.join(`\n`)}\n`);
149
150
  return true;
150
151
  })
151
152
  .then((wasFileUpdated) => {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@atomicsmash/init-testing",
3
3
  "type": "module",
4
- "version": "1.0.0-beta.4",
4
+ "version": "1.0.0-beta.5",
5
5
  "description": "Allow us to easily add automated testing setup to any npm setup.",
6
6
  "keywords": [
7
7
  "atomic",