Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🚮 Remove src/purifier.js rollup config #34876

Merged
merged 3 commits into from
Jun 15, 2021
Merged

Conversation

samouri
Copy link
Member

@samouri samouri commented Jun 15, 2021

summary
Removes the rollup config for src/purifier since we have no intention of distributing it as a library.

  • renamed src/purifier/purifier.js --> src/purifier/index.js
  • updated import to point to #purifier instead of #purifier/purifier

@samouri samouri requested review from rcebulko and rsimha June 15, 2021 20:40
@samouri samouri self-assigned this Jun 15, 2021
@samouri samouri changed the title 🚮 Remove #purifier rollup config 🚮 Remove src/purifier.js rollup config Jun 15, 2021
Copy link
Contributor

@rcebulko rcebulko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

amphtml/src/purifier/README.md:
    9  
   10  ```js
   11: import {Purifier} from './src/purifier/purifier';
   12  
   13  const purifier = new Purifier(document);
   ..
   19  ```js
   20  import Mustache from 'mustache';
   21: import {Purifier} from '../../../src/purifier/purifier';
   22  
   23  const purifier = new Purifier(document);

amphtml/test/unit/test-purifier.js:
   16  
   17  import * as urlRewrite from '../../src/url-rewrite';
   18: import {Purifier} from '../../src/purifier/purifier';
   19  
   20  describes.sandboxed

amphtml/build-system/test-configs/dep-check-config.js:
   44        // WARNING: Importing purifier.js will also bundle DOMPurify (13KB).
   45        'extensions/amp-list/0.1/amp-list.js->src/purifier/sanitation.js',
   46:       'extensions/amp-mustache/0.2/amp-mustache.js->src/purifier/purifier.js',
   47:       'extensions/amp-script/0.1/amp-script.js->src/purifier/purifier.js',
   48:       'src/purifier/purifier.js->src/purifier/sanitation.js',
   49        'src/sanitizer.js->src/purifier/sanitation.js',
   50      ],

amphtml/extensions/amp-script/0.1/amp-script.js:
   19  import {Deferred} from '../../../src/core/data-structures/promise';
   20  import {Layout, isLayoutSizeDefined} from '../../../src/layout';
   21: import {Purifier} from '../../../src/purifier/purifier';
   22  import {Services} from '../../../src/services';
   23  import {UserActivationTracker} from './user-activation-tracker';

amphtml/extensions/amp-mustache/0.2/amp-mustache.js:
   16  
   17  import {BaseTemplate} from '../../../src/base-template';
   18: import {Purifier} from '../../../src/purifier/purifier';
   19  import {dict} from '../../../src/core/types/object';
   20  import {getService, registerServiceBuilder} from '../../../src/service';

amphtml/extensions/amp-mustache/0.2/test/test-amp-mustache.js:
   17  import * as service from '../../../../src/service';
   18  import {AmpMustache} from '../amp-mustache';
   19: import {Purifier} from '../../../../src/purifier/purifier';
   20  import mustache from '../../../../third_party/mustache/mustache';
   21  

Copy link
Contributor

@rcebulko rcebulko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

chef's kiss

@samouri samouri enabled auto-merge (squash) June 15, 2021 20:57
@samouri samouri merged commit 0e2726a into ampproject:main Jun 15, 2021
westonruter added a commit to westonruter/amphtml that referenced this pull request Jun 16, 2021
…ebook-like-bento-version

* 'main' of github.com:ampproject/amphtml: (23 commits)
  `amp-story-desktop-one-panel` Update demo with usecases (ampproject#34867)
  🚮 Remove src/purifier.js rollup config (ampproject#34876)
  Validator Rollup (ampproject#34769)
  ✨ `amp-story-desktop-one-panel` Check UI type to get page dimension on tap (ampproject#34875)
  Refactor: move getRealChildNodes and getRealChildren to core (ampproject#34813)
  🏗📖 Fix some example files that do not validate (ampproject#34835)
  🏗Add `#test` and `#testing` to alias list (ampproject#34853)
  Add css files for missing components (ampproject#34861)
  Apply bulk transform to html tags (ampproject#34836)
  🐛 amp-ima-video: Fix duration label on livestreams (ampproject#34865)
  ♻️  Extract `applyFillContent` into a standalone function (ampproject#34858)
  Give script tag closing tag (ampproject#34832)
  🏗 Refinements to renovate config (ampproject#34862)
  Bento: Enable `SocialShare` for npm publishing (ampproject#34817)
  🏗 Use aliased paths in generated extensions (ampproject#34860)
  ✨ `amp-story-desktop-one-panel` Position distance="2" page below viewport (ampproject#34834)
  🏗 Set `wrapper` on generated Bento extensions (ampproject#34843)
  🧪[story-ads] Allow viewer to set progress bar segment experiment. (ampproject#34827)
  🏗 Allow extension bundles to specify their own wrapper (ampproject#34845)
  🏗🚀 Speed up validated example grouping ~45x (ampproject#34837)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants