Skip to content

Commit

Permalink
Remove Cadence 1.0 Migration Features (#685)
Browse files Browse the repository at this point in the history
  • Loading branch information
jribbink authored Sep 17, 2024
1 parent 8763dd6 commit 42bd63d
Show file tree
Hide file tree
Showing 14 changed files with 18 additions and 41 deletions.
16 changes: 1 addition & 15 deletions .metadata/notifications.json
Original file line number Diff line number Diff line change
@@ -1,15 +1 @@
[
{
"_type": "Notification",
"id": "1",
"type": "info",
"text": "Cadence 1.0 pre-release builds are now available! Developers should begin upgrading their projects - see the Cadence 1.0 Migration Guide for more details.",
"buttons": [
{
"label": "Learn More",
"link": "https://cadence-lang.org/docs/cadence_migration_guide"
}
],
"suppressable": false
}
]
[]
1 change: 0 additions & 1 deletion extension/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
declare module '@onflow/decode'
declare module 'portscanner-sync'
declare module 'elliptic'
declare module 'node-fetch'
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ interface HomebrewVersionInfo {
}

// Command to check flow-cli
const COMPATIBLE_FLOW_CLI_VERSIONS = '>=1.6.0'
const COMPATIBLE_FLOW_CLI_VERSIONS = '>=2.0.0'

// Shell install commands
const BREW_INSTALL_FLOW_CLI = 'brew update && brew install flow-cli'
Expand Down
1 change: 0 additions & 1 deletion extension/src/flow-cli/cli-versions-provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ const CHECK_FLOW_CLI_CMD_NO_JSON = (flowCommand: string): string => `${flowComma

export enum KNOWN_FLOW_COMMANDS {
DEFAULT = 'flow',
CADENCE_V1 = 'flow-c1',
}

// Matches the version number from the output of the Flow CLI
Expand Down
4 changes: 2 additions & 2 deletions extension/test/fixtures/workspace/Error.cdc
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/**
Careful: this cadence code is purposely written with errors so we can test error marking
*/
pub contract interface Foo {
access(all) contract interface Foo {

pub var bar: UInt6
access(all) var bar: UInt6

fun zoo() {
return 2
Expand Down
2 changes: 1 addition & 1 deletion extension/test/fixtures/workspace/FooContract.cdc
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
pub contract FooContract {}
access(all) contract FooContract {}

2 changes: 1 addition & 1 deletion extension/test/fixtures/workspace/Script.cdc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pub fun main(): UFix64 {
access(all) fun main(): UFix64 {
return 42.0
}

2 changes: 1 addition & 1 deletion extension/test/fixtures/workspace/Tx.cdc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
transaction() {
let guest: Address

prepare(authorizer: AuthAccount) {
prepare(authorizer: &Account) {
self.guest = authorizer.address
}

Expand Down
4 changes: 2 additions & 2 deletions extension/test/fixtures/workspace/test/bar/test2.cdc
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import Test

pub fun testPassing() {
access(all) fun testPassing() {
Test.assert(true)
}

pub fun testFailing() {
access(all) fun testFailing() {
Test.assert(false)
}
4 changes: 2 additions & 2 deletions extension/test/fixtures/workspace/test/bar/test3.cdc
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import Test

pub fun testFailing() {
access(all) fun testFailing() {
Test.assert(false)
}

pub fun testPassing() {
access(all) fun testPassing() {
Test.assert(true)
}
2 changes: 1 addition & 1 deletion extension/test/fixtures/workspace/test/test1.cdc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Test

pub fun testPassing() {
access(all) fun testPassing() {
Test.assert(true)
}
2 changes: 1 addition & 1 deletion extension/test/integration/6 - test-provider.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ suite('test provider tests', () => {
const testFilePath = path.join(workspacePath, 'test/bar/test4.cdc')
const testFileContents = `
import Test
pub fun testPassing() {
access(all) fun testPassing() {
Test.assert(true)
}
`
Expand Down
14 changes: 4 additions & 10 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -212,8 +212,7 @@
"typescript": "~5.1.6"
},
"dependencies": {
"@onflow/cadence-parser": "^0.42.1",
"@onflow/decode": "0.0.11",
"@onflow/cadence-parser": "^1.0.0-preview.50",
"@sentry/node": "^8.19.0",
"@vscode/vsce": "^2.31.1",
"ansi-regex": "^6.0.1",
Expand Down

0 comments on commit 42bd63d

Please sign in to comment.