Skip to content
This repository was archived by the owner on Aug 24, 2022. It is now read-only.

Commit 0cf08ab

Browse files
author
Steph Taylor
authored
Merge pull request #127 from square/brien/deprecate-postinstall
Add postinstall script which logs deprecation warning for SqPaymentForm
2 parents 66cd57b + 84833ca commit 0cf08ab

File tree

3 files changed

+11
-0
lines changed

3 files changed

+11
-0
lines changed

package-lock.json

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"build": "rm -rf ./lib && tsc && npm run copyfiles",
88
"copyfiles": "cp src/*.css lib/",
99
"prepublish": "npm run lint && npm run test && npm run build",
10+
"postinstall": "node postInstall.js",
1011
"lint": "eslint src/**/*.tsx",
1112
"lint:fix": "eslint --fix src/**/*.tsx",
1213
"test": "jest",
@@ -28,6 +29,7 @@
2829
"@typescript-eslint/parser": "^3.5.0",
2930
"babel-core": "^6.26.3",
3031
"chai": "^4.2.0",
32+
"colors": "^1.4.0",
3133
"enzyme": "^3.9.0",
3234
"enzyme-adapter-react-16": "^1.13.1",
3335
"eslint": "^7.3.1",

postInstall.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
const colors = require('colors');
2+
3+
console.log(colors.red('On 2022-07-15, SqPaymentForm will be retired and functionality will no longer work. We encourage you to upgrade to the Web Payments SDK \n > https://developer.squareup.com/docs/web-payments/overview'));

0 commit comments

Comments
 (0)