Skip to content

Commit

Permalink
Fix version conflict by vendoring an updated glamor
Browse files Browse the repository at this point in the history
(See previous commit message for context.)

First, we fixed glamor to work with the current version (post-v5) of
inline-style-prefixer (ISP). For full details on those changes, see this
PR we opened: threepointone/glamor#396

After that, we:

- cloned that (forked) version of glamor to vendor/glamor,
- ran `npm install` in that directory,
- ran `npm run build` in that directory to compile the source and make
  library paths available, and
- removed unneeded files with `rm -rf .git node_modules`.

Finally, we added two new dependencies to our project:

- glamor, pointing to the vendored code, and
- ISP at ^6.0.0, which at this point both ui-box and (our local version
  of) glamor can use without a problem.

(For some reason we don't yet understand, only adding glamor wasn't
enough. When we did that, ISP wasn't getting installed at the top level
of node_modules, and Shadow CLJS wasn't able to find it, so we had to
add it as a top-level dep.)

After that and a top-level `npm install`, we could `npm run watch` and
have a working example that used a previously broken feature of
Evergreen.

Credit: Christopher Gsell for pair programming me on this journey.
  • Loading branch information
kyptin committed Jun 2, 2021
1 parent 9ac8192 commit 710573a
Show file tree
Hide file tree
Showing 115 changed files with 37,114 additions and 21 deletions.
187 changes: 166 additions & 21 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
},
"dependencies": {
"evergreen-ui": "^6.0.1",
"glamor": "file:vendor/glamor",
"inline-style-prefixer": "^6.0.0",
"react": "^16.8.0",
"react-dom": "^16.8.0"
},
Expand Down
4 changes: 4 additions & 0 deletions vendor/glamor/.babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"presets": [ [ "env", { "modules": false } ], "stage-0", "react" ],
"plugins": [ "transform-decorators-legacy" ]
}
8 changes: 8 additions & 0 deletions vendor/glamor/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
root = true

[*]
end_of_line = lf
insert_final_newline = true
charset = utf-8
indent_style = space
indent_size = 2
9 changes: 9 additions & 0 deletions vendor/glamor/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/coverage
/lib
node_modules/
npm-debug.log
examples/bundle.js
umd/*
es6/*
tests/coverage
.DS_Store
4 changes: 4 additions & 0 deletions vendor/glamor/.stylelintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"processors": ["stylelint-processor-styled-components"],
"extends": "stylelint-config-standard"
}
15 changes: 15 additions & 0 deletions vendor/glamor/.travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
sudo: false

language: node_js
node_js:
- 6

before_install:

after_success:

branches:
only:
- master

script: npm run test
46 changes: 46 additions & 0 deletions vendor/glamor/CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Contributor Covenant Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at [email protected]. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]

[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/4/
22 changes: 22 additions & 0 deletions vendor/glamor/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
## Prerequisites

[Node.js](http://nodejs.org/) must be installed.

## Installation

* Running `npm install` in the components's root directory will install everything you need for development.

## Demo Development Server

* `npm start` will run a development server with the component's demo app at [http://localhost:8080](http://localhost:8080)

## Running Tests

* `npm test` will run the tests once.
* `npm run test:watch` will run the tests on every change.

## Building

* `npm run build` will build the component for publishing to npm and also bundle the demo app.

* `npm run clean` will delete built resources.
21 changes: 21 additions & 0 deletions vendor/glamor/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2017 Sunil Pai

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Loading

0 comments on commit 710573a

Please sign in to comment.