Skip to content

Commit 5776dc5

Browse files
authored
Rename package to release under the @stellar/ npm scope. (stellar#111)
* Upgrade compatible dependencies * Add script to publish to both places * Add deprecation message * Bump patch version to trigger publish GHA
1 parent a8bdbdc commit 5776dc5

File tree

5 files changed

+1117
-1008
lines changed

5 files changed

+1117
-1008
lines changed

.github/workflows/npm-publish.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@ jobs:
1313
- name: Install Node
1414
uses: actions/setup-node@v3
1515
with:
16-
node-version: '14.x'
17-
registry-url: 'https://registry.npmjs.org'
16+
node-version: 18
1817

1918
- name: Install Dependencies
2019
run: yarn
@@ -26,3 +25,11 @@ jobs:
2625
run: yarn publish
2726
env:
2827
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
28+
29+
- name: Publish npm package under old scope
30+
run: |
31+
sed -i -e 's#"@stellar/js-xdr"#"js-xdr"#' package.json
32+
yarn publish
33+
npm deprecate js-xdr "⚠️ This package has moved to @stellar/js-xdr! 🚚"
34+
env:
35+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

babel.config.js

Lines changed: 0 additions & 15 deletions
This file was deleted.

babel.config.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"presets": [
3+
[
4+
"@babel/preset-env",
5+
{
6+
"targets": {
7+
"browsers": [
8+
"> 2%",
9+
"not ie 11",
10+
"not op_mini all"
11+
]
12+
}
13+
}
14+
]
15+
]
16+
}

package.json

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"name": "js-xdr",
3-
"version": "3.0.0",
2+
"name": "@stellar/js-xdr",
3+
"version": "3.0.1",
44
"description": "Read/write XDR encoded data structures (RFC 4506)",
55
"main": "lib/xdr.js",
66
"browser": "dist/xdr.js",
@@ -48,17 +48,17 @@
4848
"ui": "bdd"
4949
},
5050
"devDependencies": {
51-
"@babel/core": "^7.21.4",
52-
"@babel/eslint-parser": "^7.21.3",
53-
"@babel/preset-env": "^7.21.4",
54-
"@babel/register": "^7.14.5",
55-
"babel-loader": "^9.1.2",
51+
"@babel/core": "^7.23.3",
52+
"@babel/eslint-parser": "^7.23.3",
53+
"@babel/preset-env": "^7.23.3",
54+
"@babel/register": "^7.22.15",
55+
"babel-loader": "^9.1.3",
5656
"buffer": "^6.0.3",
57-
"chai": "^4.3.7",
58-
"eslint": "^8.43.0",
57+
"chai": "^4.3.10",
58+
"eslint": "^8.53.0",
5959
"eslint-config-airbnb-base": "^15.0.0",
6060
"eslint-config-prettier": "^8.8.0",
61-
"eslint-plugin-import": "^2.27.5",
61+
"eslint-plugin-import": "^2.29.0",
6262
"eslint-plugin-node": "^11.1.0",
6363
"eslint-plugin-prefer-import": "^0.0.1",
6464
"eslint-plugin-prettier": "^4.2.1",
@@ -75,7 +75,7 @@
7575
"sinon": "^15.2.0",
7676
"sinon-chai": "^3.7.0",
7777
"terser-webpack-plugin": "^5.3.7",
78-
"webpack": "^5.88.0",
78+
"webpack": "^5.89.0",
7979
"webpack-cli": "^5.0.2"
8080
}
8181
}

0 commit comments

Comments
 (0)