Skip to content

Commit

Permalink
🏗 Switch from third_party/rrule to the rrule module (ampproject#2…
Browse files Browse the repository at this point in the history
  • Loading branch information
rsimha committed Jun 24, 2019
1 parent 6d35548 commit b060d9a
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 2,285 deletions.
2 changes: 0 additions & 2 deletions build-system/compile/compile.js
Expand Up @@ -97,7 +97,6 @@ function compile(entryModuleFilenames, outputDir, outputFilename, options) {
'third_party/mustache/',
'third_party/vega/',
'third_party/webcomponentsjs/',
'third_party/rrule/',
'third_party/react-dates/',
'third_party/amp-toolbox-cache-url/',
'third_party/inputmask/',
Expand Down Expand Up @@ -228,7 +227,6 @@ function compile(entryModuleFilenames, outputDir, outputFilename, options) {
'third_party/d3/**/*.js',
'third_party/subscriptions-project/*.js',
'third_party/webcomponentsjs/ShadowCSS.js',
'third_party/rrule/rrule.js',
'third_party/react-dates/bundle.js',
'third_party/amp-toolbox-cache-url/**/*.js',
'third_party/inputmask/**/*.js',
Expand Down
1 change: 0 additions & 1 deletion build-system/dep-check-config.js
Expand Up @@ -91,7 +91,6 @@ exports.rules = [
'third_party/timeagojs/timeago.js->' +
'third_party/timeagojs/timeago-locales.js',
'extensions/amp-date-picker/**->third_party/react-dates/bundle.js',
'extensions/amp-date-picker/**->third_party/rrule/rrule.js',
'extensions/amp-subscriptions/**/*.js->' +
'third_party/subscriptions-project/apis.js',
'extensions/amp-subscriptions/**/*.js->' +
Expand Down
5 changes: 3 additions & 2 deletions extensions/amp-date-picker/0.1/dates-list.js
Expand Up @@ -15,7 +15,7 @@
*/

import {requireExternal} from '../../../src/module';
import RRule from '../../../third_party/rrule/rrule';
import {rrulestr} from 'rrule';

/** @enum {string} */
const DateType = {
Expand Down Expand Up @@ -139,10 +139,11 @@ export class DatesList {
* Tries to parse a string into an RRULE object.
* @param {string} str A string which represents a repeating date RRULE spec.
* @return {?JsonObject}
* @suppress {missingProperties} // Remove after https://github.com/google/closure-compiler/issues/3041 is fixed
*/
function tryParseRrulestr(str) {
try {
return RRule.fromString(str);
return rrulestr(str);
} catch (e) {
return null;
}
Expand Down
1 change: 1 addition & 0 deletions package.json
Expand Up @@ -28,6 +28,7 @@
"promise-pjs": "1.1.3",
"prop-types": "15.7.2",
"react-dates": "15.5.3",
"rrule": "2.2.0",
"set-dom": "7.5.2",
"web-activities": "1.13.0",
"web-animations-js": "2.3.1"
Expand Down

0 comments on commit b060d9a

Please sign in to comment.