-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: remove duplicative integration install step
In 0cfe6d8 I introduced a duplicative integration install step when `context=dev`, not realizing that we have a special case for resolving integrations in dev mode: https://github.com/netlify/build/blob/main/packages/build/src/plugins/resolve.js#L189-L195 Returning the tarball location meant we were installing the integration's packed tarball and then also installing from the pre-pack build directory. This changeset removes that duplication. It's... weird that we don't just return the location of a packed npm package (tarball) and instead have a special case that points at the pre-pack build artifact directory. This sort of special-cased action at a distance makes it super hard to understand how this works. I'm going to circle back on de-confusing this sometime this quarter when I make the extension build artifact path configurable, which will solve a lot of testing pain points we currently have. The failing test I also fix in this changeset was never realistic and didn't exercise some of the code paths it was supposed to put under test, so I've updated that test fixture to be realistic.
- Loading branch information
Showing
11 changed files
with
28 additions
and
16 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
Empty file.
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,3 @@ | ||
export const onPreBuild = function () { | ||
console.log("Hello world"); | ||
} |
2 changes: 2 additions & 0 deletions
2
...ild/tests/install/fixtures/local_missing_integration/integration/.ntli/build/manifest.yml
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,2 @@ | ||
name: abc-integration | ||
inputs: [] |
7 changes: 7 additions & 0 deletions
7
...ild/tests/install/fixtures/local_missing_integration/integration/.ntli/build/package.json
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,7 @@ | ||
{ | ||
"main": "index.js", | ||
"type": "module", | ||
"version": "0.0.0", | ||
"name": "abc-integration", | ||
"dependencies": {} | ||
} |
2 changes: 1 addition & 1 deletion
2
packages/build/tests/install/fixtures/local_missing_integration/integration/manifest.yml
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 |
---|---|---|
@@ -1,2 +1,2 @@ | ||
name: test | ||
name: abc-integration | ||
inputs: [] |
2 changes: 1 addition & 1 deletion
2
packages/build/tests/install/fixtures/local_missing_integration/integration/package.json
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"name": "plugin_deps_plugin", | ||
"name": "abc-integration", | ||
"version": "0.0.1", | ||
"type": "module", | ||
"scripts": { | ||
|
2 changes: 1 addition & 1 deletion
2
packages/build/tests/install/fixtures/local_missing_integration/netlify.toml
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
[[integrations]] | ||
name = "abc-integration" | ||
name = "test" | ||
|
||
[integrations.dev] | ||
path = "./integration" | ||
|
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
Binary file not shown.
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