Skip to content
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: pass zipGo property to ZISI #4058

Merged
merged 2 commits into from
Jan 19, 2022
Merged

feat: pass zipGo property to ZISI #4058

merged 2 commits into from
Jan 19, 2022

Conversation

eduardoboucas
Copy link
Member

Summary

Passes the zipGo configuration option to zip-it-and-ship-it (added in netlify/zip-it-and-ship-it#955) when running locally.

A picture of a cute animal (not mandatory, but encouraged)

vv95h

@eduardoboucas eduardoboucas added the type: feature code contributing to the implementation of a feature and/or user facing functionality label Jan 19, 2022
@@ -24,6 +24,7 @@ const normalizeFunctionConfig = ({ buildDir, functionConfig = {}, isRunningLocal
includedFiles: functionConfig.included_files,
includedFilesBasePath: buildDir,
ignoredNodeModules: functionConfig.ignored_node_modules,
schedule: functionConfig.schedule,
Copy link
Contributor

@ehmicky ehmicky Jan 19, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be added to @netlify/config too?

  • export const FUNCTION_CONFIG_PROPERTIES = new Set([
    'directory',
    'external_node_modules',
    'ignored_node_modules',
    'included_files',
    'node_bundler',
    'schedule',
    ])
  • And
    {
    property: 'functions.*.directory',
    check: (value, key, prevPath) => prevPath[1] === FUNCTIONS_CONFIG_WILDCARD_ALL,
    message: 'must be defined on the main `functions` object.',
    example: () => ({
    functions: { directory: 'my-functions' },
    }),
    },
  • Potentially also
    const normalizeFiles = function (fixtureDir, { name, mainFile, runtime, extension, srcFile, schedule }) {
    const mainFileA = normalize(`${fixtureDir}/${mainFile}`)
    const srcFileA = srcFile === undefined ? {} : { srcFile: normalize(`${fixtureDir}/${srcFile}`) }
    return { name, mainFile: mainFileA, runtime, extension, schedule, ...srcFileA }
    }

Edit: Oops, disregard this comment. I realized this configuration is only set by us, not by users. 👍

Copy link
Contributor

@ehmicky ehmicky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@kodiakhq kodiakhq bot merged commit 1f45942 into main Jan 19, 2022
@kodiakhq kodiakhq bot deleted the feat/zisi-zip-go branch January 19, 2022 21:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge type: feature code contributing to the implementation of a feature and/or user facing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants