Skip to content

Commit 24ed6e7

Browse files
holblinJean-Philippe Zolesio
authored and
Jean-Philippe Zolesio
committed
Release 4.0.0-rc.1
1 parent 434aa17 commit 24ed6e7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+5648
-1715
lines changed

.eslintignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
dist/

.eslintrc.json

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": "./node_modules/gts/"
3+
}

.github/.DS_Store

6 KB
Binary file not shown.

.github/CONTRIBUTING.md

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# Contributing
2+
3+
Thanks for choosing to contribute!
4+
5+
The following are a set of guidelines to follow when contributing to this project.
6+
7+
## Code Of Conduct
8+
9+
This project adheres to the Adobe [code of conduct](../CODE_OF_CONDUCT.md). By participating,
10+
you are expected to uphold this code. Please report unacceptable behavior to
11+
12+
13+
## Have A Question?
14+
15+
Start by filing an issue. The existing committers on this project work to reach
16+
consensus around project direction and issue solutions within issue threads
17+
(when appropriate).
18+
19+
## Contributor License Agreement
20+
21+
All third-party contributions to this project must be accompanied by a signed contributor
22+
license agreement. This gives Adobe permission to redistribute your contributions
23+
as part of the project. [Sign our CLA](https://opensource.adobe.com/cla.html). You
24+
only need to submit an Adobe CLA one time, so if you have submitted one previously,
25+
you are good to go!
26+
27+
## Code Reviews
28+
29+
All submissions should come in the form of pull requests and need to be reviewed
30+
by project committers. Read [GitHub's pull request documentation](https://help.github.com/articles/about-pull-requests/)
31+
for more information on sending pull requests.
32+
33+
Lastly, please follow the [pull request template](PULL_REQUEST_TEMPLATE.md) when
34+
submitting a pull request!
35+
36+
## From Contributor To Committer
37+
38+
We love contributions from our community! If you'd like to go a step beyond contributor
39+
and become a committer with full write access and a say in the project, you must
40+
be invited to the project. The existing committers employ an internal nomination
41+
process that must reach lazy consensus (silence is approval) before invitations
42+
are issued. If you feel you are qualified and want to get more deeply involved,
43+
feel free to reach out to existing committers to have a conversation about that.
44+
45+
## Security Issues
46+
47+
Security issues shouldn't be reported on this issue tracker. Instead, [file an issue to our security experts](https://helpx.adobe.com/security/alertus.html).

.github/ISSUE_TEMPLATE.md

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<!--- STOP! Before you open an issue please search this repository's issues to see if it has already been reported. This helps reduce duplicate issues from being created. -->
2+
<!--- SECURITY DISCLOSURE: If this is a security disclosure please follow the guidelines in CONTRIBUTING.md. This helps keep folks from accidentally releasing vulnerabilities before the maintainers get a chance to fix the issue. -->
3+
4+
### Expected Behaviour
5+
6+
### Actual Behaviour
7+
8+
### Reproduce Scenario (including but not limited to)
9+
10+
#### Steps to Reproduce
11+
12+
#### Platform and Version
13+
14+
#### Sample Code that illustrates the problem
15+
16+
#### Logs taken while reproducing problem

.github/PULL_REQUEST_TEMPLATE.md

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
<!--- Provide a general summary of your changes in the Title above -->
2+
3+
## Description
4+
5+
<!--- Describe your changes in detail -->
6+
7+
## Related Issue
8+
9+
<!--- This project only accepts pull requests related to open issues -->
10+
<!--- If suggesting a new feature or change, please discuss it in an issue first -->
11+
<!--- If fixing a bug, there should be an issue describing it with steps to reproduce -->
12+
<!--- Please link to the issue here: -->
13+
14+
## Motivation and Context
15+
16+
<!--- Why is this change required? What problem does it solve? -->
17+
18+
## How Has This Been Tested?
19+
20+
<!--- Please describe in detail how you tested your changes. -->
21+
<!--- Include details of your testing environment, and the tests you ran to -->
22+
<!--- see how your change affects other areas of the code, etc. -->
23+
24+
## Screenshots (if appropriate):
25+
26+
## Types of changes
27+
28+
<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->
29+
30+
- [ ] Bug fix (non-breaking change which fixes an issue)
31+
- [ ] New feature (non-breaking change which adds functionality)
32+
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
33+
34+
## Checklist:
35+
36+
<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->
37+
<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->
38+
39+
- [ ] I have signed the [Adobe Open Source CLA](https://opensource.adobe.com/cla.html).
40+
- [ ] My code follows the code style of this project.
41+
- [ ] My change requires a change to the documentation.
42+
- [ ] I have updated the documentation accordingly.
43+
- [ ] I have read the **CONTRIBUTING** document.
44+
- [ ] I have added tests to cover my changes.
45+
- [ ] All new and existing tests passed.

.github/workflows/npm-publish.yml

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: npm-publish
2+
on:
3+
push:
4+
branches:
5+
- main # Change this to your default branch
6+
jobs:
7+
npm-publish:
8+
name: npm-publish
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout repository
12+
uses: actions/checkout@master
13+
- name: Set up Node.js
14+
uses: actions/setup-node@master
15+
with:
16+
node-version: 14
17+
- name: install
18+
run: yarn install
19+
- name: Publish if version has been updated
20+
uses: mkiki/npm-publish-action@c4315ef5790b7bcec2cbb75b34e37681a409d78d
21+
with: # All of theses inputs are optional
22+
tag_name: "v%s"
23+
tag_message: "v%s"
24+
commit_pattern: "^Release (\\S+)"
25+
workspace: "."
26+
env: # More info about the environment variables in the README
27+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Leave this as is, it's automatically generated
28+
NPM_AUTH_TOKEN: ${{ secrets.ADOBE_BOT_NPM_TOKEN }} # This will be shared with your repo as an org secret
29+
NPM_AUTH: ${{ secrets.ADOBE_BOT_NPM_TOKEN }} # This will be shared with your repo as an org secret
+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: version-bump-publish
2+
on:
3+
workflow_dispatch:
4+
inputs:
5+
level:
6+
description: "<newversion> | major | minor | patch | premajor | preminor | prepatch | prerelease"
7+
required: true
8+
default: "patch"
9+
tag:
10+
description: "The tag to publish to."
11+
required: false
12+
default: "latest"
13+
jobs:
14+
checkout:
15+
name: checkout
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v2
19+
with:
20+
token: ${{ secrets.ADOBE_BOT_GITHUB_TOKEN }}
21+
- name: Configure CI Git User
22+
run: |
23+
git config user.name adobe-bot
24+
git config user.email [email protected]
25+
- uses: actions/setup-node@v1
26+
with:
27+
node-version: 10
28+
- run: |
29+
npm install
30+
npm test
31+
- name: bump and pub
32+
if: ${{ github.event.inputs.level != '' }}
33+
run: |
34+
npm version ${{ github.event.inputs.level }}
35+
git push
36+
- uses: JS-DevTools/npm-publish@v1
37+
with:
38+
token: ${{ secrets.ADOBE_BOT_NPM_TOKEN }}
39+
tag: ${{ github.event.inputs.tag }}
40+
access: "public"

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
node_modules
2+
dist

.prettierrc.js

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = {
2+
...require('gts/.prettierrc.json')
3+
}

.vscode/settings.json

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"editor.codeActionsOnSave": {
3+
"source.fixAll.eslint": true
4+
}
5+
}

CODE_OF_CONDUCT.md

+74
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# Adobe Code of Conduct
2+
3+
## Our Pledge
4+
5+
In the interest of fostering an open and welcoming environment, we as
6+
contributors and maintainers pledge to making participation in our project and
7+
our community a harassment-free experience for everyone, regardless of age, body
8+
size, disability, ethnicity, gender identity and expression, level of experience,
9+
nationality, personal appearance, race, religion, or sexual identity and
10+
orientation.
11+
12+
## Our Standards
13+
14+
Examples of behavior that contributes to creating a positive environment
15+
include:
16+
17+
* Using welcoming and inclusive language.
18+
* Being respectful of differing viewpoints and experiences.
19+
* Gracefully accepting constructive criticism.
20+
* Focusing on what is best for the community.
21+
* Showing empathy towards other community members.
22+
23+
Examples of unacceptable behavior by participants include:
24+
25+
* The use of sexualized language or imagery and unwelcome sexual attention or
26+
advances.
27+
* Trolling, insulting/derogatory comments, and personal or political attacks.
28+
* Public or private harassment.
29+
* Publishing others' private information, such as a physical or electronic
30+
address, without explicit permission.
31+
* Other conduct which could reasonably be considered inappropriate in a
32+
professional setting.
33+
34+
## Our Responsibilities
35+
36+
Project maintainers are responsible for clarifying the standards of acceptable
37+
behavior and are expected to take appropriate and fair corrective action in
38+
response to any instances of unacceptable behavior.
39+
40+
Project maintainers have the right and responsibility to remove, edit, or
41+
reject comments, commits, code, wiki edits, issues, and other contributions
42+
that are not aligned to this Code of Conduct, or to ban temporarily or
43+
permanently any contributor for other behaviors that they deem inappropriate,
44+
threatening, offensive, or harmful.
45+
46+
## Scope
47+
48+
This Code of Conduct applies both within project spaces and in public spaces
49+
when an individual is representing the project or its community. Examples of
50+
representing a project or community include using an official project e-mail
51+
address, posting via an official social media account, or acting as an appointed
52+
representative at an online or offline event. Representation of a project may be
53+
further defined and clarified by project maintainers.
54+
55+
## Enforcement
56+
57+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
58+
reported by contacting the project team at [email protected]. All
59+
complaints will be reviewed and investigated and will result in a response that
60+
is deemed necessary and appropriate to the circumstances. The project team is
61+
obligated to maintain confidentiality with regard to the reporter of an incident.
62+
Further details of specific enforcement policies may be posted separately.
63+
64+
Project maintainers who do not follow or enforce the Code of Conduct in good
65+
faith may face temporary or permanent repercussions as determined by other
66+
members of the project's leadership.
67+
68+
## Attribution
69+
70+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71+
available at [https://contributor-covenant.org/version/1/4][version].
72+
73+
[homepage]: https://contributor-covenant.org
74+
[version]: https://contributor-covenant.org/version/1/4/

History.md

+9
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
4.0.0 / 2022-06-09
2+
==================
3+
4+
* Adobe fork of css into @adobe/css
5+
* Convert the project into typescript
6+
* Optimization of performance (+25% in some cases)
7+
* Update all deps
8+
* Remove sourcemap support
9+
110
2.2.1 / 2015-06-17
211
==================
312

LICENSE

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
(The MIT License)
22

33
Copyright (c) 2012 TJ Holowaychuk <[email protected]>
4+
Copyright (c) 2022 Jean-Philippe Zolesio <[email protected]>
45

56
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:
67

Readme.md

+3-14
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
# css [![Build Status](https://travis-ci.org/reworkcss/css.svg?branch=master)](https://travis-ci.org/reworkcss/css)
1+
# @adobe/css-tools
2+
3+
> This is a fork of the npm css package due to low maintenance
24
35
CSS parser / stringifier.
46

@@ -34,14 +36,6 @@ Accepts an AST `object` (as `css.parse` produces) and returns a CSS string.
3436

3537
- indent: the string used to indent the output. Defaults to two spaces.
3638
- compress: omit comments and extraneous whitespace.
37-
- sourcemap: return a sourcemap along with the CSS output. Using the `source`
38-
option of `css.parse` is strongly recommended when creating a source map.
39-
Specify `sourcemap: 'generator'` to return the SourceMapGenerator object
40-
instead of serializing the source map.
41-
- inputSourcemaps: (enabled by default, specify `false` to disable) reads any
42-
source maps referenced by the input files when generating the output source
43-
map. When enabled, file system access may be required for reading the
44-
referenced source maps.
4539

4640
### Example
4741

@@ -50,11 +44,6 @@ var ast = css.parse('body { font-size: 12px; }', { source: 'source.css' });
5044

5145
var css = css.stringify(ast);
5246

53-
var result = css.stringify(ast, { sourcemap: true });
54-
result.code // string with CSS
55-
result.map // source map object
56-
```
57-
5847
### Errors
5948

6049
Errors thrown during parsing have the following properties:

benchmark/index.js

-31
This file was deleted.

0 commit comments

Comments
 (0)