-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into st/chore/[email protected]
- Loading branch information
Showing
9 changed files
with
71 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
--- | ||
--- | ||
|
||
chore: added validation for toolchain versions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"fuels": patch | ||
--- | ||
|
||
feat: enable `fuels` callbacks to be asynchronous |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
import { versions } from '@fuel-ts/versions'; | ||
import toml from '@iarna/toml'; | ||
import { readFileSync } from 'fs'; | ||
import { join } from 'path'; | ||
|
||
const projectRoot = join(__dirname, '..', '..', '..'); | ||
const templateDir = join(projectRoot, 'templates'); | ||
const counterGuideDir = join(projectRoot, 'apps', 'create-fuels-counter-guide'); | ||
|
||
const toolchainPaths = [ | ||
join(templateDir, 'vite', 'fuel-toolchain.toml'), | ||
join(templateDir, 'nextjs', 'fuel-toolchain.toml'), | ||
join(counterGuideDir, 'fuel-toolchain.toml'), | ||
]; | ||
|
||
interface ToolchainComponents extends toml.JsonMap { | ||
forc: string; | ||
'fuel-core': string; | ||
} | ||
|
||
/** | ||
* @group node | ||
*/ | ||
describe('versions', () => { | ||
it('should have versions compatible with fuel-core', () => { | ||
const expectedVersions = { | ||
FORC: versions.FORC, | ||
FUEL_CORE: versions.FUEL_CORE, | ||
}; | ||
const expectedToolchains = toolchainPaths.map((path) => ({ | ||
path, | ||
versions: expectedVersions, | ||
})); | ||
|
||
const toolchains = toolchainPaths.map((toolchainPath) => { | ||
const toolchainContents = readFileSync(toolchainPath, 'utf-8'); | ||
const parsedToolchain = toml.parse(toolchainContents); | ||
const components = parsedToolchain.components as ToolchainComponents; | ||
|
||
return { | ||
path: toolchainPath, | ||
versions: { | ||
FORC: components.forc, | ||
FUEL_CORE: components['fuel-core'], | ||
}, | ||
}; | ||
}); | ||
|
||
expect(toolchains).toStrictEqual(expectedToolchains); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters