Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(build): Add support for Python scripts via
pythonExtension
#1686base: main
Are you sure you want to change the base?
feat(build): Add support for Python scripts via
pythonExtension
#1686Changes from 18 commits
2a4aa8c
987ab35
8b97cec
84699e5
d00d147
500d82b
f0b30d6
b63554e
8ad7009
c3cbd61
be2cefe
bb59bf8
65d84d0
7c96930
c599809
015f3aa
4302077
8ef78ee
ca51709
ddc706a
311aed3
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO
scriptPath
matches the patterns defined inthis.options.scripts
otherwise throw an error even if file exists locally (fail-fast approach to avoid errors only when deploying)doesMatchPattern
function (insideadditionalFiles.ts
?) similar to findStaticAssetFilestrigger.dev/packages/build/src/extensions/core/additionalFiles.ts
Lines 37 to 41 in bc7d445
Questions
context: BuildContext
?process.env.NODE_DEV === 'development'
?doesMatchPattern
be defined locally or exported fromadditionalFiles.ts
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Verification agent
🧩 Analysis chain
Address the TODO comment about script pattern validation.
As noted in the TODO comment, we need to implement the fail-fast approach for script pattern validation in development.
Let's verify the current behavior and propose a solution:
🏁 Script executed:
Length of output: 1173
Implement the script pattern validation check in development
The search confirms that the functionality to validate script patterns (using a fail-fast approach during development) hasn’t been implemented in the Python extension. To address the TODO, consider adding a validation function similar to the following:
validateScriptPattern
) that verifies the script’s filename (or full path) complies with the expected pattern (for example, ensuring it ends with.py
).process.env.NODE_ENV
or a similar flag).Example implementation snippet:
This approach ensures that any deviation from the expected script naming convention is caught early in the development phase, adhering to the fail-fast principle.