Skip to content

Commit

Permalink
Typescript: merge from main (#243)
Browse files Browse the repository at this point in the history
* Highlight backport rules

* Add backport rules

* Add backport rules

* Use organization secret NPM_ORG_TOKEN (#231)

* Fix link in README and CONTRIBUTING. Fix typo in README. (#237)

* one yarn forgotten (#242)

Co-authored-by: Marcel Normann <[email protected]>
Co-authored-by: Oliver Wipfli <[email protected]>
Co-authored-by: tunnelpuzzle <[email protected]>
  • Loading branch information
4 people authored Aug 14, 2021
1 parent 2c55e69 commit 3b489d2
Show file tree
Hide file tree
Showing 10 changed files with 15 additions and 38 deletions.
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<!-- Thanks for the PR! Feel free to add or remove items from the checklist. -->


- [ ] confirm your changes do not include backports from Mapbox projects (unless with compliant license)
- [ ] confirm **your changes do not include backports from Mapbox projects** (unless with compliant license) - if you are not sure about this, please ask!
- [ ] briefly describe the changes in this PR
- [ ] include before/after visuals or gifs if this PR includes visual changes
- [ ] write tests for all new functionality
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-style-spec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@ jobs:
node -e "if(require('./package').version.includes('dev')) { process.exit(1) }"
npm publish --access=public
env:
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_ORG_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -171,4 +171,4 @@ jobs:
run: |
yarn publish --non-interactive
env:
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_ORG_TOKEN }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/rollup/build/
/types/
/dist/
/dist_type/
*.es.js
*.js.map
node_modules
Expand Down
4 changes: 4 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
Hi, and thanks in advance for contributing to MapLibre GL. Here's how we work. Please follow these conventions when submitting an issue or pull request.

## Do not violate Mapbox copyright!
In December 2020 Mapbox decided to publish future versions of mapbox-gl-js under a proprietary license. **You are not allowed to backport code from Mapbox projects which has been contributed under this new license**. Unauthorized backports are the biggest threat to the MapLibre project. If you are unsure about this issue, [please ask](https://github.com/maplibre/maplibre-gl-js/discussions)!


## Preparing your Development Environment

### OSX
Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ If you depend on mapbox-gl directly, simply replace `mapbox-gl` with `maplibre-g
}
```

And replace ```mapboxgl``` with ```maplibregl``` in your JavaScript and optionannly in your HTML/CSS code:
And replace ```mapboxgl``` with ```maplibregl``` in your JavaScript and optionally in your HTML/CSS code:
```diff
- var map = new mapboxgl.Map({
+ var map = new maplibregl.Map({
Expand Down Expand Up @@ -43,7 +43,9 @@ If you depend on a free software alternative to `mapbox-gl-js`, please consider

### Thank you Mapbox 🙏🏽

We'd like to acknowledge the amazing work Mapbox has contributed to open source. The open source community is sad to part ways with them, but we simultaneously feel grateful for everything they already contributed. `mapbox-gl-js` 1.x is an open source achievment which now lives on as `maplibre-gl`. We're proud to develop on the shoulders of giants, thank you Mapbox 🙇🏽‍♀️
We'd like to acknowledge the amazing work Mapbox has contributed to open source. The open source community is sad to part ways with them, but we simultaneously feel grateful for everything they already contributed. `mapbox-gl-js` 1.x is an open source achievment which now lives on as `maplibre-gl`. We're proud to develop on the shoulders of giants, thank you Mapbox 🙇🏽‍♀️.

Please keep in mind: Unauthorized backports are the biggest threat to the MapLibre project. It is unacceptable to backport code from mapbox-gl-js, which is not covered by the former BSD-3 license. If you are unsure about this issue, [please ask](https://github.com/maplibre/maplibre-gl-js/discussions)!

## License

Expand Down
2 changes: 1 addition & 1 deletion RELEASE-PROCESS.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ Release candidate versions do not generate release notes.

The changelog should be updated on every PR - there is a placeholder at the top of the document - and heading should be renamed to the same version which is going to be set in the version tag during release.

The workflow expects `NODE_AUTH_TOKEN` repo secret in order to push to NPM registry.
The workflow expects `${{ secrets.NPM_ORG_TOKEN }}` organization secret in order to push to NPM registry.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,8 @@
"start-bench": "run-p watch-benchmarks start-server",
"start-release": "run-s build-prod-min build-css print-release-url start-server",
"diff-tarball": "cross-env build/run-node build/diff-tarball",
"prepare-publish": "git clean -fdx && yarn install",
"lint": "eslint --ext \".ts,.js,.html\" --ignore-path .gitignore src build debug/*.html",
"prepare-publish": "git clean -fdx & npm install",
"lint-docs": "documentation lint src/index.js",
"lint-css": "stylelint 'src/css/maplibre-gl.css'",
"test": "run-s lint lint-css lint-docs test-unit",
Expand Down
2 changes: 1 addition & 1 deletion rollup/copy-glsl-files.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ glob("./src/**/*.glsl", null, (err, files) => {
fs.writeFileSync(fileName, content);
}
console.log(`Finished converting ${files.length} glsl files`);
});
});
30 changes: 0 additions & 30 deletions src/data/array_types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -850,16 +850,6 @@ register('StructArrayLayout4f16', StructArrayLayout4f16);

class CollisionBoxStruct extends Struct {
_structArray: CollisionBoxArray;
// anchorPointX: number;
// anchorPointY: number;
// x1: number;
// y1: number;
// x2: number;
// y2: number;
// featureIndex: number;
// sourceLayerIndex: number;
// bucketIndex: number;
// anchorPoint: Point;
get anchorPointX() { return this._structArray.int16[this._pos2 + 0]; }
get anchorPointY() { return this._structArray.int16[this._pos2 + 1]; }
get x1() { return this._structArray.int16[this._pos2 + 2]; }
Expand Down Expand Up @@ -895,23 +885,6 @@ register('CollisionBoxArray', CollisionBoxArray);

class PlacedSymbolStruct extends Struct {
_structArray: PlacedSymbolArray;
// anchorX: number;
// anchorY: number;
// glyphStartIndex: number;
// numGlyphs: number;
// vertexStartIndex: number;
// lineStartIndex: number;
// lineLength: number;
// segment: number;
// lowerSize: number;
// upperSize: number;
// lineOffsetX: number;
// lineOffsetY: number;
// writingMode: number;
// placedOrientation: number;
// hidden: number;
// crossTileID: number;
// associatedIconIndex: number;
get anchorX() { return this._structArray.int16[this._pos2 + 0]; }
get anchorY() { return this._structArray.int16[this._pos2 + 1]; }
get glyphStartIndex() { return this._structArray.uint16[this._pos2 + 2]; }
Expand Down Expand Up @@ -1031,9 +1004,6 @@ register('SymbolLineVertexArray', SymbolLineVertexArray);

class FeatureIndexStruct extends Struct {
_structArray: FeatureIndexArray;
// featureIndex: number;
// sourceLayerIndex: number;
// bucketIndex: number;
get featureIndex() { return this._structArray.uint32[this._pos4 + 0]; }
get sourceLayerIndex() { return this._structArray.uint16[this._pos2 + 2]; }
get bucketIndex() { return this._structArray.uint16[this._pos2 + 3]; }
Expand Down

0 comments on commit 3b489d2

Please sign in to comment.