Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: onflow/vscode-cadence
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 8763dd6938958949bdadaf311653ecb939b45b39
Choose a base ref
...
head repository: onflow/vscode-cadence
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 4cebb34cdfd1ae2259bcbd6406f83a66e01cde01
Choose a head ref
Loading
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
}
]
[]
6 changes: 6 additions & 0 deletions OWNERSHIP_PROOF.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Ownership Proof for VSCode Cadence Extension

Hello! I am the author of the Cadence extension for Visual Studio Code. This is proof for my correspondance with Visual Studio Marketplace Support.

This relates to the following ticket:
`80c2ec86`
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
@@ -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'
6 changes: 0 additions & 6 deletions extension/src/flow-cli/cli-selection-provider.ts
Original file line number Diff line number Diff line change
@@ -5,8 +5,6 @@ import { SemVer } from 'semver'
import { CliBinary } from './cli-versions-provider'

const CHANGE_CLI_BINARY = 'cadence.changeFlowCliBinary'
const CADENCE_V1_CLI_REGEX = /-cadence-v1.0.0/g
// label with icon
const GET_BINARY_LABEL = (version: SemVer): string => `Flow CLI v${version.format()}`

export class CliSelectionProvider {
@@ -158,7 +156,3 @@ class CustomBinaryItem implements vscode.QuickPickItem {
this.label = 'Choose a custom version...'
}
}

export function isCliCadenceV1 (version: SemVer): boolean {
return CADENCE_V1_CLI_REGEX.test(version.raw)
}
1 change: 0 additions & 1 deletion extension/src/flow-cli/cli-versions-provider.ts
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion extension/src/server/flow-config.ts
Original file line number Diff line number Diff line change
@@ -161,7 +161,7 @@ export class FlowConfig implements Disposable {
return
}

const didInit = await tryExecDefault('flow', ['init'], { cwd: rootPath })
const didInit = await tryExecDefault('flow', ['init', '--config-only'], { cwd: rootPath })

if (!didInit) {
void window.showErrorMessage('Failed to initialize Flow CLI configuration.')
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
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
}

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
@@ -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)
}
`
Loading