@planningcenter/tapestry-migration-cli 4.6.2-rc.0 → 4.7.0-rc.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@planningcenter/tapestry-migration-cli",
3
- "version": "4.6.2-rc.0",
3
+ "version": "4.7.0-rc.0",
4
4
  "description": "CLI tool for Tapestry migrations",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -30,7 +30,7 @@
30
30
  },
31
31
  "devDependencies": {
32
32
  "@emotion/react": "^11.14.0",
33
- "@planningcenter/tapestry": "^4.6.2-rc.0",
33
+ "@planningcenter/tapestry": "^4.7.0-rc.0",
34
34
  "@planningcenter/tapestry-react": "^4.11.5",
35
35
  "@types/jscodeshift": "^17.3.0",
36
36
  "@types/node": "^20.0.0",
@@ -50,5 +50,5 @@
50
50
  "publishConfig": {
51
51
  "access": "public"
52
52
  },
53
- "gitHead": "a288f88da3ab53d1ae05fd256821f5b26b08bd6f"
53
+ "gitHead": "abf2c7312e83c14dd7b6e917b52906f5935b817f"
54
54
  }
@@ -316,7 +316,7 @@ function Test() {
316
316
  expect(result).toBe(input)
317
317
  })
318
318
 
319
- it("should not transform Input with type='file' (unsupported type bails)", () => {
319
+ it("should not flag accept on type='file'", () => {
320
320
  const input = `
321
321
  import { Input } from "@planningcenter/tapestry-react"
322
322
 
@@ -326,7 +326,20 @@ function Test() {
326
326
  `.trim()
327
327
 
328
328
  const result = applyTransform(input)
329
- expect(result).toBe(input)
329
+ expect(result).not.toContain("TODO: tapestry-migration")
330
+ })
331
+
332
+ it("should not flag capture or multiple on type='file'", () => {
333
+ const input = `
334
+ import { Input } from "@planningcenter/tapestry-react"
335
+
336
+ function Test() {
337
+ return <Input type="file" capture="environment" multiple label="File" />
338
+ }
339
+ `.trim()
340
+
341
+ const result = applyTransform(input)
342
+ expect(result).not.toContain("TODO: tapestry-migration")
330
343
  })
331
344
 
332
345
  it("should not flag pattern on type='text'", () => {
@@ -455,7 +468,6 @@ function Test() {
455
468
  "datetime-local",
456
469
  "week",
457
470
  "month",
458
- "file",
459
471
  "color",
460
472
  "checkbox",
461
473
  "radio",
@@ -483,6 +495,7 @@ function Test() {
483
495
  it("should not flag accepted type values", () => {
484
496
  const types = [
485
497
  "email",
498
+ "file",
486
499
  "number",
487
500
  "password",
488
501
  "search",
@@ -81,6 +81,7 @@ export const INPUT_SPECIFIC_PROPS = [
81
81
 
82
82
  export const ACCEPTED_INPUT_TYPES = [
83
83
  "email",
84
+ "file",
84
85
  "number",
85
86
  "password",
86
87
  "search",
@@ -93,6 +94,7 @@ export const ACCEPTED_INPUT_TYPES = [
93
94
  // Only covers the types accepted by the Tapestry Input component.
94
95
  export const TYPE_SPECIFIC_PROPS: Record<string, string[]> = {
95
96
  email: ["dirname", "list", "multiple", "pattern"],
97
+ file: ["accept", "capture", "multiple"],
96
98
  number: ["inputMode", "list", "step"],
97
99
  password: ["pattern"],
98
100
  search: ["dirname", "inputMode", "list", "pattern"],