Skip to content

Commit c62aaee

Browse files
authored
Merge pull request #63 from nextcloud/enhancement/20-deprecations-II
Add more 20 deprecations
2 parents 8bc577e + e105e6e commit c62aaee

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

lib/rules/no-deprecations.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ const global = {
1010
Clipboard: '18.0.0',
1111
ClipboardJs: '18.0.0',
1212
DOMPurify: '18.0.0',
13-
escapeHTML: '16.0.0',
1413
formatDate: '16.0.0',
1514
getURLParameter: '16.0.0',
1615
Handlebars: '18.0.0',
@@ -46,6 +45,7 @@ const oc = {
4645
filePath: '19.0.0',
4746
generateUrl: '19.0.0',
4847
get: '19.0.0',
48+
getCanonicalLocale: '20.0.0',
4949
getCurrentUser: '19.0.0',
5050
getHost: '17.0.0',
5151
getHostName: '17.0.0',
@@ -73,6 +73,7 @@ const ocp = {
7373
const oc_sub = {
7474
Util: {
7575
formatDate: '20.0.0',
76+
humanFileSize: '20.0.0',
7677
relativeModifiedDate: '20.0.0',
7778
}
7879
};

tests/lib/rules/no-deprecations.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ ruleTester.run("no-deprecations", rule, {
2828

2929
invalid: [
3030
{
31-
code: "var sanitized = escapeHTML('hello')",
31+
code: "var date = relative_modified_date(123)",
3232
errors: [{
33-
message: "The global property or function escapeHTML was deprecated in Nextcloud 16.0.0",
33+
message: "The global property or function relative_modified_date was deprecated in Nextcloud 16.0.0",
3434
type: "Identifier"
3535
}]
3636
},

0 commit comments

Comments
 (0)