From fe5fe9a95f032e07e9aa7a8a408fddfe42d05d37 Mon Sep 17 00:00:00 2001 From: Tobias Bieniek Date: Tue, 4 Jul 2017 18:41:45 +0200 Subject: [PATCH 1/3] Add "package-lock.json" file --- package-lock.json | 49 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 package-lock.json diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..66bfe5d --- /dev/null +++ b/package-lock.json @@ -0,0 +1,49 @@ +{ + "name": "ember-rfc176-data", + "version": "0.2.0", + "lockfileVersion": 1, + "dependencies": { + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true + }, + "ansi-styles": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", + "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", + "dev": true + }, + "chalk": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", + "dev": true + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true + }, + "has-ansi": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", + "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", + "dev": true + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "dev": true + }, + "supports-color": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", + "dev": true + } + } +} From aa4357433a7e0af2914cf0872195744ae61db25b Mon Sep 17 00:00:00 2001 From: Tobias Bieniek Date: Tue, 4 Jul 2017 18:42:05 +0200 Subject: [PATCH 2/3] Add "got" dev dependency --- package-lock.json | 126 ++++++++++++++++++++++++++++++++++++++++++++++ package.json | 3 +- 2 files changed, 128 insertions(+), 1 deletion(-) diff --git a/package-lock.json b/package-lock.json index 66bfe5d..5933e78 100644 --- a/package-lock.json +++ b/package-lock.json @@ -21,18 +21,126 @@ "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", "dev": true }, + "decompress-response": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz", + "integrity": "sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M=", + "dev": true + }, + "duplexer3": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz", + "integrity": "sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI=", + "dev": true + }, "escape-string-regexp": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", "dev": true }, + "get-stream": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz", + "integrity": "sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ=", + "dev": true + }, + "got": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/got/-/got-7.1.0.tgz", + "integrity": "sha512-Y5WMo7xKKq1muPsxD+KmrR8DH5auG7fBdDVueZwETwV6VytKyU9OX/ddpq2/1hp1vIPvVb4T81dKQz3BivkNLw==", + "dev": true + }, "has-ansi": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", "dev": true }, + "has-symbol-support-x": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/has-symbol-support-x/-/has-symbol-support-x-1.3.0.tgz", + "integrity": "sha512-kLtS+N9qwz+Buc6TUfcW5iGb59hLLr5qfxTACi/0uGpH1u5NMNWsdU57KoYRBywvPykeRmu5qfB5x0chpDSWlg==", + "dev": true + }, + "has-to-string-tag-x": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/has-to-string-tag-x/-/has-to-string-tag-x-1.3.0.tgz", + "integrity": "sha512-Fu9Nwv8/VNJMvKjkldzXHO+yeX+TCelwUQ9dGW2LrAfHfHi6zVqQt+Qjilf0qGHvpl6Fap6o8aDhWhMt5hY/1g==", + "dev": true + }, + "is-object": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-object/-/is-object-1.0.1.tgz", + "integrity": "sha1-iVJojF7C/9awPsyF52ngKQMINHA=", + "dev": true + }, + "is-plain-obj": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", + "integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=", + "dev": true + }, + "is-retry-allowed": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-retry-allowed/-/is-retry-allowed-1.1.0.tgz", + "integrity": "sha1-EaBgVotnM5REAz0BJaYaINVk+zQ=", + "dev": true + }, + "is-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", + "dev": true + }, + "isurl": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isurl/-/isurl-1.0.0.tgz", + "integrity": "sha512-1P/yWsxPlDtn7QeRD+ULKQPaIaN6yF368GZ2vDfv0AL0NwpStafjWCDDdn0k8wgFMWpVAqG7oJhxHnlud42i9w==", + "dev": true + }, + "lowercase-keys": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.0.tgz", + "integrity": "sha1-TjNms55/VFfjXxMkvfb4jQv8cwY=", + "dev": true + }, + "mimic-response": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.0.tgz", + "integrity": "sha1-3z02Uqc/3ta5sLJBRub9BSNTRY4=", + "dev": true + }, + "p-cancelable": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-0.3.0.tgz", + "integrity": "sha512-RVbZPLso8+jFeq1MfNvgXtCRED2raz/dKpacfTNxsx6pLEpEomM7gah6VeHSYV3+vo0OAi4MkArtQcWWXuQoyw==", + "dev": true + }, + "p-finally": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", + "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", + "dev": true + }, + "p-timeout": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-1.2.0.tgz", + "integrity": "sha1-mCD5lDTFgXhotPNICe5SkWYNW2w=", + "dev": true + }, + "prepend-http": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/prepend-http/-/prepend-http-1.0.4.tgz", + "integrity": "sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw=", + "dev": true + }, + "safe-buffer": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", + "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==", + "dev": true + }, "strip-ansi": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", @@ -44,6 +152,24 @@ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", "dev": true + }, + "timed-out": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/timed-out/-/timed-out-4.0.1.tgz", + "integrity": "sha1-8y6srFoXW+ol1/q1Zas+2HQe9W8=", + "dev": true + }, + "url-parse-lax": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-1.0.0.tgz", + "integrity": "sha1-evjzA2Rem9eaJy56FKxovAYJ2nM=", + "dev": true + }, + "url-to-options": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/url-to-options/-/url-to-options-1.0.1.tgz", + "integrity": "sha1-FQWgOiiaSMvXpDTvuu7FBV9WM6k=", + "dev": true } } } diff --git a/package.json b/package.json index 732f337..9a9e3f3 100644 --- a/package.json +++ b/package.json @@ -14,6 +14,7 @@ "url": "git+https://github.com/ember-cli/ember-rfc176-data.git" }, "devDependencies": { - "chalk": "^1.1.3" + "chalk": "^1.1.3", + "got": "^7.1.0" } } From 9bb91398c778117c0abb1fedd2ee905518d986c4 Mon Sep 17 00:00:00 2001 From: Tobias Bieniek Date: Tue, 4 Jul 2017 19:45:49 +0200 Subject: [PATCH 3/3] Add "generate-missing-apis-list" script --- scripts/generate-missing-apis-list | 54 ++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100755 scripts/generate-missing-apis-list diff --git a/scripts/generate-missing-apis-list b/scripts/generate-missing-apis-list new file mode 100755 index 0000000..2eb6cdb --- /dev/null +++ b/scripts/generate-missing-apis-list @@ -0,0 +1,54 @@ +#!/usr/bin/env node + +const got = require('got'); +const chalk = require("chalk"); + +const globals = require("../globals.json"); + +got('http://builds.emberjs.com/canary/ember-docs.json').then(response => { + let json = JSON.parse(response.body); + processJSON(json); + +}).catch(error => { + console.error(chalk.red(error)); +}); + +function processJSON(json) { + let staticClasses = Object.keys(json.classes) + .map(it => json.classes[it]) + .filter(it => it.static) + .map(it => it.name); + + json.classitems + .filter(it => it.access === 'public') + .filter(it => staticClasses.indexOf(it.class) !== -1) + .forEach(it => { + if (!it.name) { return; } + + let globalName = `${it.class}.${it.name}`; + let globalsKey = globalName.replace(/^Ember\./, ''); + let newImport = globals[globalsKey]; + + if (newImport) { + console.log(chalk.green(`${globalName} -> ${newImport}`)); + } else { + console.log(chalk.red(`${globalName} -> ?`)); + } + }); + + Object.keys(json.classes) + .map(it => json.classes[it]) + .filter(it => !it.static) + .filter(it => it.access === 'public') + .forEach(it => { + let globalName = it.name; + let globalsKey = globalName.replace(/^Ember\./, ''); + let newImport = globals[globalsKey]; + + if (newImport) { + console.log(chalk.green(`${globalName} -> ${newImport}`)); + } else { + console.log(chalk.red(`${globalName} -> ?`)); + } + }) +}