@canonical/summon-component 0.43.0 → 0.46.0
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.
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { deleteFile, flatMap, pure, readFile, writeFile, } from "@canonical/task";
|
|
2
2
|
/**
|
|
3
3
|
* Whether every non-blank line is a generator-stamp comment (the header the
|
|
4
|
-
* runner prepends to generated files: `<comment>
|
|
4
|
+
* runner prepends to generated files: `<comment> Scaffolded by <name> v<ver>`,
|
|
5
|
+
* or `Generated by` in files stamped before the wording changed).
|
|
5
6
|
* Such a remainder carries no exports of its own, so the file counts as empty
|
|
6
7
|
* when deciding whether to delete it. Vacuously true for a blank remainder.
|
|
7
8
|
*/
|
|
@@ -9,7 +10,7 @@ const isEffectivelyEmpty = (content) => content
|
|
|
9
10
|
.split("\n")
|
|
10
11
|
.map((line) => line.trim())
|
|
11
12
|
.filter((line) => line !== "")
|
|
12
|
-
.every((line) => /^(?:\/\/|\/\*+|\*|#|<!--)\s*Generated by /.test(line));
|
|
13
|
+
.every((line) => /^(?:\/\/|\/\*+|\*|#|<!--)\s*(?:Scaffolded|Generated) by /.test(line));
|
|
13
14
|
/**
|
|
14
15
|
* Remove a specific line from a file (all occurrences, matched by trimmed
|
|
15
16
|
* content). Truly idempotent: when the line is not present the file is left
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"removeLineFromFile.js","sourceRoot":"","sources":["../../../../src/shared/file-operations/removeLineFromFile.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,OAAO,EACP,IAAI,EACJ,QAAQ,EAER,SAAS,GACV,MAAM,iBAAiB,CAAC;AAEzB
|
|
1
|
+
{"version":3,"file":"removeLineFromFile.js","sourceRoot":"","sources":["../../../../src/shared/file-operations/removeLineFromFile.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,OAAO,EACP,IAAI,EACJ,QAAQ,EAER,SAAS,GAC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ACvD,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -16,7 +16,7 @@ describe("<%= name %> component", () => {
|
|
|
16
16
|
it("renders", async () => {
|
|
17
17
|
const page = render(Component, { ...baseProps });
|
|
18
18
|
await expect.element(componentLocator(page)).toBeInTheDocument();
|
|
19
|
-
await expect.element(page
|
|
19
|
+
await expect.element(componentLocator(page)).toBeVisible();
|
|
20
20
|
});
|
|
21
21
|
|
|
22
22
|
describe("attributes", () => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"removeLineFromFile.d.ts","sourceRoot":"","sources":["../../../../src/shared/file-operations/removeLineFromFile.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,IAAI,EAEV,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"removeLineFromFile.d.ts","sourceRoot":"","sources":["../../../../src/shared/file-operations/removeLineFromFile.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,IAAI,EAEV,MAAM,iBAAiB,CAAC;AAkBzB;;;;;;GAMG;AACH,MAAM,CAAC,OAAO,UAAU,kBAAkB,CACxC,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,MAAM,GACX,IAAI,CAAC,IAAI,CAAC,CAiBZ"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@canonical/summon-component",
|
|
3
3
|
"description": "Component generators for Summon - React, Svelte and Lit component scaffolding",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.46.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/esm/index.js",
|
|
7
7
|
"module": "dist/esm/index.js",
|
|
@@ -45,21 +45,21 @@
|
|
|
45
45
|
"test:vitest:watch": "vitest"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
|
-
"@biomejs/biome": "2.
|
|
49
|
-
"@canonical/biome-config": "^0.
|
|
50
|
-
"@canonical/typescript-config": "^0.
|
|
51
|
-
"@canonical/webarchitect": "^0.
|
|
48
|
+
"@biomejs/biome": "2.6.6",
|
|
49
|
+
"@canonical/biome-config": "^0.46.0",
|
|
50
|
+
"@canonical/typescript-config": "^0.46.0",
|
|
51
|
+
"@canonical/webarchitect": "^0.46.0",
|
|
52
52
|
"@types/bun": "^1.3.10",
|
|
53
53
|
"@types/node": "^26.0.0",
|
|
54
54
|
"typescript": "^7.0.2",
|
|
55
|
-
"vitest": "^
|
|
55
|
+
"vitest": "^5.0.0"
|
|
56
56
|
},
|
|
57
57
|
"dependencies": {
|
|
58
|
-
"@canonical/utils": "^0.
|
|
58
|
+
"@canonical/utils": "^0.46.0"
|
|
59
59
|
},
|
|
60
60
|
"peerDependencies": {
|
|
61
|
-
"@canonical/summon-core": "^0.
|
|
62
|
-
"@canonical/task": "^0.
|
|
61
|
+
"@canonical/summon-core": "^0.46.0",
|
|
62
|
+
"@canonical/task": "^0.46.0"
|
|
63
63
|
},
|
|
64
|
-
"gitHead": "
|
|
64
|
+
"gitHead": "7a4c4cee18e814e78e71fe62e4679a3e07db4735"
|
|
65
65
|
}
|