@onflow/sdk
Advanced tools
Comparing version 1.1.0-alpha.2 to 1.1.0-alpha.3
# @onflow/sdk | ||
## 1.1.0-alpha.3 | ||
### Patch Changes | ||
- [#1245](https://github.com/onflow/fcl-js/pull/1245) [`d09ba0f0`](https://github.com/onflow/fcl-js/commit/d09ba0f00f53f93feb351a3da5e821eada6287f0) Thanks [@jribbink](https://github.com/jribbink)! - Switch deprecation warnings to standardized warnings introduced by @onflow/util-logger (log.deprecate) | ||
- Updated dependencies [[`d09ba0f0`](https://github.com/onflow/fcl-js/commit/d09ba0f00f53f93feb351a3da5e821eada6287f0), [`d09ba0f0`](https://github.com/onflow/fcl-js/commit/d09ba0f00f53f93feb351a3da5e821eada6287f0), [`4ec2bdc9`](https://github.com/onflow/fcl-js/commit/4ec2bdc9805ac081bdc8003b6e1ea52e02d3909d)]: | ||
- @onflow/util-logger@1.1.0-alpha.2 | ||
- @onflow/util-template@1.0.2-alpha.0 | ||
- @onflow/util-actor@1.1.0-alpha.0 | ||
- @onflow/transport-http@1.3.0-alpha.3 | ||
- @onflow/config@1.0.2-alpha.0 | ||
## 1.1.0-alpha.2 | ||
@@ -4,0 +17,0 @@ |
import * as logger from '@onflow/util-logger'; | ||
import { log } from '@onflow/util-logger'; | ||
import { invariant as invariant$1 } from '@onflow/util-invariant'; | ||
@@ -12,39 +13,2 @@ import { config } from '@onflow/config'; | ||
const buildWarningMessage = ({ | ||
name, | ||
transitionsPath | ||
}) => { | ||
console.warn(` | ||
%cFCL/SDK Deprecation Notice | ||
============================ | ||
The ${name} builder has been deprecated and will be removed in future versions of the Flow JS-SDK/FCL. | ||
You can learn more (including a guide on common transition paths) here: ${transitionsPath} | ||
============================ | ||
`, "font-weight:bold;font-family:monospace;"); | ||
}; | ||
const buildErrorMessage = ({ | ||
name, | ||
transitionsPath | ||
}) => { | ||
console.error(` | ||
%cFCL/SDK Deprecation Notice | ||
============================ | ||
The ${name} builder has been removed from the Flow JS-SDK/FCL. | ||
You can learn more (including a guide on common transition paths) here: ${transitionsPath} | ||
============================ | ||
`, "font-weight:bold;font-family:monospace;"); | ||
}; | ||
const warn = deprecated => buildWarningMessage(deprecated); | ||
const error = deprecated => { | ||
buildErrorMessage(deprecated); | ||
}; | ||
const deprecate = { | ||
warn, | ||
error | ||
}; | ||
function _extends() { | ||
@@ -534,11 +498,7 @@ _extends = Object.assign || function (target) { | ||
const latestBlockDeprecationNotice = () => { | ||
console.error(` | ||
%c@onflow/decode Deprecation Notice | ||
======================== | ||
Operating upon data of the latestBlock field of the response object is deprecated and will no longer be recognized in future releases of @onflow/decode. | ||
Find out more here: https://github.com/onflow/flow-js-sdk/blob/master/packages/decode/WARNINGS.md#0001-Deprecating-latestBlock-field | ||
======================= | ||
`.replace(/\n\s+/g, "\n").trim(), "font-weight:bold;font-family:monospace;"); | ||
log.deprecate({ | ||
pkg: "@onflow/decode", | ||
subject: "Operating upon data of the latestBlock field of the response object", | ||
transition: "https://github.com/onflow/flow-js-sdk/blob/master/packages/decode/WARNINGS.md#0001-Deprecating-latestBlock-field" | ||
}); | ||
}; | ||
@@ -1167,9 +1127,7 @@ | ||
if (!Array.isArray(ix.payer)) { | ||
console.warn(` | ||
%cFCL Warning | ||
============================ | ||
"ix.payer" must be an array. Support for ix.payer as a singular is deprecated, | ||
see changelog for more info. | ||
============================ | ||
`, "font-weight:bold;font-family:monospace;"); | ||
log.deprecate({ | ||
pkg: "FCL", | ||
subject: '"ix.payer" must be an array. Support for ix.payer as a singular', | ||
message: "See changelog for more info." | ||
}); | ||
} | ||
@@ -1298,7 +1256,6 @@ | ||
if (!ix.message.computeLimit) { | ||
logger.log({ | ||
title: "FCL/SDK Deprecation Notice", | ||
message: `The built-in default compute limit (DEFAULT_COMPUTE_LIMIT=10) has been deprecated and will be removed in a future version of the Flow JS-SDK/FCL. | ||
You can learn more (including a guide on common transition paths) here: https://github.com/onflow/flow-js-sdk/blob/master/packages/sdk/TRANSITIONS.md#0009-deprecate-default-compute-limit`, | ||
level: logger.LEVELS.warn | ||
logger.log.deprecate({ | ||
pkg: "FCL/SDK", | ||
subject: "The built-in default compute limit (DEFAULT_COMPUTE_LIMIT=10)", | ||
transition: "https://github.com/onflow/flow-js-sdk/blob/master/packages/sdk/TRANSITIONS.md#0009-deprecate-default-compute-limit" | ||
}); | ||
@@ -1544,7 +1501,6 @@ ix.message.computeLimit = DEFAULT_COMPUTE_LIMIT; | ||
if (typeof start !== "undefined" || typeof end !== "undefined") { | ||
logger.log({ | ||
title: "FCL/SDK Deprecation Notice", | ||
message: `Passing a start and end into getEnvents has been deprecated and will not be supported in future versions of the Flow JS-SDK/FCL. | ||
You can learn more (including a guide on common transition paths) here: https://github.com/onflow/flow-js-sdk/blob/master/packages/sdk/TRANSITIONS.md#0005-deprecate-start-end-get-events-builder`, | ||
level: logger.LEVELS.warn | ||
logger.log.deprecate({ | ||
pkg: "FCL/SDK", | ||
subject: "Passing a start and end into getEvents", | ||
transition: "https://github.com/onflow/flow-js-sdk/blob/master/packages/sdk/TRANSITIONS.md#0005-deprecate-start-end-get-events-builder" | ||
}); | ||
@@ -1806,11 +1762,15 @@ } | ||
const VERSION = "1.1.0-alpha.2" ; | ||
const VERSION = "1.1.0-alpha.3" ; | ||
const params = params => deprecate.error({ | ||
name: "params", | ||
transitionsPath: "https://github.com/onflow/flow-js-sdk/blob/master/packages/sdk/TRANSITIONS.md#0001-deprecate-params" | ||
const params = params => logger.log.deprecate({ | ||
pkg: "FCL/SDK", | ||
message: `The params builder has been removed from the Flow JS-SDK/FCL.`, | ||
transition: "https://github.com/onflow/flow-js-sdk/blob/master/packages/sdk/TRANSITIONS.md#0001-deprecate-params", | ||
level: logger.LEVELS.error | ||
}); | ||
const param = params => deprecate.warn({ | ||
name: "param", | ||
transitionsPath: "https://github.com/onflow/flow-js-sdk/blob/master/packages/sdk/TRANSITIONS.md#0001-deprecate-params" | ||
const param = params => logger.log.deprecate({ | ||
pkg: "FCL/SDK", | ||
message: `The param builder has been removed from the Flow JS-SDK/FCL.`, | ||
transition: "https://github.com/onflow/flow-js-sdk/blob/master/packages/sdk/TRANSITIONS.md#0001-deprecate-params", | ||
level: logger.LEVELS.error | ||
}); | ||
@@ -1817,0 +1777,0 @@ |
{ | ||
"name": "@onflow/sdk", | ||
"version": "1.1.0-alpha.2", | ||
"version": "1.1.0-alpha.3", | ||
"description": "Flow SDK", | ||
@@ -42,10 +42,10 @@ "license": "Apache-2.0", | ||
"dependencies": { | ||
"@onflow/config": "^1.0.1", | ||
"@onflow/config": "^1.0.2-alpha.0", | ||
"@onflow/rlp": "^1.0.1", | ||
"@onflow/transport-http": "^1.3.0-alpha.2", | ||
"@onflow/util-actor": "^1.0.1", | ||
"@onflow/transport-http": "^1.3.0-alpha.3", | ||
"@onflow/util-actor": "^1.1.0-alpha.0", | ||
"@onflow/util-address": "^1.0.1", | ||
"@onflow/util-invariant": "^1.0.1", | ||
"@onflow/util-logger": "^1.0.2-alpha.1", | ||
"@onflow/util-template": "^1.0.1", | ||
"@onflow/util-logger": "^1.1.0-alpha.2", | ||
"@onflow/util-template": "^1.0.2-alpha.0", | ||
"deepmerge": "^4.2.2", | ||
@@ -52,0 +52,0 @@ "sha3": "^2.1.4" |
@@ -6,7 +6,7 @@ import {pipe, Ok, makeGetEvents} from "../interaction/interaction.js" | ||
if (typeof start !== "undefined" || typeof end !== "undefined") { | ||
logger.log({ | ||
title: "FCL/SDK Deprecation Notice", | ||
message: `Passing a start and end into getEnvents has been deprecated and will not be supported in future versions of the Flow JS-SDK/FCL. | ||
You can learn more (including a guide on common transition paths) here: https://github.com/onflow/flow-js-sdk/blob/master/packages/sdk/TRANSITIONS.md#0005-deprecate-start-end-get-events-builder`, | ||
level: logger.LEVELS.warn, | ||
logger.log.deprecate({ | ||
pkg: "FCL/SDK", | ||
subject: "Passing a start and end into getEvents", | ||
transition: | ||
"https://github.com/onflow/flow-js-sdk/blob/master/packages/sdk/TRANSITIONS.md#0005-deprecate-start-end-get-events-builder", | ||
}) | ||
@@ -13,0 +13,0 @@ } |
@@ -0,17 +1,12 @@ | ||
import {log} from "@onflow/util-logger" | ||
import {pipe, Ok, makeGetLatestBlock} from "../interaction/interaction.js" | ||
export function getLatestBlock(isSealed = false) { | ||
console.warn( | ||
` | ||
%cFCL/SDK Deprecation Notice | ||
============================ | ||
log.deprecate({ | ||
pkg: "FCL/SDK", | ||
subject: "The getLatestBlock builder", | ||
transition: | ||
"https://github.com/onflow/flow-js-sdk/blob/master/packages/sdk/TRANSITIONS.md#0006-deprecate-get-latest-block-builder", | ||
}) | ||
The getLatestBlock builder has been deprecated and will be removed in future versions of the Flow JS-SDK/FCL. | ||
You can learn more (including a guide on common transition paths) here: https://github.com/onflow/flow-js-sdk/blob/master/packages/sdk/TRANSITIONS.md#0006-deprecate-get-latest-block-builder | ||
============================ | ||
`, | ||
"font-weight:bold;font-family:monospace;" | ||
) | ||
return pipe([ | ||
@@ -18,0 +13,0 @@ makeGetLatestBlock, |
@@ -0,16 +1,11 @@ | ||
import {log, LEVELS} from "@onflow/util-logger" | ||
const latestBlockDeprecationNotice = () => { | ||
console.error( | ||
` | ||
%c@onflow/decode Deprecation Notice | ||
======================== | ||
Operating upon data of the latestBlock field of the response object is deprecated and will no longer be recognized in future releases of @onflow/decode. | ||
Find out more here: https://github.com/onflow/flow-js-sdk/blob/master/packages/decode/WARNINGS.md#0001-Deprecating-latestBlock-field | ||
======================= | ||
` | ||
.replace(/\n\s+/g, "\n") | ||
.trim(), | ||
"font-weight:bold;font-family:monospace;" | ||
) | ||
log.deprecate({ | ||
pkg: "@onflow/decode", | ||
subject: | ||
"Operating upon data of the latestBlock field of the response object", | ||
transition: | ||
"https://github.com/onflow/flow-js-sdk/blob/master/packages/decode/WARNINGS.md#0001-Deprecating-latestBlock-field", | ||
}) | ||
} | ||
@@ -17,0 +12,0 @@ |
import {invariant} from "@onflow/util-invariant" | ||
import {log} from "@onflow/util-logger" | ||
import {isTransaction} from "../interaction/interaction.js" | ||
@@ -115,12 +116,8 @@ import {createSignableVoucher} from "./voucher.js" | ||
if (!Array.isArray(ix.payer)) { | ||
console.warn( | ||
` | ||
%cFCL Warning | ||
============================ | ||
"ix.payer" must be an array. Support for ix.payer as a singular is deprecated, | ||
see changelog for more info. | ||
============================ | ||
`, | ||
"font-weight:bold;font-family:monospace;" | ||
) | ||
log.deprecate({ | ||
pkg: "FCL", | ||
subject: | ||
'"ix.payer" must be an array. Support for ix.payer as a singular', | ||
message: "See changelog for more info.", | ||
}) | ||
} | ||
@@ -127,0 +124,0 @@ try { |
@@ -13,7 +13,8 @@ import {isTransaction} from "../interaction/interaction.js" | ||
if (!ix.message.computeLimit) { | ||
logger.log({ | ||
title: "FCL/SDK Deprecation Notice", | ||
message: `The built-in default compute limit (DEFAULT_COMPUTE_LIMIT=10) has been deprecated and will be removed in a future version of the Flow JS-SDK/FCL. | ||
You can learn more (including a guide on common transition paths) here: https://github.com/onflow/flow-js-sdk/blob/master/packages/sdk/TRANSITIONS.md#0009-deprecate-default-compute-limit`, | ||
level: logger.LEVELS.warn, | ||
logger.log.deprecate({ | ||
pkg: "FCL/SDK", | ||
subject: | ||
"The built-in default compute limit (DEFAULT_COMPUTE_LIMIT=10)", | ||
transition: | ||
"https://github.com/onflow/flow-js-sdk/blob/master/packages/sdk/TRANSITIONS.md#0009-deprecate-default-compute-limit", | ||
}) | ||
@@ -20,0 +21,0 @@ ix.message.computeLimit = DEFAULT_COMPUTE_LIMIT |
@@ -1,2 +0,2 @@ | ||
import {deprecate} from "./utils" | ||
import * as logger from "@onflow/util-logger" | ||
// Base | ||
@@ -84,12 +84,16 @@ export {build} from "./build/build.js" | ||
export const params = params => | ||
deprecate.error({ | ||
name: "params", | ||
transitionsPath: | ||
logger.log.deprecate({ | ||
pkg: "FCL/SDK", | ||
message: `The params builder has been removed from the Flow JS-SDK/FCL.`, | ||
transition: | ||
"https://github.com/onflow/flow-js-sdk/blob/master/packages/sdk/TRANSITIONS.md#0001-deprecate-params", | ||
level: logger.LEVELS.error, | ||
}) | ||
export const param = params => | ||
deprecate.warn({ | ||
name: "param", | ||
transitionsPath: | ||
logger.log.deprecate({ | ||
pkg: "FCL/SDK", | ||
message: `The param builder has been removed from the Flow JS-SDK/FCL.`, | ||
transition: | ||
"https://github.com/onflow/flow-js-sdk/blob/master/packages/sdk/TRANSITIONS.md#0001-deprecate-params", | ||
level: logger.LEVELS.error, | ||
}) | ||
@@ -96,0 +100,0 @@ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1123323
116
14455