Skip to content

Commit

Permalink
drop postinstall
Browse files Browse the repository at this point in the history
  • Loading branch information
zloirock committed Sep 23, 2024
1 parent e5040c9 commit 30c9982
Show file tree
Hide file tree
Showing 9 changed files with 1 addition and 95 deletions.
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ node_modules/
/packages/core-js-bundle/index.js
/packages/core-js-bundle/minified.js
/packages/core-js-bundle/minified.js.map
/packages/core-js-bundle/postinstall.js
/packages/core-js-compat/LICENSE
/packages/core-js-compat/built-in-definitions.json
/packages/core-js-compat/data.json
Expand All @@ -38,7 +37,6 @@ node_modules/
/packages/core-js-pure/LICENSE
/packages/core-js-pure/index.js
/packages/core-js-pure/configurator.js
/packages/core-js-pure/postinstall.js
/tests/**/bundles/
/tests/compat/*.jar
/tests/compat/compat-data.js
Expand Down
11 changes: 0 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ structuredClone(new Set([1, 2, 3])); // => new Set([1, 2, 3])
### Index
- [Usage](#usage)
- [Installation](#installation)
- [`postinstall` message](#postinstall-message)
- [CommonJS API](#commonjs-api)
- [Babel](#babel)
- [`@babel/polyfill`](#babelpolyfill)
Expand Down Expand Up @@ -211,16 +210,6 @@ npm install --save @core-js/[email protected]

Or you can use `core-js` [from CDN](https://www.jsdelivr.com/package/npm/@core-js/bundle).

### `postinstall` message[](#index)
The `core-js` project needs your help, so the package shows a message about it after installation. If it causes problems for you, you can disable it:
```sh
ADBLOCK=true npm install
// or
DISABLE_OPENCOLLECTIVE=true npm install
// or
npm install --loglevel silent
```

### CommonJS API[](#index)
You can import only-required-for-you polyfills, like in the examples at the top of `README.md`. Available CommonJS entry points for all polyfilled methods / constructors and namespaces. Just some examples:

Expand Down
3 changes: 0 additions & 3 deletions package-lock.json

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

5 changes: 1 addition & 4 deletions packages/core-js-bundle/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,5 @@
"email": "[email protected]",
"url": "http://zloirock.ru"
},
"main": "index.js",
"scripts": {
"postinstall": "node -e \"try{require('./postinstall')}catch(e){}\""
}
"main": "index.js"
}
3 changes: 0 additions & 3 deletions packages/core-js-pure/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -623,8 +623,5 @@
"./full/index.js": "./full/index.js",
"./index": "./index.js",
"./index.js": "./index.js"
},
"scripts": {
"postinstall": "node -e \"try{require('./postinstall')}catch(e){}\""
}
}
3 changes: 0 additions & 3 deletions packages/core-js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -617,8 +617,5 @@
"./full/index.js": "./full/index.js",
"./index": "./index.js",
"./index.js": "./index.js"
},
"scripts": {
"postinstall": "node -e \"try{require('./postinstall')}catch(e){}\""
}
}
62 changes: 0 additions & 62 deletions packages/core-js/postinstall.js

This file was deleted.

1 change: 0 additions & 1 deletion scripts/copy.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ const license = (await glob('packages/*/package.json')).map(path => path.replace

await Promise.all([
copy('packages/core-js-pure/override', 'packages/core-js-pure', options(true)),
copy('packages/core-js/postinstall.js', 'packages/core-js-bundle/postinstall.js', options(true)),
...license.map(path => copy('LICENSE', path, options(true))),
]);

Expand Down
6 changes: 0 additions & 6 deletions tests/eslint/eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -1695,12 +1695,6 @@ export default [
],
rules: polyfills,
},
{
files: [
'**/postinstall.js',
],
rules: disable(forbidES5BuiltIns),
},
{
files: [
'tests/@(helpers|unit-@(global|pure)|wpt-url-resources)/**',
Expand Down

0 comments on commit 30c9982

Please sign in to comment.