@@ -22,7 +22,7 @@ type Inputs = Readonly<{
2222 locked ?: boolean
2323 cache ?: boolean
2424 globalCache ?: boolean
25- projectCacheKey ?: string
25+ cacheKey ?: string
2626 globalCacheKey ?: string
2727 cacheWrite ?: boolean
2828 pixiBinPath ?: string
@@ -177,7 +177,7 @@ const validateInputs = (inputs: Inputs): void => {
177177 if ( inputs . pixiUrlHeaders && ! inputs . pixiUrl ) {
178178 throw new Error ( 'You need to specify pixi-url when using pixi-url-headers' )
179179 }
180- if ( inputs . projectCacheKey !== undefined && inputs . cache === false ) {
180+ if ( inputs . cacheKey !== undefined && inputs . cache === false ) {
181181 throw new Error ( 'Cannot specify project cache key without project caching' )
182182 }
183183 if ( inputs . globalCacheKey !== undefined && inputs . globalCache === false ) {
@@ -323,12 +323,10 @@ const inferOptions = (inputs: Inputs): Options => {
323323 } else if ( inputs . activateEnvironment && inputs . activateEnvironment !== 'false' ) {
324324 activatedEnvironment = inputs . activateEnvironment
325325 }
326- const cache =
327- inputs . cache === true || ( lockFileAvailable && inputs . cache !== false )
328- ? {
329- cacheKeyPrefix : inputs . projectCacheKey ?? 'pixi-' ,
330- cacheWrite : inputs . cacheWrite ?? true
331- }
326+ const cache = inputs . cacheKey
327+ ? { projectCacheKeyPrefix : inputs . cacheKey , cacheWrite : inputs . cacheWrite ?? true }
328+ : inputs . cache === true || ( lockFileAvailable && inputs . cache !== false )
329+ ? { cacheKeyPrefix : 'pixi-' , cacheWrite : inputs . cacheWrite ?? true }
332330 : undefined
333331 const globalCache =
334332 inputs . globalCache === true && inputs . globalEnvironments && inputs . globalEnvironments . length > 0
@@ -417,7 +415,7 @@ const getOptions = () => {
417415 frozen : parseOrUndefinedJSON ( 'frozen' , z . boolean ( ) ) ,
418416 cache : parseOrUndefinedJSON ( 'cache' , z . boolean ( ) ) ,
419417 globalCache : parseOrUndefinedJSON ( 'global-cache' , z . boolean ( ) ) ,
420- projectCacheKey : parseOrUndefined ( 'cache-key' , z . string ( ) ) ,
418+ cacheKey : parseOrUndefined ( 'cache-key' , z . string ( ) ) ,
421419 globalCacheKey : parseOrUndefined ( 'global-cache-key' , z . string ( ) ) ,
422420 cacheWrite : parseOrUndefinedJSON ( 'cache-write' , z . boolean ( ) ) ,
423421 pixiBinPath : parseOrUndefined ( 'pixi-bin-path' , z . string ( ) ) ,
0 commit comments