File tree Expand file tree Collapse file tree 4 files changed +21
-2
lines changed Expand file tree Collapse file tree 4 files changed +21
-2
lines changed Original file line number Diff line number Diff line change 11---
2- ' create-rock ' : minor
2+ ' create-rock ' : patch
33---
44
55feat: add remote cache provider setup
Original file line number Diff line number Diff line change @@ -172,6 +172,13 @@ export async function getConfig(
172172 getRemoteCacheProvider : async ( ) => {
173173 // special case for github-actions
174174 if ( validatedConfig . remoteCacheProvider === 'github-actions' ) {
175+ logger . warnOnce ( 'github-actions' ) (
176+ `Using shorthand "github-actions" as "remoteCacheProvider" value in ${ colorLink (
177+ 'rock.config.mjs' ,
178+ ) } is deprecated. It will be removed in future releases.
179+ Please use "@rock-js/provider-github" plugin explicitly instead.
180+ Read more: ${ colorLink ( 'https://rockjs.dev/docs/configuration#github-actions-provider' ) } ` ,
181+ ) ;
175182 const { providerGitHub } = await import ( '@rock-js/provider-github' ) ;
176183 return providerGitHub ( ) ;
177184 }
Original file line number Diff line number Diff line change @@ -22,4 +22,4 @@ export {
2222 handleUploadResponse ,
2323} from './lib/build-cache/fetchCachedBuild.js' ;
2424export { getInfoPlist } from './lib/getInfoPlist.js' ;
25- export { getReactNativeVersion } from './lib/getReactNativeVersion.js' ;
25+ export { getReactNativeVersion } from './lib/getReactNativeVersion.js' ;
Original file line number Diff line number Diff line change 11import util from 'node:util' ;
22import { log as clackLog } from '@clack/prompts' ;
33import isUnicodeSupported from 'is-unicode-supported' ;
4+ import cacheManager from './cacheManager.js' ;
45import { color } from './color.js' ;
56import { isInteractive } from './isInteractive.js' ;
67
@@ -28,6 +29,16 @@ const warn = (...messages: Array<unknown>) => {
2829 clackLog . warn ( mapLines ( output , color . yellow ) ) ;
2930} ;
3031
32+ const warnOnce =
33+ ( key : string ) =>
34+ ( ...messages : Array < unknown > ) => {
35+ if ( cacheManager . get ( `warnOnce-${ key } ` ) ) {
36+ return ;
37+ }
38+ warn ( ...messages ) ;
39+ cacheManager . set ( `warnOnce-${ key } ` , 'true' ) ;
40+ } ;
41+
3142const error = ( ...messages : Array < unknown > ) => {
3243 const output = util . format ( ...messages ) ;
3344 clackLog . error ( mapLines ( output , color . red ) ) ;
@@ -60,6 +71,7 @@ export default {
6071 success,
6172 info,
6273 warn,
74+ warnOnce,
6375 error,
6476 debug,
6577 log,
You can’t perform that action at this time.
0 commit comments