Skip to content
This repository has been archived by the owner on Jul 24, 2024. It is now read-only.

Commit

Permalink
Upgrade to [email protected]
Browse files Browse the repository at this point in the history
* Make `quote()` accept non-string values for bwc
* Add minor testing around quotes
* Add Node 14 support
* Automate releases to GitHub
* Bump mocha

Signed-off-by: Miki <[email protected]>
  • Loading branch information
AMoo-Miki committed Jul 21, 2023
1 parent 87f3899 commit 43c74c0
Show file tree
Hide file tree
Showing 217 changed files with 20,306 additions and 17,107 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/alpine.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build bindings for Alpine releases
name: Build bindings for Alpine

on:
push:
Expand All @@ -15,6 +15,7 @@ jobs:
fail-fast: false
matrix:
node:
- 14
- 16
- 18
- 19
Expand All @@ -24,6 +25,9 @@ jobs:
- name: Install Alpine build tools
run: apk add --no-cache python3 make git gcc g++

- name: Update NPM
run: npm i npm -g

- uses: actions/checkout@v3

- name: Install packages
Expand All @@ -35,7 +39,7 @@ jobs:
run: npm test

- uses: actions/upload-artifact@v3
if: github.repository_owner == 'sass' && github.event_name != 'pull_request'
if: github.event_name != 'pull_request'
with:
name: ${{ matrix.node }}
path: vendor/
40 changes: 0 additions & 40 deletions .github/workflows/coverage.yml

This file was deleted.

11 changes: 9 additions & 2 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build bindings for Linux releases
name: Build bindings for Linux

on:
push:
Expand All @@ -14,6 +14,10 @@ jobs:
fail-fast: false
matrix:
include:
- node: 14
gcc: "gcc-8"
gpp: "g++-8"
os: ubuntu-20.04
- node: 16
gcc: "gcc-8"
gpp: "g++-8"
Expand All @@ -40,6 +44,9 @@ jobs:
with:
node-version: ${{ matrix.node }}

- name: Update NPM
run: npm i npm -g

- name: Setup GCC/G++
run: sudo apt-get install ${{ matrix.gcc }} ${{ matrix.gpp }}

Expand All @@ -56,7 +63,7 @@ jobs:
run: npm test

- uses: actions/upload-artifact@v3
if: github.repository_owner == 'sass' && github.event_name != 'pull_request'
if: github.event_name != 'pull_request'
with:
name: ${{ matrix.node }}
path: vendor/
8 changes: 6 additions & 2 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build bindings for macOS releases
name: Build bindings for macOS

on:
push:
Expand All @@ -14,6 +14,7 @@ jobs:
fail-fast: false
matrix:
node:
- 14
- 16
- 18
- 19
Expand All @@ -27,6 +28,9 @@ jobs:
with:
node-version: ${{ matrix.node }}

- name: Update NPM
run: npm i npm -g

- name: Install packages
run: npm install --unsafe-perm
env:
Expand All @@ -36,7 +40,7 @@ jobs:
run: npm test

- uses: actions/upload-artifact@v3
if: github.repository_owner == 'sass' && github.event_name != 'pull_request'
if: github.event_name != 'pull_request'
with:
name: ${{ matrix.node }}
path: vendor/
203 changes: 203 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,203 @@
name: Release

on:
push:
tags:
- 'v*.*.*'

env:
SASS_BINARY_PATH: "vendor/binding.node"

jobs:
release-linux:
name: Linux release artifacts
runs-on: ${{ matrix.os }}
permissions:
contents: write
strategy:
matrix:
include:
- node: 14
gcc: "gcc-8"
gpp: "g++-8"
os: ubuntu-20.04
- node: 16
gcc: "gcc-8"
gpp: "g++-8"
os: ubuntu-20.04
- node: 18
gcc: "gcc-8"
gpp: "g++-8"
os: ubuntu-20.04
- node: 19
gcc: "gcc-8"
gpp: "g++-8"
os: ubuntu-20.04
- node: 20
gcc: "gcc-10"
gpp: "g++-10"
os: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}

- name: Update NPM
run: npm i npm -g

- name: Setup GCC/G++
run: sudo apt-get install ${{ matrix.gcc }} ${{ matrix.gpp }}

- name: Install
run: npm install --unsafe-perm
env:
SKIP_SASS_BINARY_DOWNLOAD_FOR_CI: true
CC: ${{ matrix.gcc }}
CXX: ${{ matrix.gpp }}
LINK: ${{ matrix.gcc }}
LINKXX: ${{ matrix.gpp }}

- name: Get binding name
run: echo "ASSET_NAME=$(node -p "require('./lib/extensions.js').getBinaryName()")" >> $GITHUB_ENV

- name: Upload release artifacts
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: vendor/binding.node
asset_name: ${{ env.ASSET_NAME }}
tag: ${{ github.ref }}

release-alpine:
name: Alpine release artifacts
runs-on: ubuntu-latest
permissions:
contents: write
container:
image: node:${{ matrix.node }}-alpine
strategy:
fail-fast: false
matrix:
node:
- 14
- 16
- 18
- 19
- 20
steps:
- name: Alpine build tools
run: apk add --no-cache python3 make git gcc g++

- name: Update NPM
run: npm i npm -g

- name: Checkout
uses: actions/checkout@v3

- name: Install
run: npm install --unsafe-perm
env:
SKIP_SASS_BINARY_DOWNLOAD_FOR_CI: true

- name: Get binding name
run: echo "ASSET_NAME=$(node -p "require('./lib/extensions.js').getBinaryName()")" >> $GITHUB_ENV

- name: Upload release artifacts
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: vendor/binding.node
asset_name: ${{ env.ASSET_NAME }}
tag: ${{ github.ref }}

release-darwin:
name: Darwin release artifacts
runs-on: macos-latest
permissions:
contents: write
strategy:
fail-fast: false
matrix:
node:
- 14
- 16
- 18
- 19
- 20
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}

- name: Update NPM
run: npm i npm -g

- name: Install
run: npm install --unsafe-perm
env:
SKIP_SASS_BINARY_DOWNLOAD_FOR_CI: true

- name: Get binding name
run: echo "ASSET_NAME=$(node -p "require('./lib/extensions.js').getBinaryName()")" >> $GITHUB_ENV

- name: Upload release artifacts
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: vendor/binding.node
asset_name: ${{ env.ASSET_NAME }}
tag: ${{ github.ref }}

release-windows:
name: Windows release artifacts
runs-on: windows-latest
permissions:
contents: write
strategy:
fail-fast: false
matrix:
node:
- 14
- 16
- 18
- 19
- 20
architecture:
- x64
- x86
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
architecture: ${{ matrix.architecture }}

- name: Update NPM
run: npm i npm -g

- name: Install
run: npm install --unsafe-perm
env:
SKIP_SASS_BINARY_DOWNLOAD_FOR_CI: true

- name: Get binding name
run: echo "ASSET_NAME=$(node -p "require('./lib/extensions.js').getBinaryName()")" >> $env:GITHUB_ENV

- name: Upload release artifacts
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: vendor/binding.node
asset_name: ${{ env.ASSET_NAME }}
tag: ${{ github.ref }}
8 changes: 6 additions & 2 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build bindings for Windows releases
name: Build bindings for Windows

on:
push:
Expand All @@ -14,6 +14,7 @@ jobs:
fail-fast: false
matrix:
node:
- 14
- 16
- 18
- 19
Expand All @@ -32,6 +33,9 @@ jobs:
node-version: ${{ matrix.node }}
architecture: ${{ matrix.architecture }}

- name: Update NPM
run: npm i npm -g

- name: Install packages
run: npm install
env:
Expand All @@ -41,7 +45,7 @@ jobs:
run: npm test

- uses: actions/upload-artifact@v3
if: github.repository_owner == 'sass' && github.event_name != 'pull_request'
if: github.event_name != 'pull_request'
with:
name: ${{ matrix.node }}-${{ matrix.architecture }}
path: |
Expand Down
2 changes: 1 addition & 1 deletion lib/errors.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ module.exports.unsupportedEnvironment = function() {
return [
'Node Sass does not yet support your current environment: ' + humanEnvironment(),
'For more information on which environments are supported please see:',
'https://github.com/sass/node-sass/releases/tag/v' + pkg.version
'https://github.com/AMoo-Miki/node-sass/releases/tag/v' + pkg.version
].join('\n');
};

Expand Down
2 changes: 1 addition & 1 deletion lib/extensions.js
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ function getBinaryUrl() {
process.env.SASS_BINARY_SITE ||
process.env.npm_config_sass_binary_site ||
(pkg.nodeSassConfig && pkg.nodeSassConfig.binarySite) ||
'https://github.com/sass/node-sass/releases/download';
'https://github.com/AMoo-Miki/node-sass/releases/download';

return [site, 'v' + pkg.version, getBinaryName()].join('/');
}
Expand Down
Loading

0 comments on commit 43c74c0

Please sign in to comment.