33files <- commandArgs(trailing = TRUE )
44renv_schema <- ' {
55 "$schema": "http://json-schema.org/draft-07/schema#",
6+ "$comment": "See https://github.com/rstudio/renv",
67 "title": "renv.lock file.",
78 "description": "A schema for renv.lock files generated by {renv}",
89 "type": "object",
@@ -11,9 +12,11 @@ renv_schema <- '{
1112 "type": "object",
1213 "properties": {
1314 "Version": {
15+ "description": "The version of R used.",
1416 "type": "string"
1517 },
1618 "Repositories": {
19+ "description": "The R repositories used in this project.",
1720 "type": "array",
1821 "items": {
1922 "type": "object",
@@ -31,56 +34,121 @@ renv_schema <- '{
3134 }
3235 },
3336 "required": ["Version", "Repositories"]
37+ },
38+ "Bioconductor": {
39+ "type": "object",
40+ "properties": {
41+ "Version": {
42+ "type": "string"
43+ }
44+ },
45+ "required": ["Version"]
3446 },
3547 "Packages": {
3648 "type": "object",
3749 "additionalProperties": {
3850 "type": "object",
3951 "properties": {
4052 "Package": {
41- "type": "string"
53+ "description": "The package name.",
54+ "type": "string",
55+ "examples": ["ggplot2", "dplyr"]
4256 },
4357 "Version": {
44- "type": "string"
58+ "description": "The package version.",
59+ "type": "string",
60+ "examples": ["1.0.0", "3.4.6"]
4561 },
4662 "Source": {
47- "type": "string"
63+ "description": "The location from which this package was retrieved.",
64+ "type": "string",
65+ "examples": ["Repository", "Bioconductor"]
4866 },
4967 "Repository": {
50- "type": "string"
68+ "description": "The name of the repository (if any) from which this package was retrieved.",
69+ "type": "string",
70+ "examples": ["CRAN"]
5171 },
5272 "Hash": {
73+ "description": "(Optional) A unique hash for this package, used for package caching.",
5374 "type": "string",
5475 "pattern": "^[a-fA-F0-9]{32}$"
5576 },
5677 "RemoteType": {
57- "type": "string"
78+ "description": "Type of the remote, typically written for packages installed by the devtools, remotes and pak packages.",
79+ "type": "string",
80+ "examples": ["standard", "github"]
5881 },
5982 "RemoteHost": {
83+ "description": "Host for the remote.",
6084 "type": "string",
61- "format": "uri"
85+ "format": "uri",
86+ "examples": ["api.github.com"]
6287 },
6388 "RemoteUsername": {
89+ "description": "Username for the remote.",
6490 "type": "string"
6591 },
6692 "RemoteRepo": {
67- "type": "string"
93+ "description": "Repositories for the package.",
94+ "type": "string",
95+ "examples": [
96+ "https://cran.rstudio.com",
97+ "https://cloud.r-project.org"
98+ ]
99+ },
100+ "RemoteRepos": {
101+ "description": "Repositories for the package.",
102+ "type": "string",
103+ "format": "uri",
104+ "examples": [
105+ "https://cran.rstudio.com",
106+ "https://cloud.r-project.org"
107+ ]
68108 },
69109 "RemoteRef": {
110+ "description": "Name of the packages.",
70111 "type": "string"
71112 },
72- "RemoteSha": {
113+ "RemotePkgRef": {
114+ "description": "Name of the packages.",
115+ "type": "string"
116+ },
117+ "RemotePkgPlatform": {
118+ "description": "Architecture/platform of the remote.",
73119 "type": "string",
74- "pattern": "^[a-fA-F0-9]{40}$"
120+ "examples": ["aarch64-apple-darwin20"]
121+ },
122+ "RemoteSha": {
123+ "description": "Version number of the package.",
124+ "type": "string"
75125 },
76126 "Requirements": {
127+ "description": "Dependencies of the package.",
77128 "type": "array",
78129 "items": {
79130 "type": "string"
80- }
131+ },
132+ "examples": [
133+ [
134+ "R",
135+ "jsonlite",
136+ "lifecycle",
137+ "magrittr",
138+ "stringi"
139+ ],
140+ [
141+ "R6",
142+ "Rcpp",
143+ "later",
144+ "magrittr",
145+ "rlang",
146+ "stats"
147+ ]
148+ ]
81149 }
82150 },
83- "required": ["Package", "Version", "Source", "Hash" ]
151+ "required": ["Package", "Version", "Source"]
84152 }
85153 }
86154 },
0 commit comments