Skip to content
This repository was archived by the owner on Aug 3, 2023. It is now read-only.

Commit 1ea4965

Browse files
committed
Rename the babel-preset-shopify package to @shopify/babel-preset
1 parent 41f67f9 commit 1ea4965

10 files changed

+41
-24
lines changed

babel.config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module.exports = {
2-
presets: [['babel-preset-shopify/node', {modules: 'commonjs'}]],
2+
presets: [['@shopify/babel-preset/node', {modules: 'commonjs'}]],
33
};
File renamed without changes.

packages/babel-preset-shopify/CHANGELOG.md packages/babel-preset/CHANGELOG.md

+18
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,24 @@
22

33
## [Unreleased]
44

5+
The babel preset is now scoped undo the `@shopify` name. This mean the name of the preset is now `@shopify/babel-preset`.
6+
7+
8+
### Before
9+
10+
```
11+
module.exports = {
12+
presets: [['babel-preset-shopify/...']],
13+
};
14+
```
15+
16+
#### After
17+
```
18+
module.exports = {
19+
presets: [['@shopify/babel-preset/...']],
20+
};
21+
```
22+
523
## 21.0.0
624

725
### Added

packages/babel-preset-shopify/README.md packages/babel-preset/README.md

+17-19
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
# babel-preset-shopify
1+
# `@shopify/babel-preset`
22

3-
[![NPM version][npm-image]][npm-url]
3+
[![Build Status](https://travis-ci.org/Shopify/web-foundation.svg?branch=master)](https://travis-ci.org/Shopify/web-foundation)
4+
[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](LICENSE.md) [![npm version](https://badge.fury.io/js/%40shopify%2Fbabel-preset.svg)](https://badge.fury.io/js/%40shopify%2Fbabel-preset.svg) [![npm bundle size (minified + gzip)](https://img.shields.io/bundlephobia/minzip/@shopify/babel-preset.svg)](https://img.shields.io/bundlephobia/minzip/@shopify/babel-preset.svg)
45

56
Shopify’s org-wide set of Babel transforms.
67

@@ -11,21 +12,21 @@ Install this package, as well as the parts of Babel you wish to use:
1112
**With Yarn**
1213

1314
```bash
14-
yarn add --dev --exact babel-core babel-preset-shopify
15+
yarn add --dev --exact babel-core @shopify/babel-preset
1516
```
1617

1718
**With npm**
1819

1920
```bash
20-
npm install babel-core babel-preset-shopify --save-dev --save-exact
21+
npm install babel-core @shopify/babel-preset --save-dev --save-exact
2122
```
2223

2324
Then, in your Babel configuration (which should be under the `babel` key of your `package.json`), set this package as the babel preset you’d like to use:
2425

2526
```json
2627
{
2728
"babel": {
28-
"presets": ["babel-preset-shopify/web"]
29+
"presets": ["@shopify/babel-preset/web"]
2930
}
3031
}
3132
```
@@ -34,9 +35,9 @@ Then, in your Babel configuration (which should be under the `babel` key of your
3435

3536
This packages comes with several different presets for you to use, depending on your project:
3637

37-
- `babel-preset-shopify`: The same as `babel-preset-shopify/web`.
38+
- `@shopify/babel-preset`: The same as `@shopify/babel-preset/web`.
3839

39-
- `babel-preset-shopify/web`: A preset to use for JavaScript that is meant to run in browsers. It compiles down features to only those supported by browsers that you have specified in your [browserslist config](https://github.com/browserslist/browserslist). Note that many modern JavaScript features, like `Map`s, `Set`s, `for of` loops, and more, require runtime polyfills (we recommend [`@shopify/polyfills`](https://github.com/Shopify/quilt/tree/master/packages/polyfills), as our `web` and `node` configs will reduce these imports to the set of features needed to polyfill your target environment).
40+
- `@shopify/babel-preset/web`: A preset to use for JavaScript that is meant to run in browsers. It compiles down features to only those supported by browsers that you have specified in your [browserslist config](https://github.com/browserslist/browserslist). Note that many modern JavaScript features, like `Map`s, `Set`s, `for of` loops, and more, require runtime polyfills (we recommend [`@shopify/polyfills`](https://github.com/Shopify/quilt/tree/master/packages/polyfills), as our `web` and `node` configs will reduce these imports to the set of features needed to polyfill your target environment).
4041

4142
This preset accepts an options object. The following options are allowed:
4243

@@ -46,7 +47,7 @@ This packages comes with several different presets for you to use, depending on
4647
{
4748
"babel": {
4849
"presets": [
49-
["babel-preset-shopify/web", {"modules": false}]
50+
["@shopify/babel-preset/web", {"modules": false}]
5051
]
5152
}
5253
}
@@ -58,7 +59,7 @@ This packages comes with several different presets for you to use, depending on
5859
{
5960
"babel": {
6061
"presets": [
61-
["babel-preset-shopify/web", {
62+
["@shopify/babel-preset/web", {
6263
"browsers": ["last 3 versions"]
6364
}]
6465
]
@@ -76,13 +77,13 @@ This packages comes with several different presets for you to use, depending on
7677

7778
- `useBuiltIns`, a string that is passed to the [`useBuiltIns` option of `@babel/preset-env`](https://babeljs.io/docs/en/babel-preset-env#usebuiltins)
7879

79-
- `babel-preset-shopify/node`: This preset transpiles features to a specified version of Node, defaulting to the currently active version. It accepts an options object. The `modules`, `typescript`, `inlineEnv`,`debug`, `corejs` and `useBuiltIns` options do the same thing they do in `babel-preset-shopify/web`, detailed above. You can also pass a version of Node to target during transpilation using the `version` option:
80+
- `@shopify/babel-preset/node`: This preset transpiles features to a specified version of Node, defaulting to the currently active version. It accepts an options object. The `modules`, `typescript`, `inlineEnv`,`debug`, `corejs` and `useBuiltIns` options do the same thing they do in `@shopify/babel-preset/web`, detailed above. You can also pass a version of Node to target during transpilation using the `version` option:
8081

8182
```json
8283
{
8384
"babel": {
8485
"presets": [
85-
["babel-preset-shopify/node", {
86+
["@shopify/babel-preset/node", {
8687
"modules": false,
8788
"version": 4
8889
}]
@@ -91,7 +92,7 @@ This packages comes with several different presets for you to use, depending on
9192
}
9293
```
9394

94-
- `babel-preset-shopify/react`: Adds plugins that transform React (including JSX). You can use this preset with the `babel-preset-shopify/web` or `babel-preset-shopify/node` configuration.
95+
- `@shopify/babel-preset/react`: Adds plugins that transform React (including JSX). You can use this preset with the `@shopify/babel-preset/web` or `@shopify/babel-preset/node` configuration.
9596

9697
This preset accepts an options object.
9798
- `hot` : Will automatically add plugins to enable hot reloading of React components. Note that this requires you to have a recent version of `react-hot-loader` installed as a dependency in your project.
@@ -102,7 +103,7 @@ This packages comes with several different presets for you to use, depending on
102103
{
103104
"babel": {
104105
"presets": [
105-
["babel-preset-shopify/react", {"hot": true}]
106+
["@shopify/babel-preset/react", {"hot": true}]
106107
]
107108
}
108109
}
@@ -115,8 +116,8 @@ As noted above, you can include multiple of these presets together. Some common
115116
{
116117
"babel": {
117118
"presets": [
118-
"babel-preset-shopify/web",
119-
"babel-preset-shopify/react"
119+
"@shopify/babel-preset/web",
120+
"@shopify/babel-preset/react"
120121
]
121122
}
122123
}
@@ -125,11 +126,8 @@ As noted above, you can include multiple of these presets together. Some common
125126
{
126127
"babel": {
127128
"presets": [
128-
["babel-preset-shopify/node", {"modules": false}]
129+
["@shopify/babel-preset/node", {"modules": false}]
129130
]
130131
}
131132
}
132133
```
133-
134-
[npm-url]: https://npmjs.org/package/babel-preset-shopify
135-
[npm-image]: http://img.shields.io/npm/v/babel-preset-shopify.svg?style=flat-square
File renamed without changes.
File renamed without changes.

packages/babel-preset-shopify/package.json packages/babel-preset/package.json

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,23 @@
11
{
2-
"name": "babel-preset-shopify",
2+
"name": "@shopify/babel-preset",
33
"version": "21.0.0",
44
"license": "MIT",
55
"description": "Shopify's org-wide Babel preset",
66
"main": "index.js",
77
"publishConfig": {
8-
"access": "public"
8+
"access": "public",
9+
"@shopify:registry": "https://registry.npmjs.org"
910
},
1011
"author": "Shopify Inc.",
1112
"repository": {
1213
"type": "git",
1314
"url": "git+https://github.com/Shopify/web-foundation.git",
14-
"directory": "packages/babel-preset-shopify"
15+
"directory": "packages/babel-preset"
1516
},
1617
"bugs": {
1718
"url": "https://github.com/Shopify/web-foundation/issues"
1819
},
19-
"homepage": "https://github.com/Shopify/web-foundation/blob/master/packages/babel-preset-shopify/README.md",
20+
"homepage": "https://github.com/Shopify/web-foundation/blob/master/packages/babel-preset/README.md",
2021
"dependencies": {
2122
"@babel/core": "^7.7.5",
2223
"@babel/plugin-proposal-class-properties": "^7.7.4",
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)