Skip to content

Commit

Permalink
Use polyfill-library from npm and link to the new repository (#1837)
Browse files Browse the repository at this point in the history
* Delete polyfill-library and link to the polyfill-library repo

* remove polyfill-library steps from circleci

* remove polyfill-library ignored files

* remove polyfill library scrips from package.json

* remove library from readme

* use atest version on npm

* link to polyfill-library repo

* move polyfill-service back to root of repo

* update circle commands now that project folder structure has changed

* update lock file

* add quote
  • Loading branch information
JakeChampion committed Dec 17, 2018
1 parent 06470d6 commit 0996b55
Show file tree
Hide file tree
Showing 978 changed files with 29,934 additions and 47,113 deletions.
File renamed without changes.
51 changes: 6 additions & 45 deletions .circleci/config.yml
Expand Up @@ -7,21 +7,21 @@ jobs:
steps:
- "checkout"
- run: "sudo ~/project/.circleci/install_terraform.sh"
- run: "terraform fmt -check=true ~/project/packages/polyfill-service/fastly/terraform/"
- run: "terraform fmt -check=true fastly/terraform/"
lint_js:
docker:
- image: "circleci/node:10"
steps:
- "checkout"
- run: "cd ~/project/packages/polyfill-library/ && yarn install --frozen-lockfile && npm run lint"
- run: "cd ~/project/packages/polyfill-service/ && yarn install --frozen-lockfile && npm run lint"
- run: "yarn install --frozen-lockfile"
- run: "npm run lint"
unit_tests:
docker:
- image: "circleci/node:10"
steps:
- "checkout"
- run: "cd ~/project/packages/polyfill-library/ && yarn install --frozen-lockfile && npm run build && npm run test-node && npm run test-node-unit"
- run: "cd ~/project/packages/polyfill-service/ && yarn install --frozen-lockfile && npm run test-unit"
- run: "yarn install --frozen-lockfile"
- run: "npm run test-unit"
deploy_dev:
docker:
- image: "circleci/node:10"
Expand All @@ -31,7 +31,6 @@ jobs:
- run: "git push https://git.heroku.com/origami-polyfill-service-int.git HEAD:master --force"
- run: "sudo ~/project/.circleci/install_terraform.sh"
- run: |
cd ~/project/packages/polyfill-service/
rm -f terraform.tfstate
rm fastly/terraform/qa_override.tf
rm fastly/terraform/production_override.tf
Expand All @@ -46,18 +45,8 @@ jobs:
steps:
- "checkout"
- run: |
cd ~/project/packages/polyfill-service/
yarn install --frozen-lockfile
HOST=https://origami-polyfill-service-dev.in.ft.com npm run test-integration
polyfill_tests:
docker:
- image: "circleci/node:10"
steps:
- "checkout"
- run: |
cd ~/project/packages/polyfill-library/
yarn install --frozen-lockfile
npm run test-all-polyfills
deploy_staging:
docker:
- image: "circleci/node:10"
Expand All @@ -68,7 +57,6 @@ jobs:
- run: "git push https://git.heroku.com/origami-polyfill-service-qa-us.git HEAD:master --force"
- run: "sudo ~/project/.circleci/install_terraform.sh"
- run: |
cd ~/project/packages/polyfill-service/
rm -f terraform.tfstate
rm fastly/terraform/dev_override.tf
rm fastly/terraform/production_override.tf
Expand All @@ -83,19 +71,8 @@ jobs:
steps:
- "checkout"
- run: |
cd ~/project/packages/polyfill-service/
yarn install --frozen-lockfile
HOST=https://qa.polyfill.io npm run test-integration
publish_library_to_npm:
docker:
- image: "circleci/node:10"
steps:
- "checkout"
- run: |
cd ~/project/packages/polyfill-library/
yarn install --frozen-lockfile
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ~/.npmrc
npm publish
deploy_service_production:
docker:
- image: "circleci/node:10"
Expand All @@ -106,7 +83,7 @@ jobs:
- run: "sudo ~/project/.circleci/install_terraform.sh"
- run: "heroku pipelines:promote --app origami-polyfill-service-qa-eu --to origami-polyfill-service-eu,origami-polyfill-service-us"
- run: |
cd ~/project/packages/polyfill-service/
cd ~/project/
rm -f terraform.tfstate
rm fastly/terraform/dev_override.tf
rm fastly/terraform/qa_override.tf
Expand Down Expand Up @@ -136,16 +113,6 @@ workflows:
ignore: /^v.*/
branches:
ignore: master
- polyfill_tests:
filters:
tags:
ignore: /^v.*/
branches:
ignore: master
requires:
- lint_terraform
- lint_js
- unit_tests
- deploy_dev:
filters:
tags:
Expand Down Expand Up @@ -180,12 +147,6 @@ workflows:
- master
requires:
- deploy_staging
- publish_library_to_npm:
filters:
tags:
only: /^v.*/
branches:
ignore: /.*/
- deploy_service_production:
filters:
tags:
Expand Down
File renamed without changes.
File renamed without changes.
7 changes: 7 additions & 0 deletions .github/contribution_licence_agreement.md
@@ -0,0 +1,7 @@
All contributions to the polyfill service are made under the MIT licence. It is important therefore that you agree to the following when contributing code to the service:

* Any contribution I make to the polyfill service by way of Pull Request contains only data that is:
* wholly my own work, upon which I am legally permitted to grant a licence; or
* wholly the work of individuals within the same organisation to which the copyright in all work created by employees is assigned, of which I am a current employee and authorised representive for the purposes of this contribution, and which is legally permitted to grant a licence; or
* licensed by the original author under the MIT licence or equivalent terms
* In respect of any part of my contribution that is not already available under an MIT or compatible licence, I hereby grant to the Financial Times Limited (FT) and to recipients of software distributed by the FT a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable license to make, have made, use, offer to sell, sell, import, and otherwise transfer the data.
24 changes: 2 additions & 22 deletions .gitignore
Expand Up @@ -7,27 +7,7 @@ node_modules/
bower_components/
coverage/
npm-debug.log
packages/*/polyfills/__dist
packages/*/polyfills/aliases.json
packages/*/polyfills/atob/polyfill.js
packages/*/polyfills/AudioContext/polyfill.js
packages/*/polyfills/EventSource/polyfill.js
packages/*/polyfills/HTMLPictureElement/polyfill.js
packages/*/polyfills/Intl/polyfill.js
packages/*/polyfills/Intl/~locale/**
packages/*/polyfills/JSON/polyfill.js
packages/*/polyfills/MutationObserver/polyfill.js
packages/*/polyfills/Promise/polyfill.js
packages/*/polyfills/UserTiming/polyfill.js
packages/*/polyfills/~html5-elements/polyfill.js
packages/*/polyfills/WebAnimations/polyfill.js
packages/*/polyfills/fetch/polyfill.js
packages/*/polyfills/_TypedArray/polyfill.js
packages/*/test/results/
# Generated by BrowserStack's Tunnelling application
local.log
packages/polyfill-service/serverless/stack.json
packages/polyfill-library/coverage/
packages/polyfill-library/.nyc_output/
packages/polyfill-service/public/static/main.css
packages/polyfill-service/public/static/main.js
public/static/main.css
public/static/main.js
File renamed without changes.
15 changes: 0 additions & 15 deletions .release-it.json

This file was deleted.

2 changes: 1 addition & 1 deletion Procfile
@@ -1 +1 @@
web: npm start --prefix packages/polyfill-service
web: npm start
16 changes: 5 additions & 11 deletions README.md
@@ -1,13 +1,12 @@

# [Polyfill.io][production] · [![license][license-badge]][license] [![Coverage Status][coveralls-badge]][coveralls] [![CircleCI Status][circle-ci-badge]][circle-ci] [![PRs Welcome][pull-requests-badge]][contributing guide]
# [Polyfill.io][website] · [![license][license-badge]][license] [![CircleCI Status][circle-ci-badge]][circle-ci] [![PRs Welcome][pull-requests-badge]][contributing guide]

Polyfill.io is a service which makes web development less frustrating by selectively polyfilling just what the browser needs.
Polyfill.io reads the User-Agent header of each request and returns polyfills that are suitable for the requesting browser.

## Documentation

Polyfill.io documentation is [on the website][production].
Polyfill-library documentation is [located here][polyfill-library].
Polyfill.io documentation is [on the website][website].


## [Contributing][contributing guide]
Expand All @@ -16,18 +15,13 @@ Read our [contributing guide] to learn about our development process, how to pro

## License

Polyfill.io is [MIT licensed][license].
Polyfill.io is licensed under the terms of the [MIT license][license]. Contributors must accept our [contribution terms].

[@polyfillio]: https://twitter.com/polyfillio
[circle-ci]: https://circleci.com/gh/Financial-Times/polyfill-service
[circle-ci-badge]: https://circleci.com/gh/Financial-Times/polyfill-service.svg?style=shield&circle-token=88c37ba36676a8b01945fded105a973925c46f12
[contributing guide]: ./.github/CONTRIBUTING.md
[coveralls]: https://coveralls.io/github/Financial-Times/polyfill-service?branch=master
[coveralls-badge]: https://coveralls.io/repos/github/Financial-Times/polyfill-service/badge.svg?branch=master&t=j7vzBH
[contribution terms]: ./.github/contribution_licence_agreement.md
[license]: ./LICENSE.md
[license-badge]: https://img.shields.io/badge/license-MIT-blue.svg
[polyfill-library]: ./packages/polyfill-library
[pull-requests-badge]: https://img.shields.io/badge/PRs-welcome-brightgreen.svg
[npm]: https://www.npmjs.com/
[staging]: https://qa.polyfill.io
[production]: https://polyfill.io
[website]: https://polyfill.io
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
68 changes: 56 additions & 12 deletions package.json
@@ -1,14 +1,7 @@
{
"name": "polyfill-service-and-library",
"version": "3.27.0",
"private": true,
"name": "polyfill-service",
"description": "A polyfill combinator",
"scripts": {
"version": "npm version $npm_package_version --prefix packages/polyfill-library && npm version $npm_package_version --prefix packages/polyfill-service && git add packages/polyfill-library/package.json packages/polyfill-service/package.json",
"install": "cd packages/polyfill-library && yarn install --frozen-lockfile && cd - && cd packages/polyfill-service && yarn install --frozen-lockfile && cd -",
"heroku-postbuild": "npm run build --prefix packages/polyfill-service",
"release": "release-it"
},
"private": true,
"contributors": [
{
"name": "Jonathan Neal",
Expand All @@ -28,11 +21,62 @@
"bugs": {
"url": "https://github.com/financial-times/polyfill-service/issues"
},
"scripts": {
"build": "obt build --build-folder='./public/static' --sass='./client/sass/main.scss' --js='./client/js/main.js' --production",
"fmt": "terraform fmt fastly/terraform/ && eslint . --fix",
"lint": "eslint .",
"postinstall": "bower install --allow-root",
"heroku-postbuild": "npm run build",
"start": "node server/index.js",
"test": "npm run test-unit",
"test-unit": "nyc --reporter=lcov --reporter=text mocha test/unit/**/*.test.js --recursive",
"test-integration": "nyc --reporter=html --reporter=text mocha test/integration/*.test.js test/integration/**/*.test.js --recursive --bail"
},
"license": "MIT",
"engines": {
"node": ">=8"
"node": ">=8.10"
},
"dependencies": {
"@financial-times/origami-service": "^4.0.0",
"axios": "^0.18.0",
"bluebird": "^3.5.1",
"bower": "^1.8.4",
"decompress": "^4.2.0",
"denodeify": "^1.2.1",
"dotenv": "^6.1.0",
"graceful-fs": "^4.1.10",
"handlebars": "^4.0.6",
"iltorb": "^2.3.2",
"moment": "^2.22.2",
"origami-build-tools": "^7.7.5",
"polyfill-library": "*",
"polyfill-library-3.25.3": "npm:polyfill-service@3.25.3",
"require-all": "^3.0.0",
"throng": "^4.0.0"
},
"devDependencies": {
"release-it": "^7.6.3"
}
"browserstack": "^1.5.1",
"browserstack-local": "^1.3.7",
"coveralls": "^3.0.1",
"eslint": "^4.19.1",
"eslint-plugin-node": "^6.0.1",
"eslint-plugin-prettier": "^2.6.0",
"fs-extra": "^6.0.1",
"mkdirp": "^0.5.1",
"mocha": "^3.5.3",
"mockery": "^2.1.0",
"mustache": "^2.3.0",
"nyc": "^12.0.2",
"prettier": "^1.13.7",
"proclaim": "^3.5.0",
"rimraf": "^2.6.2",
"secure-random-uniform": "^3.1.0",
"sinon": "^4.5.0",
"supertest": "^3.0.0",
"uap-core": "github:ua-parser/uap-core#f330b0337297ec979196a762cbb351ee29fce403",
"uap-ref-impl": "github:ua-parser/uap-ref-impl#d3a71a0fe706560aeee686e8dd516a574f874575",
"utf8": "^3.0.0",
"yamlparser": "0.0.2"
},
"version": "3.27.0"
}
34 changes: 0 additions & 34 deletions packages/polyfill-library/.eslintignore

This file was deleted.

33 changes: 0 additions & 33 deletions packages/polyfill-library/.eslintrc

This file was deleted.

0 comments on commit 0996b55

Please sign in to comment.