diff --git a/token/js/client/layout.js b/token/js/client/layout.js index 7944ad0f5eb..1763f626f50 100644 --- a/token/js/client/layout.js +++ b/token/js/client/layout.js @@ -1,6 +1,6 @@ // @flow -import * as BufferLayout from 'buffer-layout'; +import * as BufferLayout from '@solana/buffer-layout'; /** * Layout for a public key diff --git a/token/js/client/token.js b/token/js/client/token.js index 0acd71b5903..a0af6a9642f 100644 --- a/token/js/client/token.js +++ b/token/js/client/token.js @@ -5,7 +5,7 @@ import {Buffer} from 'buffer'; import assert from 'assert'; import BN from 'bn.js'; -import * as BufferLayout from 'buffer-layout'; +import * as BufferLayout from '@solana/buffer-layout'; import { Keypair, PublicKey, diff --git a/token/js/flow-typed/npm/@solana/buffer-layout_vx.x.x.js b/token/js/flow-typed/npm/@solana/buffer-layout_vx.x.x.js new file mode 100644 index 00000000000..700e74e1972 --- /dev/null +++ b/token/js/flow-typed/npm/@solana/buffer-layout_vx.x.x.js @@ -0,0 +1,32 @@ +// flow-typed signature: b7ffeae986a5978b6826caf9cdff226b +// flow-typed version: <>/@solana/buffer-layout_v3.0.0/flow_v0.160.0 + +/** + * This is an autogenerated libdef stub for: + * + * '@solana/buffer-layout' + * + * Fill this stub out by replacing all the `any` types. + * + * Once filled out, we encourage you to share your work with the + * community by sending a pull request to: + * https://github.com/flowtype/flow-typed + */ + +declare module '@solana/buffer-layout' { + declare module.exports: any; +} + +/** + * We include stubs for each file inside this npm package in case you need to + * require those files directly. Feel free to delete any files that aren't + * needed. + */ +declare module '@solana/buffer-layout/lib/Layout' { + declare module.exports: any; +} + +// Filename aliases +declare module '@solana/buffer-layout/lib/Layout.js' { + declare module.exports: $Exports<'@solana/buffer-layout/lib/Layout'>; +} diff --git a/token/js/flow-typed/npm/buffer-layout_vx.x.x.js b/token/js/flow-typed/npm/buffer-layout_vx.x.x.js deleted file mode 100644 index 4ea33167fd3..00000000000 --- a/token/js/flow-typed/npm/buffer-layout_vx.x.x.js +++ /dev/null @@ -1,53 +0,0 @@ -// flow-typed signature: a8fa25a70253f0b094eadea455a57eeb -// flow-typed version: <>/buffer-layout_v^1.2.0/flow_v0.142.0 - -/** - * This is an autogenerated libdef stub for: - * - * 'buffer-layout' - * - * Fill this stub out by replacing all the `any` types. - * - * Once filled out, we encourage you to share your work with the - * community by sending a pull request to: - * https://github.com/flowtype/flow-typed - */ - -declare module 'buffer-layout' { - declare module.exports: any; -} - -/** - * We include stubs for each file inside this npm package in case you need to - * require those files directly. Feel free to delete any files that aren't - * needed. - */ -declare module 'buffer-layout/jsdoc/custom/local' { - declare module.exports: any; -} - -declare module 'buffer-layout/lib/Layout' { - declare module.exports: any; -} - -declare module 'buffer-layout/test/examples' { - declare module.exports: any; -} - -declare module 'buffer-layout/test/LayoutTest' { - declare module.exports: any; -} - -// Filename aliases -declare module 'buffer-layout/jsdoc/custom/local.js' { - declare module.exports: $Exports<'buffer-layout/jsdoc/custom/local'>; -} -declare module 'buffer-layout/lib/Layout.js' { - declare module.exports: $Exports<'buffer-layout/lib/Layout'>; -} -declare module 'buffer-layout/test/examples.js' { - declare module.exports: $Exports<'buffer-layout/test/examples'>; -} -declare module 'buffer-layout/test/LayoutTest.js' { - declare module.exports: $Exports<'buffer-layout/test/LayoutTest'>; -} diff --git a/token/js/module.d.ts b/token/js/module.d.ts index 0d16d91034a..685a86299c5 100644 --- a/token/js/module.d.ts +++ b/token/js/module.d.ts @@ -1,6 +1,6 @@ declare module '@solana/spl-token' { import {Buffer} from 'buffer'; - import {Layout} from 'buffer-layout'; + import {Layout} from '@solana/buffer-layout'; import { PublicKey, Signer, diff --git a/token/js/module.flow.js b/token/js/module.flow.js index b09d35bcc4f..56a32d0d0b6 100644 --- a/token/js/module.flow.js +++ b/token/js/module.flow.js @@ -6,7 +6,7 @@ import BN from 'bn.js'; // eslint-disable-line import {Buffer} from 'buffer'; -import {Layout} from 'buffer-layout'; +import {Layout} from '@solana/buffer-layout'; import {Connection, PublicKey, TransactionInstruction} from '@solana/web3.js'; import type {Signer, TransactionSignature} from '@solana/web3.js'; diff --git a/token/js/package-lock.json b/token/js/package-lock.json index 9e88670301e..dbc539dfb51 100644 --- a/token/js/package-lock.json +++ b/token/js/package-lock.json @@ -10,10 +10,10 @@ "license": "MIT", "dependencies": { "@babel/runtime": "^7.10.5", + "@solana/buffer-layout": "^3.0.0", "@solana/web3.js": "^1.21.0", "bn.js": "^5.1.0", "buffer": "6.0.3", - "buffer-layout": "^1.2.0", "dotenv": "10.0.0" }, "devDependencies": { @@ -3693,14 +3693,6 @@ "node": ">=0.10" } }, - "node_modules/buffer-layout": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/buffer-layout/-/buffer-layout-1.2.2.tgz", - "integrity": "sha512-kWSuLN694+KTk8SrYvCqwP2WcgQjoRCiF5b4QDvkkz8EmgD+aWAIceGFKMIAdmF/pH+vpgNV3d3kAKorcdAmWA==", - "engines": { - "node": ">=4.5" - } - }, "node_modules/buffers": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/buffers/-/buffers-0.1.1.tgz", @@ -14040,11 +14032,6 @@ "integrity": "sha512-I7wzHwA3t1/lwXQh+A5PbNvJxgfo5r3xulgpYDB5zckTu/Z9oUK9biouBKQUjEqzaz3HnAT6TYoovmE+GqSf7A==", "dev": true }, - "buffer-layout": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/buffer-layout/-/buffer-layout-1.2.2.tgz", - "integrity": "sha512-kWSuLN694+KTk8SrYvCqwP2WcgQjoRCiF5b4QDvkkz8EmgD+aWAIceGFKMIAdmF/pH+vpgNV3d3kAKorcdAmWA==" - }, "buffers": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/buffers/-/buffers-0.1.1.tgz", diff --git a/token/js/package.json b/token/js/package.json index d6718b48463..5384a9ab1be 100644 --- a/token/js/package.json +++ b/token/js/package.json @@ -59,7 +59,7 @@ "@solana/web3.js": "^1.21.0", "bn.js": "^5.1.0", "buffer": "6.0.3", - "buffer-layout": "^1.2.0", + "@solana/buffer-layout": "^3.0.0", "dotenv": "10.0.0" }, "devDependencies": { diff --git a/token/js/rollup.config.js b/token/js/rollup.config.js index d3ff46f7a77..376ff6d9248 100644 --- a/token/js/rollup.config.js +++ b/token/js/rollup.config.js @@ -54,7 +54,7 @@ function generateConfig(configType, format) { // Bundled for `Buffer` consistency // 'bs58', // 'buffer', - // 'buffer-layout', + // '@solana/buffer-layout', '@solana/web3.js', ]; @@ -110,7 +110,7 @@ function generateConfig(configType, format) { /@babel\/runtime/, 'assert', 'bn.js', - 'buffer-layout', + '@solana/buffer-layout', '@solana/web3.js', ]; break;